Commit 243df1f6 by 徐高华

导购

parent 5e0bff6f
...@@ -93,6 +93,8 @@ public interface StaffApiService { ...@@ -93,6 +93,8 @@ public interface StaffApiService {
List<String> listBindStaffId(String storeId); List<String> listBindStaffId(String storeId);
List<String> listBindClerkId(String storeId);
List<StaffClerkRelationDTO> listBindRelationUserId(String storeId); List<StaffClerkRelationDTO> listBindRelationUserId(String storeId);
/** /**
......
...@@ -631,6 +631,15 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -631,6 +631,15 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override @Override
public List<String> listBindStaffId(String storeId) { public List<String> listBindStaffId(String storeId) {
return this.listBind(storeId, 1) ;
}
@Override
public List<String> listBindClerkId(String storeId) {
return this.listBind(storeId, 2) ;
}
private List<String> listBind(String storeId , int type) {
List<String> userIdList = new ArrayList<String>(); List<String> userIdList = new ArrayList<String>();
List<String> storeIds = new ArrayList<String>(); List<String> storeIds = new ArrayList<String>();
storeIds.add(storeId); storeIds.add(storeId);
...@@ -639,6 +648,7 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -639,6 +648,7 @@ public class StaffApiServiceImpl implements StaffApiService {
if (CollectionUtils.isEmpty(staffRelationList)) { if (CollectionUtils.isEmpty(staffRelationList)) {
return Collections.EMPTY_LIST; return Collections.EMPTY_LIST;
} }
if(type==1) {
Map<String, StaffClerkRelationDTO> clerkIdMap = staffRelationList.stream().filter(s -> s.getClerkId() != null).collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s)); Map<String, StaffClerkRelationDTO> clerkIdMap = staffRelationList.stream().filter(s -> s.getClerkId() != null).collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s));
Set<String> keySet = clerkIdMap.keySet(); Set<String> keySet = clerkIdMap.keySet();
for (String clerkId : clerkList) { for (String clerkId : clerkList) {
...@@ -646,9 +656,14 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -646,9 +656,14 @@ public class StaffApiServiceImpl implements StaffApiService {
userIdList.add(clerkIdMap.get(clerkId).getStaffId()); userIdList.add(clerkIdMap.get(clerkId).getStaffId());
} }
} }
}
if(type==2) {
userIdList = staffRelationList.stream().filter(s -> s.getClerkId() != null).map(dto->dto.getClerkId()).collect(Collectors.toList());
}
return userIdList; return userIdList;
} }
@Override @Override
public List<StaffClerkRelationDTO> listBindRelationUserId(String storeId) { public List<StaffClerkRelationDTO> listBindRelationUserId(String storeId) {
List<StaffClerkRelationDTO> bindList = new ArrayList<StaffClerkRelationDTO>(); List<StaffClerkRelationDTO> bindList = new ArrayList<StaffClerkRelationDTO>();
......
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