Commit a0c22666 by zhiwj

导购添加接口

parent 9dd2ed8c
......@@ -221,6 +221,19 @@ public interface ClerkApiService {
ServiceResponse<List<ClerkDTO>> listClerkByStoreInfoId(Integer enterpriseId, Integer storeInfoId, String search);
/**
* listClerkByStoreInfoId
* @Title: listClerkByStoreInfoId
* @Description:
* @author zhiwj
* @param enterpriseId
* @param storeInfoIdList
* @param search
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.store.dto.ClerkDTO>>
* @throws
*/
ServiceResponse<List<ClerkDTO>> listClerkByStoreInfoIdList(Integer enterpriseId, List<Integer> storeInfoIdList, String search);
/**
* pageClerkByStoreInfoId
* @Title: pageClerkByStoreInfoId
* @Description:
......
......@@ -99,8 +99,10 @@ public class ClerkServiceImpl implements ClerkService {
}
@Override
public List<TabClerk> listClerkByStoreInfoId(Integer enterpriseId, List<Integer> storeInfoIds, String search) {
return tabClerkMapper.listClerkByStoreInfoId(enterpriseId, storeInfoIds, null, search, null, 1);
public List<TabClerk> listClerkByStoreInfoId(Integer enterpriseId, List<Integer> storeInfoIdList, String search) {
// list 如果太大, 让 mybatis 解析 会打满内存
String storeInfoIds = storeInfoIdList.stream().map(Object::toString).collect(Collectors.joining(","));
return tabClerkMapper.listClerkByStoreInfoId(enterpriseId, null, "(" + storeInfoIds + ")", search, null, 1);
}
@Override
......@@ -109,8 +111,9 @@ public class ClerkServiceImpl implements ClerkService {
}
@Override
public List<TabClerk> listClerkByStoreInfoId(Integer enterpriseId, List<Integer> storeInfoIds, String search, Integer clerkType) {
return tabClerkMapper.listClerkByStoreInfoId(enterpriseId, storeInfoIds, null, search, clerkType, null);
public List<TabClerk> listClerkByStoreInfoId(Integer enterpriseId, List<Integer> storeInfoIdList, String search, Integer clerkType) {
String storeInfoIds = storeInfoIdList.stream().map(Object::toString).collect(Collectors.joining(","));
return tabClerkMapper.listClerkByStoreInfoId(enterpriseId, null, "(" + storeInfoIds + ")", search, clerkType, null);
}
@Override
......
......@@ -543,6 +543,12 @@ public class ClerkApiServiceImpl implements ClerkApiService {
}
@Override
public ServiceResponse<List<ClerkDTO>> listClerkByStoreInfoIdList(Integer enterpriseId, List<Integer> storeInfoIdList, String search) {
List<TabClerk> clerkList = this.clerkService.listClerkByStoreInfoId(enterpriseId, storeInfoIdList, search);
return ServiceResponse.success(EntityUtil.changeEntityListByJSON(ClerkDTO.class, clerkList));
}
@Override
public ServiceResponse<Page<ClerkDTO>> pageClerkByStoreInfoId(Integer enterpriseId, Integer storeInfoId, String search, Integer pageNum, Integer pageSize) {
List<Integer> storeInfoIds = new ArrayList<>();
storeInfoIds.add(storeInfoId);
......
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