Commit 243df1f6 by 徐高华

导购

parent 5e0bff6f
......@@ -92,6 +92,8 @@ public interface StaffApiService {
void wxFristAdd(String userJson, String wxEnterpriseId);
List<String> listBindStaffId(String storeId);
List<String> listBindClerkId(String storeId);
List<StaffClerkRelationDTO> listBindRelationUserId(String storeId);
......
......@@ -631,6 +631,15 @@ public class StaffApiServiceImpl implements StaffApiService {
@Override
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> storeIds = new ArrayList<String>();
storeIds.add(storeId);
......@@ -639,15 +648,21 @@ public class StaffApiServiceImpl implements StaffApiService {
if (CollectionUtils.isEmpty(staffRelationList)) {
return Collections.EMPTY_LIST;
}
Map<String, StaffClerkRelationDTO> clerkIdMap = staffRelationList.stream().filter(s -> s.getClerkId() != null).collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s));
Set<String> keySet = clerkIdMap.keySet();
for (String clerkId : clerkList) {
if (keySet.contains(clerkId)) {
userIdList.add(clerkIdMap.get(clerkId).getStaffId());
if(type==1) {
Map<String, StaffClerkRelationDTO> clerkIdMap = staffRelationList.stream().filter(s -> s.getClerkId() != null).collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s));
Set<String> keySet = clerkIdMap.keySet();
for (String clerkId : clerkList) {
if (keySet.contains(clerkId)) {
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;
}
@Override
public List<StaffClerkRelationDTO> listBindRelationUserId(String storeId) {
......
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