Commit df21c235 by jinxin

导购code问题修复

parent be88960f
......@@ -234,7 +234,7 @@ public class WxStaffController extends WebBaseController {
List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(wxEnterpriseId,
enterpriseId, clerkCodeList);
Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream()
.collect(Collectors.toMap(StaffClerkRelationDTO::getClerkCode, s -> s));
.collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s));
List<StoreClerkVO> resultList = new ArrayList<>();
for (ClerkDTO dto : clerkDTOS) {
String clerkCode = dto.getClerkCode();
......@@ -244,7 +244,7 @@ public class WxStaffController extends WebBaseController {
vo.setClerkType(dto.getClerkType());
vo.setClerkImg(dto.getImageUrl());
vo.setClerkName(dto.getClerkName());
StaffClerkRelationDTO related = bindCodeMap.get(clerkCode);
StaffClerkRelationDTO related = bindCodeMap.get(dto.getClerkId());
if (related != null) {
vo.setStaffId(related.getStaffId());
vo.setBindFlag(1);
......@@ -1097,13 +1097,13 @@ public class WxStaffController extends WebBaseController {
List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(wxEnterpriseId,
enterpriseId, clerkCodeList);
Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream()
.collect(Collectors.toMap(StaffClerkRelationDTO::getClerkCode, s -> s));
.collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s));
List<BindClerkVO> bindList = new ArrayList<>();
List<BindClerkVO> unBindList = new ArrayList<>();
for (ClerkDTO dto : list) {
BindClerkVO vo = EntityUtil.changeEntityNew(BindClerkVO.class, dto);
if (bindCodeMap.containsKey(dto.getClerkCode())) {
String staffId = bindCodeMap.get(dto.getClerkCode()).getStaffId();
if (bindCodeMap.containsKey(dto.getClerkId())) {
String staffId = bindCodeMap.get(dto.getClerkId()).getStaffId();
StaffDTO staffDTO = staffApiService.selectById(staffId);
vo.setStaffId(staffId);
String phoneNumber = dto.getPhoneNumber();
......@@ -1146,13 +1146,13 @@ public class WxStaffController extends WebBaseController {
List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(wxEnterpriseId,
enterpriseId, clerkCodeList);
Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream()
.collect(Collectors.toMap(StaffClerkRelationDTO::getClerkCode, s -> s));
.collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s));
List<BindClerkVO> bindList = new ArrayList<>();
List<BindClerkVO> unBindList = new ArrayList<>();
for (ClerkDTO dto : list) {
BindClerkVO vo = EntityUtil.changeEntityByJSON(BindClerkVO.class, dto);
if (bindCodeMap.containsKey(dto.getClerkCode())) {
String staffId = bindCodeMap.get(dto.getClerkCode()).getStaffId();
if (bindCodeMap.containsKey(dto.getClerkId())) {
String staffId = bindCodeMap.get(dto.getClerkId()).getStaffId();
StaffDTO staffDTO = staffApiService.selectById(staffId);
vo.setStaffId(staffId);
vo.setNationCode(dto.getNationcode());
......
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