Commit df21c235 by jinxin

导购code问题修复

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