Commit b648137d by 墨竹

Merge remote-tracking branch 'origin/developer' into developer

parents 70da973e 8f115741
package com.gic.haoban.manage.api.dto;
import java.io.Serializable;
/**
* desc:员工导购id与导购wxUserId实体
*
* @author: YongEn
* @date: 2021/11/11
**/
public class ClerkStaffWxUserDTO implements Serializable {
private static final long serialVersionUID = -5124016907535027993L;
/**
* 导购员工的外部联系人id-wxUserId
*/
private String staffWxUserId;
/**
* 员工导购id
*/
private String staffClerkId;
public ClerkStaffWxUserDTO() {
}
public ClerkStaffWxUserDTO(String staffWxUserId, String staffClerkId) {
this.staffWxUserId = staffWxUserId;
this.staffClerkId = staffClerkId;
}
public String getStaffWxUserId() {
return staffWxUserId;
}
public void setStaffWxUserId(String staffWxUserId) {
this.staffWxUserId = staffWxUserId;
}
public String getStaffClerkId() {
return staffClerkId;
}
public void setStaffClerkId(String staffClerkId) {
this.staffClerkId = staffClerkId;
}
}
......@@ -3,6 +3,7 @@ package com.gic.haoban.manage.api.service;
import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.manage.api.dto.ClerkStaffWxUserDTO;
import com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO;
import com.gic.haoban.manage.api.dto.ExternalClerkRelatedShortInfoDTO;
......@@ -170,6 +171,6 @@ public interface ExternalClerkRelatedApiService {
* @return map:key-会员id value-导购的wxUserId
* @author: YongEn
*/
Map<String, List<String>> listMemberStaffRel(List<String> memberIdList, List<String> clerkIdList, String enterpriseId);
Map<String, List<ClerkStaffWxUserDTO>> listMemberStaffRel(List<String> memberIdList, List<String> clerkIdList, String enterpriseId);
}
......@@ -18,6 +18,10 @@ public class MemberStaffRelExtDO implements Serializable {
* 导购员工的外部联系人id-wxUserId
*/
private String staffWxUserId;
/**
* 员工导购id
*/
private String staffClerkId;
public String getMemberId() {
return memberId;
......@@ -34,4 +38,21 @@ public class MemberStaffRelExtDO implements Serializable {
public void setStaffWxUserId(String staffWxUserId) {
this.staffWxUserId = staffWxUserId;
}
public String getStaffClerkId() {
return staffClerkId;
}
public void setStaffClerkId(String staffClerkId) {
this.staffClerkId = staffClerkId;
}
@Override
public String toString() {
return "MemberStaffRelExtDO{" +
"memberId='" + memberId + '\'' +
", staffWxUserId='" + staffWxUserId + '\'' +
", staffClerkId='" + staffClerkId + '\'' +
'}';
}
}
......@@ -10,6 +10,7 @@ import com.gic.haoban.app.customer.enums.QywxSyncTaskTypeEnum;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.dto.ClerkStaffWxUserDTO;
import com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO;
import com.gic.haoban.manage.api.dto.ExternalClerkRelatedShortInfoDTO;
import com.gic.haoban.manage.api.service.ExternalClerkRelatedApiService;
......@@ -258,7 +259,7 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
}
@Override
public Map<String, List<String>> listMemberStaffRel(List<String> memberIdList, List<String> clerkIdList, String enterpriseId) {
public Map<String, List<ClerkStaffWxUserDTO>> listMemberStaffRel(List<String> memberIdList, List<String> clerkIdList, String enterpriseId) {
if (CollectionUtils.isEmpty(memberIdList) || CollectionUtils.isEmpty(clerkIdList)) {
// 2个列表都为空查不了关系
return Collections.emptyMap();
......@@ -271,9 +272,9 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
// key-memberId
MemberStaffRelExtDO::getMemberId,
// value-list
e -> new ArrayList<>(Collections.singletonList(e.getStaffWxUserId())),
e -> new ArrayList<>(Collections.singletonList(new ClerkStaffWxUserDTO(e.getStaffWxUserId(), e.getStaffClerkId()))),
// 重复key的value添加到集合
(List<String> oldList, List<String> newList) -> {
(List<ClerkStaffWxUserDTO> oldList, List<ClerkStaffWxUserDTO> newList) -> {
oldList.addAll(newList);
return oldList;
}));
......
......@@ -465,9 +465,11 @@
<select id="listMemberStaffRel" resultType="com.gic.haoban.manage.service.entity.ext.MemberStaffRelExtDO">
select ecr.member_id as memberId,
scr.wx_user_id as staffWxUserId
scr.wx_user_id as staffWxUserId,
scr.clerk_id as staffClerkId
from (select staff_id,
wx_user_id
wx_user_id,
clerk_id
from tab_haoban_staff_clerk_relation
where clerk_id in
<foreach collection="clerkIdList" item="item" separator="," open="(" close=")">
......
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