Commit 0c9a7854 by guojuxing

门店导购对外查询列表接口修改

parent 69c85709
......@@ -162,8 +162,13 @@ public class ClerkApiServiceImpl implements ClerkApiService {
@SuppressWarnings("unchecked")
public ServiceResponse<Page<ClerkStoreListDTO>> listClerk(Integer enterpriseId, ClerkSearchDTO clerkSearchDTO,
Integer pageNum, Integer pageSize) {
if (clerkSearchDTO.getStoreGroupId() == null) {
return ServiceResponse.failure(ErrorCode.MISS_PARAMETER.getCode(), ErrorCode.MISS_PARAMETER.getMsg());
boolean hasStoreIds = StringUtils.isBlank(clerkSearchDTO.getStoreIds());
//如果有门店数据条件,则不判断门店分组数据,因为分店分组数据也是为了获取门店
if (!hasStoreIds) {
if (clerkSearchDTO.getStoreGroupId() == null) {
return ServiceResponse.failure(ErrorCode.MISS_PARAMETER.getCode(), ErrorCode.MISS_PARAMETER.getMsg());
}
}
// 分组的id
List<TabStoreGroup> groupList = storeGroupService.listStoreGroupAndChildren(clerkSearchDTO.getStoreGroupId());
......@@ -181,7 +186,9 @@ public class ClerkApiServiceImpl implements ClerkApiService {
storeIdByClerkSearch = "";
}
clerkSearchDTO.setEnterpriseId(enterpriseId);
clerkSearchDTO.setStoreIds(storeIdByClerkSearch);
if (!hasStoreIds) {
clerkSearchDTO.setStoreIds(storeIdByClerkSearch);
}
ServiceResponse<Page<StoreDTO>> serviceResponse = listStoreIds(clerkSearchDTO, pageNum, pageSize);
if (!serviceResponse.isSuccess()) {
return ServiceResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
......
......@@ -319,7 +319,7 @@ public class StoreOpenApiServiceImpl implements StoreOpenApiService {
}
StringBuilder storeIds = new StringBuilder();
if (StringUtils.isBlank(storeCode)) {
//查询域下所有的门店
//查询域下所有的门店:q
StoreSearchDTO storeSearchDTO = new StoreSearchDTO();
storeSearchDTO.setEnterpriseId(enterpriseId);
storeSearchDTO.setRegionId(regionId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment