Commit 942a3025 by guojuxing

导购列表查询支持联合商户查询

parent 2727ce27
......@@ -91,7 +91,7 @@ public interface ClerkService {
* @Title: listClerkByStoreInfoId
* @Description: 查询下导购列表
* @author zhiwj
* @param enterpriseId 企业id
* @param enterpriseId 企业id 弃用
* @param storeInfoIds 门店ids
* @param search 查询条件:clerkName or clerkCode
* @return java.util.List<com.gic.store.entity.TabClerk>
......@@ -104,7 +104,7 @@ public interface ClerkService {
* @Title: listClerkByStoreInfoId
* @Description:
* @author zhiwj
* @param enterpriseId
* @param enterpriseId 弃用
* @param storeInfoIds
* @param search
* @return java.util.List<com.gic.store.entity.TabClerk>
......@@ -127,7 +127,7 @@ public interface ClerkService {
/**
* listClerkByStoreInfoId
* @param enterpriseId
* @param enterpriseId 弃用
* @param storeInfoIds
* @param search
* @return
......@@ -189,7 +189,7 @@ public interface ClerkService {
* @Title: listClerkByIds
* @Description:
* @author zhiwj
* @param enterpriseId
* @param enterpriseId 弃用
* @param clerkIds
* @return java.util.List<com.gic.store.entity.TabClerk>
* @throws
......@@ -248,7 +248,7 @@ public interface ClerkService {
* @Title: getClerkLeaderByStoreInfoId
* @Description:
* @author zhiwj
* @param enterpriseId
* @param enterpriseId 弃用
* @param storeInfoId
* @return com.gic.store.entity.TabClerk
* @throws
......
......@@ -414,7 +414,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
//前端勾选的门店数据
storeInfoIds.retainAll(clerkSearchDTO.getStoreInfoIdParamList(null));
}
//enterpriseId弃用
List<TabClerk> clerkList = clerkService.listClerkByStoreInfoId(enterpriseId, storeInfoIds,
clerkSearchDTO);
Map<Integer, List<TabClerk>> storeIdMap = CollectionUtil.group(clerkList, "storeInfoId");
......@@ -637,7 +637,20 @@ public class ClerkApiServiceImpl implements ClerkApiService {
@Override
public ServiceResponse<List<ClerkDTO>> listClerk(Integer enterpriseId, String search) {
List<TabClerk> clerkList = this.clerkService.listClerkByStoreInfoId(enterpriseId, search);
ClerkSearchDTO clerkSearchDTO = new ClerkSearchDTO();
clerkSearchDTO.setEnterpriseId(enterpriseId);
ServiceResponse<Page<StoreDTO>> serviceResponse = listStoreIds(clerkSearchDTO, 1, Integer.MAX_VALUE);
if (!serviceResponse.isSuccess()) {
return ServiceResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
Page<StoreDTO> page = serviceResponse.getResult();
List<StoreDTO> storeList = page.getResult();
if (CollectionUtils.isEmpty(storeList)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "没有门店数据");
}
List<TabClerk> clerkList = this.clerkService.listClerkByStoreInfoId(enterpriseId,
storeList.stream().mapToInt(e -> e.getStoreInfoId()).boxed().collect(Collectors.toList()),
null, search);
return ServiceResponse.success(EntityUtil.changeEntityListByJSON(ClerkDTO.class, clerkList));
}
......
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