Commit 93eee90a by 徐高华

tab_haoban_staff_clerk_relation的wxuserid废弃

parent 0d1fd3a7
...@@ -13,8 +13,6 @@ public class StaffClerkRelationDTO implements Serializable { ...@@ -13,8 +13,6 @@ public class StaffClerkRelationDTO implements Serializable {
private String wxEnterpriseId; private String wxEnterpriseId;
private String wxUserId;
private String enterpriseId; private String enterpriseId;
private String storeId; private String storeId;
...@@ -32,9 +30,26 @@ public class StaffClerkRelationDTO implements Serializable { ...@@ -32,9 +30,26 @@ public class StaffClerkRelationDTO implements Serializable {
private String storeName; private String storeName;
private String staffName; private String staffName;
private String wxOpenUserId;
private Integer openConcatFlag; private Integer openConcatFlag;
private String qwUserId ;
private String openUserId ;
public String getQwUserId() {
return qwUserId;
}
public String getOpenUserId() {
return openUserId;
}
public void setQwUserId(String qwUserId) {
this.qwUserId = qwUserId;
}
public void setOpenUserId(String openUserId) {
this.openUserId = openUserId;
}
public String getStaffClerkRelationId() { public String getStaffClerkRelationId() {
return staffClerkRelationId; return staffClerkRelationId;
...@@ -60,14 +75,6 @@ public class StaffClerkRelationDTO implements Serializable { ...@@ -60,14 +75,6 @@ public class StaffClerkRelationDTO implements Serializable {
this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim(); this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim();
} }
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId == null ? null : wxUserId.trim();
}
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
...@@ -140,14 +147,6 @@ public class StaffClerkRelationDTO implements Serializable { ...@@ -140,14 +147,6 @@ public class StaffClerkRelationDTO implements Serializable {
this.staffName = staffName; this.staffName = staffName;
} }
public String getWxOpenUserId() {
return wxOpenUserId;
}
public void setWxOpenUserId(String wxOpenUserId) {
this.wxOpenUserId = wxOpenUserId;
}
public Integer getOpenConcatFlag() { public Integer getOpenConcatFlag() {
if(null == openConcatFlag) { if(null == openConcatFlag) {
return 1 ; return 1 ;
......
...@@ -93,6 +93,8 @@ public interface StaffClerkRelationApiService { ...@@ -93,6 +93,8 @@ public interface StaffClerkRelationApiService {
* @return * @return
*/ */
StaffClerkRelationDTO getByClerkId(String clerkId); StaffClerkRelationDTO getByClerkId(String clerkId);
StaffClerkRelationDTO getByClerkIdForWxUserId(String clerkId);
/** /**
* @param enterpriseId * @param enterpriseId
...@@ -161,14 +163,6 @@ public interface StaffClerkRelationApiService { ...@@ -161,14 +163,6 @@ public interface StaffClerkRelationApiService {
Page<StaffClerkRelationDTO> pageByWxEnterpriseId(String wxEnterpriseId, BasePageInfo pageInfo); Page<StaffClerkRelationDTO> pageByWxEnterpriseId(String wxEnterpriseId, BasePageInfo pageInfo);
/** /**
* 查询状态正常导购
*
* @return
*/
List<StaffClerkRelationDTO> listAll();
/**
* 通过员工id列表 * 通过员工id列表
* *
* @param wxEnterpriseId wx企业标识 * @param wxEnterpriseId wx企业标识
......
...@@ -58,36 +58,18 @@ public interface StaffMapper { ...@@ -58,36 +58,18 @@ public interface StaffMapper {
/** /**
* 通过开放用户id和wx企业id列表 * 通过开放用户id和wx企业id列表
*
* @param openUserIds 开放的用户id
* @param wxEnterpriseId wx企业标识
* @return {@link List<TabHaobanStaff> }
* @author mozhu
* @date 2021-12-21 16:35:35
*/ */
List<TabHaobanStaff> listByOpenUserIdsAndWxEnterpriseId(@Param("openUserIds") List<String> openUserIds, List<TabHaobanStaff> listByOpenUserIdsAndWxEnterpriseId(@Param("openUserIds") List<String> openUserIds,
@Param("wxEnterpriseId") String wxEnterpriseId); @Param("wxEnterpriseId") String wxEnterpriseId);
/** /**
* 用户id wx企业id列表 * 用户id wx企业id列表
*
* @param wxEnterpriseId wx企业标识
* @return {@link List<String> }
* @author mozhu
* @date 2021-12-21 17:05:58
*/ */
List<TabHaobanStaff> listUserIdByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId); List<TabHaobanStaff> listUserIdByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId);
/** /**
* 更新开放用户id,用户id * 更新开放用户id,用户id
*
* @param wxEnterpriseId wx企业标识
* @param wxUserId wx用户id
* @param wxOpenUseId 开放的用户id
* @return int
* @author mozhu
* @date 2021-12-21 17:17:51
*/ */
int updateOpenUserIdsByUserId(@Param("wxEnterpriseId") String wxEnterpriseId, int updateOpenUserIdsByUserId(@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("wxUserId") String wxUserId, @Param("wxUserId") String wxUserId,
...@@ -95,12 +77,6 @@ public interface StaffMapper { ...@@ -95,12 +77,6 @@ public interface StaffMapper {
/** /**
* 选择通过打开用户id和企业标识 * 选择通过打开用户id和企业标识
*
* @param wxOpenUseId wx开放使用id
* @param wxEnterpriseId wx企业标识
* @return {@link TabHaobanStaff }
* @author mozhu
* @date 2021-12-21 21:13:56
*/ */
TabHaobanStaff selectByOpenUserIdAndEnterpriseId(@Param("wxOpenUseId") String wxOpenUseId, TabHaobanStaff selectByOpenUserIdAndEnterpriseId(@Param("wxOpenUseId") String wxOpenUseId,
@Param("wxEnterpriseId") String wxEnterpriseId); @Param("wxEnterpriseId") String wxEnterpriseId);
...@@ -125,12 +101,6 @@ public interface StaffMapper { ...@@ -125,12 +101,6 @@ public interface StaffMapper {
/** /**
* 选择电话号码和企业标识 * 选择电话号码和企业标识
*
* @param phoneNumber 电话号码
* @param wxEnterpriseId wx企业标识
* @return {@link TabHaobanStaff }
* @author mozhu
* @date 2022-01-12 17:20:16
*/ */
TabHaobanStaff selectByPhoneNumberAndEnterpriseId(@Param("phoneNumber") String phoneNumber, TabHaobanStaff selectByPhoneNumberAndEnterpriseId(@Param("phoneNumber") String phoneNumber,
@Param("wxEnterpriseId") String wxEnterpriseId); @Param("wxEnterpriseId") String wxEnterpriseId);
......
...@@ -9,15 +9,11 @@ import java.util.List; ...@@ -9,15 +9,11 @@ import java.util.List;
import java.util.Set; import java.util.Set;
public interface TabHaobanStaffClerkRelationMapper { public interface TabHaobanStaffClerkRelationMapper {
int deleteByPrimaryKey(String staffClerkRelationId);
int insert(TabHaobanStaffClerkRelation record); int insert(TabHaobanStaffClerkRelation record);
TabHaobanStaffClerkRelation selectByPrimaryKey(String staffClerkRelationId); TabHaobanStaffClerkRelation selectByPrimaryKey(String staffClerkRelationId);
int updateByPrimaryKeySelective(TabHaobanStaffClerkRelation record);
List<TabHaobanStaffClerkRelation> listBindCode(@Param("enterpriseId") String enterpriseId, @Param("clerkCodeList") Set<String> clerkCodeList); List<TabHaobanStaffClerkRelation> listBindCode(@Param("enterpriseId") String enterpriseId, @Param("clerkCodeList") Set<String> clerkCodeList);
List<TabHaobanStaffClerkRelation> listBindCodeByStaffId(@Param("enterpriseIdList") List<String> enterpriseIdList, @Param("staffId") String staffId); List<TabHaobanStaffClerkRelation> listBindCodeByStaffId(@Param("enterpriseIdList") List<String> enterpriseIdList, @Param("staffId") String staffId);
...@@ -82,6 +78,8 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -82,6 +78,8 @@ public interface TabHaobanStaffClerkRelationMapper {
TabHaobanStaffClerkRelation getOneBindStoreId(@Param("staffId") String staffId, @Param("storeId") String storeId); TabHaobanStaffClerkRelation getOneBindStoreId(@Param("staffId") String staffId, @Param("storeId") String storeId);
TabHaobanStaffClerkRelation getByClerkId(@Param("clerkId") String clerkId); TabHaobanStaffClerkRelation getByClerkId(@Param("clerkId") String clerkId);
StaffClerkRelationDTO getByClerkIdForWxUserId(@Param("clerkId") String clerkId);
TabHaobanStaffClerkRelation getByClerkIdNoStatus(@Param("clerkId") String clerkId); TabHaobanStaffClerkRelation getByClerkIdNoStatus(@Param("clerkId") String clerkId);
...@@ -99,7 +97,7 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -99,7 +97,7 @@ public interface TabHaobanStaffClerkRelationMapper {
List<TabHaobanStaffClerkRelation> pageByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId); List<TabHaobanStaffClerkRelation> pageByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId);
List<TabHaobanStaffClerkRelation> listBindByStoreId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("storeId") String storeId); List<StaffClerkRelationDTO> listBindByStoreId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("storeId") String storeId);
/** /**
* 授权绑定的列表 * 授权绑定的列表
...@@ -133,16 +131,6 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -133,16 +131,6 @@ public interface TabHaobanStaffClerkRelationMapper {
*/ */
List<TabHaobanStaffClerkRelation> listBindStoreIdByEnterpriseId(String enterpriseId); List<TabHaobanStaffClerkRelation> listBindStoreIdByEnterpriseId(String enterpriseId);
/**
* 列出所有
*
* @return {@link List<TabHaobanStaffClerkRelation> }
* @author xuwenqian
* @date 2021-07-15 16:24:27
*/
List<StaffClerkRelationDTO> listAll();
/** /**
* 查询有关联的员工id列表 * 查询有关联的员工id列表
* *
......
...@@ -12,8 +12,6 @@ public class TabHaobanStaffClerkRelation implements Serializable { ...@@ -12,8 +12,6 @@ public class TabHaobanStaffClerkRelation implements Serializable {
private String wxEnterpriseId; private String wxEnterpriseId;
private String wxUserId;
private String enterpriseId; private String enterpriseId;
private String storeId; private String storeId;
...@@ -54,14 +52,6 @@ public class TabHaobanStaffClerkRelation implements Serializable { ...@@ -54,14 +52,6 @@ public class TabHaobanStaffClerkRelation implements Serializable {
this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim(); this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim();
} }
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId == null ? null : wxUserId.trim();
}
public String getEnterpriseId() { public String getEnterpriseId() {
return enterpriseId; return enterpriseId;
} }
......
...@@ -77,6 +77,8 @@ public interface StaffClerkRelationService { ...@@ -77,6 +77,8 @@ public interface StaffClerkRelationService {
StaffClerkRelationDTO getOneBindByStoreId(String staffId, String storeId); StaffClerkRelationDTO getOneBindByStoreId(String staffId, String storeId);
StaffClerkRelationDTO getByClerkId(String clerkId); StaffClerkRelationDTO getByClerkId(String clerkId);
StaffClerkRelationDTO getByClerkIdForWxUserId(String clerkId);
StaffClerkRelationDTO getByClerkIdNoStatus(String clerkId); StaffClerkRelationDTO getByClerkIdNoStatus(String clerkId);
...@@ -126,15 +128,6 @@ public interface StaffClerkRelationService { ...@@ -126,15 +128,6 @@ public interface StaffClerkRelationService {
List<StaffClerkRelationDTO> listBindStoreIdByEnterpriseId(String enterpriseId); List<StaffClerkRelationDTO> listBindStoreIdByEnterpriseId(String enterpriseId);
/** /**
* 查询所有正常导购
*
* @return {@link List<StaffClerkRelationDTO> }
* @author xuwenqian
* @date 2021-07-15 16:26:17
*/
List<StaffClerkRelationDTO> listAll();
/**
* 查询有关联的员工id列表 * 查询有关联的员工id列表
* *
* @param staffIdList 员工id列表 * @param staffIdList 员工id列表
......
...@@ -249,6 +249,11 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -249,6 +249,11 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
public StaffClerkRelationDTO getByClerkId(String clerkId) { public StaffClerkRelationDTO getByClerkId(String clerkId) {
return EntityUtil.changeEntityByJSON(StaffClerkRelationDTO.class, mapper.getByClerkId(clerkId)); return EntityUtil.changeEntityByJSON(StaffClerkRelationDTO.class, mapper.getByClerkId(clerkId));
} }
@Override
public StaffClerkRelationDTO getByClerkIdForWxUserId(String clerkId) {
return this.mapper.getByClerkIdForWxUserId(clerkId);
}
@Override @Override
public StaffClerkRelationDTO getByClerkIdNoStatus(String clerkId) { public StaffClerkRelationDTO getByClerkIdNoStatus(String clerkId) {
...@@ -302,8 +307,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -302,8 +307,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Override @Override
public List<StaffClerkRelationDTO> listBindByStoreId(String wxEnterpriseId, String storeId) { public List<StaffClerkRelationDTO> listBindByStoreId(String wxEnterpriseId, String storeId) {
List<TabHaobanStaffClerkRelation> ret = mapper.listBindByStoreId(wxEnterpriseId, storeId); return mapper.listBindByStoreId(wxEnterpriseId, storeId);
return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, ret);
} }
@Override @Override
...@@ -316,11 +320,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -316,11 +320,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
} }
@Override @Override
public List<StaffClerkRelationDTO> listAll() {
return mapper.listAll();
}
@Override
public List<String> listRelationsStaffId(Set<String> staffIdList) { public List<String> listRelationsStaffId(Set<String> staffIdList) {
return mapper.listRelationsStaffId(staffIdList); return mapper.listRelationsStaffId(staffIdList);
} }
......
...@@ -102,13 +102,13 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService { ...@@ -102,13 +102,13 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
wxEnterpriseId = haobanStaff != null ? haobanStaff.getWxEnterpriseId() : null; wxEnterpriseId = haobanStaff != null ? haobanStaff.getWxEnterpriseId() : null;
} }
if (StringUtils.isNotEmpty(messageQDTO.getClerkId())) { if (StringUtils.isNotEmpty(messageQDTO.getClerkId())) {
clerkRelationDTO = staffClerkRelationService.getByClerkId(messageQDTO.getClerkId()); clerkRelationDTO = staffClerkRelationService.getByClerkIdForWxUserId(messageQDTO.getClerkId());
} }
if (wxUserId == null && clerkRelationDTO == null) { if (wxUserId == null && clerkRelationDTO == null) {
logger.info("没有导购:{}", messageQDTO.getClerkId()); logger.info("没有导购:{}", messageQDTO.getClerkId());
return; return;
} }
wxUserId = (wxUserId == null ? clerkRelationDTO.getWxUserId() : wxUserId); wxUserId = (wxUserId == null ? clerkRelationDTO.getQwUserId() : wxUserId);
wxEnterpriseId = (wxEnterpriseId == null ? clerkRelationDTO.getWxEnterpriseId() : wxEnterpriseId); wxEnterpriseId = (wxEnterpriseId == null ? clerkRelationDTO.getWxEnterpriseId() : wxEnterpriseId);
//消息组装 新增消息 //消息组装 新增消息
......
...@@ -164,7 +164,6 @@ public class AuditApiServiceImpl implements AuditApiService { ...@@ -164,7 +164,6 @@ public class AuditApiServiceImpl implements AuditApiService {
staffClerkRelation.setClerkId(obj.getClerkId()); staffClerkRelation.setClerkId(obj.getClerkId());
staffClerkRelation.setStoreId(tab.getCommitStoreId()); staffClerkRelation.setStoreId(tab.getCommitStoreId());
staffClerkRelation.setWxEnterpriseId(tab.getWxEnterpriseId()); staffClerkRelation.setWxEnterpriseId(tab.getWxEnterpriseId());
staffClerkRelation.setWxUserId(obj.getWxUserId());
staffClerkRelation.setStaffId(obj.getStaffId()); staffClerkRelation.setStaffId(obj.getStaffId());
staffClerkRelationApiService.delAndInsert(staffClerkRelation, optStaffId, ChannelCodeEnum.AUDIT_BIND.getCode()); staffClerkRelationApiService.delAndInsert(staffClerkRelation, optStaffId, ChannelCodeEnum.AUDIT_BIND.getCode());
} }
......
...@@ -15,6 +15,7 @@ import com.gic.haoban.common.utils.EntityUtil; ...@@ -15,6 +15,7 @@ import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.manage.api.dto.*; import com.gic.haoban.manage.api.dto.*;
import com.gic.haoban.manage.api.enums.*; import com.gic.haoban.manage.api.enums.*;
import com.gic.haoban.manage.api.service.DealSyncOperationApiService; import com.gic.haoban.manage.api.service.DealSyncOperationApiService;
import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import com.gic.haoban.manage.service.entity.*; import com.gic.haoban.manage.service.entity.*;
import com.gic.haoban.manage.service.service.*; import com.gic.haoban.manage.service.service.*;
import com.gic.haoban.manage.service.task.BaseSyncOperation; import com.gic.haoban.manage.service.task.BaseSyncOperation;
...@@ -63,6 +64,8 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ ...@@ -63,6 +64,8 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired
private StaffMapper staffMapper ;
@Autowired @Autowired
private StaffDepartmentRelatedService staffDepartmentRelatedService; private StaffDepartmentRelatedService staffDepartmentRelatedService;
...@@ -613,10 +616,11 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ ...@@ -613,10 +616,11 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
@Override @Override
public void dealWxFriendClerk(String taskId, String wxEnterpriseId) { public void dealWxFriendClerk(String taskId, String wxEnterpriseId) {
List<TabHaobanStaffClerkRelation> relationList = staffClerkRelationService.listByWxEnterpriseId(wxEnterpriseId); //List<TabHaobanStaffClerkRelation> relationList = staffClerkRelationService.listByWxEnterpriseId(wxEnterpriseId);
List<TabHaobanStaff> list = this.staffMapper.listByWxEnterpriseId(wxEnterpriseId) ;
List<TabHaobanClerkMainStoreRelated> mainStoreList = clerkMainStoreRelatedService.listByWxEnterpriseId(wxEnterpriseId); List<TabHaobanClerkMainStoreRelated> mainStoreList = clerkMainStoreRelatedService.listByWxEnterpriseId(wxEnterpriseId);
Map<String, TabHaobanClerkMainStoreRelated> map = mainStoreList.stream().collect(Collectors.toMap(TabHaobanClerkMainStoreRelated::getStaffId, s -> s)); Map<String, TabHaobanClerkMainStoreRelated> map = mainStoreList.stream().collect(Collectors.toMap(TabHaobanClerkMainStoreRelated::getStaffId, s -> s));
List<TabHaobanPreDealLog> dealLogList = relationList.stream().filter(ls -> map.get(ls.getStaffId()) != null).map(dto -> { List<TabHaobanPreDealLog> dealLogList = list.stream().map(dto -> {
TabHaobanPreDealLog dealLog = new TabHaobanPreDealLog(); TabHaobanPreDealLog dealLog = new TabHaobanPreDealLog();
dealLog.setDataId(dto.getWxUserId()); dealLog.setDataId(dto.getWxUserId());
dealLog.setpDataId(dto.getStaffId()); dealLog.setpDataId(dto.getStaffId());
...@@ -685,7 +689,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ ...@@ -685,7 +689,7 @@ public class DealSyncOperationApiServiceImpl implements DealSyncOperationApiServ
} }
List<TabHaobanPreDealLog> dealLogList = clerkRelationDTOS.stream().map(dto -> { List<TabHaobanPreDealLog> dealLogList = clerkRelationDTOS.stream().map(dto -> {
TabHaobanPreDealLog dealLog = new TabHaobanPreDealLog(); TabHaobanPreDealLog dealLog = new TabHaobanPreDealLog();
dealLog.setDataId(dto.getWxUserId()); dealLog.setDataId(dto.getQwUserId());
dealLog.setpDataId(dto.getStaffId()); dealLog.setpDataId(dto.getStaffId());
dealLog.setDataType(PreDealTypeEnum.friend_clerk.getVal()); dealLog.setDataType(PreDealTypeEnum.friend_clerk.getVal());
dealLog.setStatusFlag(0); dealLog.setStatusFlag(0);
......
...@@ -671,7 +671,7 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -671,7 +671,7 @@ public class StaffApiServiceImpl implements StaffApiService {
} }
ClerkDTO clerkDTO = list.get(0); ClerkDTO clerkDTO = list.get(0);
StaffClerkRelationDTO relationDTO = staffClerkRelationService.getByClerkId(clerkDTO.getClerkId()); StaffClerkRelationDTO relationDTO = staffClerkRelationService.getByClerkIdForWxUserId(clerkDTO.getClerkId());
if (relationDTO == null) { if (relationDTO == null) {
logger.info("成员没有关联:{}", clerkCode); logger.info("成员没有关联:{}", clerkCode);
return null; return null;
...@@ -688,7 +688,7 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -688,7 +688,7 @@ public class StaffApiServiceImpl implements StaffApiService {
logger.info("没有配置secret:{}", qwDTO.getWxEnterpriseId()); logger.info("没有配置secret:{}", qwDTO.getWxEnterpriseId());
return null; return null;
} }
UserDTO user = qywxUserApiService.getSelfWorkWxUser(qwDTO.getDkCorpid(), secretSetting.getSecretVal(), relationDTO.getWxUserId()); UserDTO user = qywxUserApiService.getSelfWorkWxUser(qwDTO.getDkCorpid(), secretSetting.getSecretVal(), relationDTO.getQwUserId());
if (user != null) { if (user != null) {
RedisUtil.setCache(key, user.getQr_code(), 2L, TimeUnit.DAYS); RedisUtil.setCache(key, user.getQr_code(), 2L, TimeUnit.DAYS);
resp.setResult(user.getQr_code()); resp.setResult(user.getQr_code());
...@@ -718,7 +718,7 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -718,7 +718,7 @@ public class StaffApiServiceImpl implements StaffApiService {
Set<String> keySet = clerkIdMap.keySet(); Set<String> keySet = clerkIdMap.keySet();
for (String clerkId : clerkList) { for (String clerkId : clerkList) {
if (keySet.contains(clerkId)) { if (keySet.contains(clerkId)) {
userIdList.add(clerkIdMap.get(clerkId).getWxUserId()); userIdList.add(clerkIdMap.get(clerkId).getQwUserId());
} }
} }
return userIdList; return userIdList;
......
package com.gic.haoban.manage.service.service.out.impl; package com.gic.haoban.manage.service.service.out.impl;
import cn.hutool.core.collection.CollectionUtil; import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
...@@ -14,35 +27,40 @@ import com.gic.enterprise.api.service.EnterpriseService; ...@@ -14,35 +27,40 @@ import com.gic.enterprise.api.service.EnterpriseService;
import com.gic.enterprise.api.service.StoreService; import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse; import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.manage.api.dto.*; import com.gic.haoban.manage.api.dto.AuditDTO;
import com.gic.haoban.manage.api.dto.StaffClerkBindLogDetailDTO;
import com.gic.haoban.manage.api.dto.StaffClerkBindLogInfoDTO;
import com.gic.haoban.manage.api.dto.StaffClerkInfoDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO;
import com.gic.haoban.manage.api.dto.qdto.ClerkSyncQDTO; import com.gic.haoban.manage.api.dto.qdto.ClerkSyncQDTO;
import com.gic.haoban.manage.api.enums.AuditType; import com.gic.haoban.manage.api.enums.AuditType;
import com.gic.haoban.manage.api.enums.BindTypeEnum; import com.gic.haoban.manage.api.enums.BindTypeEnum;
import com.gic.haoban.manage.api.enums.ChannelCodeEnum; import com.gic.haoban.manage.api.enums.ChannelCodeEnum;
import com.gic.haoban.manage.api.enums.SecretTypeEnum;
import com.gic.haoban.manage.api.service.AuditApiService; import com.gic.haoban.manage.api.service.AuditApiService;
import com.gic.haoban.manage.api.service.StaffClerkRelationApiService; import com.gic.haoban.manage.api.service.StaffClerkRelationApiService;
import com.gic.haoban.manage.api.service.hm.HmClerkRelationApiService; import com.gic.haoban.manage.api.service.hm.HmClerkRelationApiService;
import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper; import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper;
import com.gic.haoban.manage.service.entity.MemberClerkChatConfig; import com.gic.haoban.manage.service.entity.MemberClerkChatConfig;
import com.gic.haoban.manage.service.entity.TabHaobanStaff; import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkBindLog; import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkBindLog;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation; import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation;
import com.gic.haoban.manage.service.service.*; import com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService;
import com.gic.haoban.manage.service.service.ExternalClerkRelatedService;
import com.gic.haoban.manage.service.service.SecretSettingService;
import com.gic.haoban.manage.service.service.StaffClerkBindLogService;
import com.gic.haoban.manage.service.service.StaffClerkRelationService;
import com.gic.haoban.manage.service.service.StaffService;
import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.service.hm.HmQrcodeService; import com.gic.haoban.manage.service.service.hm.HmQrcodeService;
import com.gic.haoban.manage.service.task.RouterConstant; import com.gic.haoban.manage.service.task.RouterConstant;
import com.gic.haoban.task.api.dto.MqMessageQo; import com.gic.haoban.task.api.dto.MqMessageQo;
import com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO; import com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO;
import com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactResultDTO;
import com.gic.wechat.api.service.qywx.QywxUserApiService; import com.gic.wechat.api.service.qywx.QywxUserApiService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*; import cn.hutool.core.collection.CollectionUtil;
import java.util.stream.Collectors;
@Service @Service
public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiService { public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiService {
...@@ -79,6 +97,8 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -79,6 +97,8 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
private HmClerkRelationApiService hmClerkRelationApiService; private HmClerkRelationApiService hmClerkRelationApiService;
@Autowired @Autowired
private HmQrcodeService hmQrcodeService ; private HmQrcodeService hmQrcodeService ;
@Autowired
private Config config ;
@Override @Override
public void bindLogMq(String params) { public void bindLogMq(String params) {
...@@ -251,6 +271,11 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -251,6 +271,11 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
StaffClerkRelationDTO staffRelation = staffClerkRelationService.getByClerkId(clerkId); StaffClerkRelationDTO staffRelation = staffClerkRelationService.getByClerkId(clerkId);
return staffRelation; return staffRelation;
} }
@Override
public StaffClerkRelationDTO getByClerkIdForWxUserId(String clerkId) {
return staffClerkRelationService.getByClerkIdForWxUserId(clerkId);
}
@Override @Override
public StaffClerkRelationDTO getOneByStoreIdAndStaffId(String storeId, public StaffClerkRelationDTO getOneByStoreIdAndStaffId(String storeId,
...@@ -377,7 +402,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -377,7 +402,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override @Override
public ServiceResponse<String> getClerkMemberChatConfig(String clerkId) { public ServiceResponse<String> getClerkMemberChatConfig(String clerkId) {
ServiceResponse response = new ServiceResponse(); ServiceResponse response = new ServiceResponse();
StaffClerkRelationDTO relationDTO = staffClerkRelationService.getByClerkId(clerkId); StaffClerkRelationDTO relationDTO = staffClerkRelationService.getByClerkIdForWxUserId(clerkId);
if (null == relationDTO) { if (null == relationDTO) {
logger.info("导购没有关联企业微信:{}", clerkId); logger.info("导购没有关联企业微信:{}", clerkId);
response.setCode(2); response.setCode(2);
...@@ -396,20 +421,17 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -396,20 +421,17 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
send.setScene(1); send.setScene(1);
send.setRemark("导购:" + relationDTO.getClerkCode()); send.setRemark("导购:" + relationDTO.getClerkCode());
List<String> userIds = new ArrayList<>(); List<String> userIds = new ArrayList<>();
userIds.add(relationDTO.getWxUserId());
send.setUser(userIds); send.setUser(userIds);
SecretSettingDTO secretSetting = secretSettingService.getSecretSetting(relationDTO.getWxEnterpriseId(), SecretTypeEnum.CUSTOMIZED_APP.getVal());
if (null == secretSetting || secretSetting.getCheckFlag() == 0) {
logger.info("没有配置secret:{}", relationDTO.getWxEnterpriseId());
response.setCode(3);
response.setMessage("企业微信配置异常");
return response;
}
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(relationDTO.getWxEnterpriseId()) ; WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(relationDTO.getWxEnterpriseId()) ;
String configId = qywxUserApiService.getSelfExternalcontactByUserId(qwDTO.getDkCorpid() , secretSetting.getSecretVal(), send); if(qwDTO.needOpenUserId3th()) {
logger.info("configId:{}", configId); userIds.add(relationDTO.getOpenUserId()) ;
}else {
userIds.add(relationDTO.getQwUserId()) ;
}
QywxExternalcontactResultDTO configResp = qywxUserApiService.addContactWay(qwDTO.getDkCorpid() , config.getWxSuiteid() , send);
logger.info("configId:{}", JSON.toJSONString(configResp));
String configId = configResp.getConfig_id() ;
if (StringUtils.isBlank(configId)) { if (StringUtils.isBlank(configId)) {
logger.info("staff:{}", configId, JSONObject.toJSONString(relationDTO)); logger.info("staff:{}", configId, JSONObject.toJSONString(relationDTO));
response.setCode(4); response.setCode(4);
...@@ -433,11 +455,6 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -433,11 +455,6 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
} }
@Override @Override
public List<StaffClerkRelationDTO> listAll() {
return staffClerkRelationService.listAll();
}
@Override
public List<StaffClerkRelationDTO> listByStaffId(String wxEnterpriseId,String staffId) { public List<StaffClerkRelationDTO> listByStaffId(String wxEnterpriseId,String staffId) {
return staffClerkRelationService.listByStaffId(wxEnterpriseId,staffId); return staffClerkRelationService.listByStaffId(wxEnterpriseId,staffId);
} }
......
...@@ -551,12 +551,9 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService { ...@@ -551,12 +551,9 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
logger.error("该导购已经在该多人活码中,clerkId:{}", clerkId); logger.error("该导购已经在该多人活码中,clerkId:{}", clerkId);
continue; continue;
} }
StaffClerkRelationDTO clerkRelationDTO = staffClerkRelationService.getByClerkId(clerkId);
HmClerkRelationQDTO hmClerkRelationQDTO = new HmClerkRelationQDTO(); HmClerkRelationQDTO hmClerkRelationQDTO = new HmClerkRelationQDTO();
hmClerkRelationQDTO.setRelationId(UniqueIdUtils.uniqueLong()); hmClerkRelationQDTO.setRelationId(UniqueIdUtils.uniqueLong());
hmClerkRelationQDTO.setHmId(hmId); hmClerkRelationQDTO.setHmId(hmId);
hmClerkRelationQDTO.setWxUserId(clerkRelationDTO.getWxUserId());
hmClerkRelationQDTO.setWxEnterpriseId(wxEnterpriseId); hmClerkRelationQDTO.setWxEnterpriseId(wxEnterpriseId);
hmClerkRelationQDTO.setEnterpriseId(enterpriseId); hmClerkRelationQDTO.setEnterpriseId(enterpriseId);
hmClerkRelationQDTO.setClerkId(clerkId); hmClerkRelationQDTO.setClerkId(clerkId);
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<id column="staff_clerk_relation_id" property="staffClerkRelationId" jdbcType="VARCHAR"/> <id column="staff_clerk_relation_id" property="staffClerkRelationId" jdbcType="VARCHAR"/>
<result column="staff_id" property="staffId" jdbcType="VARCHAR"/> <result column="staff_id" property="staffId" jdbcType="VARCHAR"/>
<result column="wx_enterprise_id" property="wxEnterpriseId" jdbcType="VARCHAR"/> <result column="wx_enterprise_id" property="wxEnterpriseId" jdbcType="VARCHAR"/>
<result column="wx_user_id" property="wxUserId" jdbcType="VARCHAR"/>
<result column="enterprise_id" property="enterpriseId" jdbcType="VARCHAR"/> <result column="enterprise_id" property="enterpriseId" jdbcType="VARCHAR"/>
<result column="store_id" property="storeId" jdbcType="VARCHAR"/> <result column="store_id" property="storeId" jdbcType="VARCHAR"/>
<result column="clerk_id" property="clerkId" jdbcType="VARCHAR"/> <result column="clerk_id" property="clerkId" jdbcType="VARCHAR"/>
...@@ -16,7 +15,7 @@ ...@@ -16,7 +15,7 @@
<result column="open_concat_flag" property="openConcatFlag" jdbcType="INTEGER"/> <result column="open_concat_flag" property="openConcatFlag" jdbcType="INTEGER"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
staff_clerk_relation_id, staff_id, wx_enterprise_id, wx_user_id, enterprise_id, store_id, staff_clerk_relation_id, staff_id, wx_enterprise_id, enterprise_id, store_id,
clerk_id, clerk_code, status_flag, create_time, update_time,open_concat_flag clerk_id, clerk_code, status_flag, create_time, update_time,open_concat_flag
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
...@@ -25,11 +24,7 @@ ...@@ -25,11 +24,7 @@
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR} where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete
from tab_haoban_staff_clerk_relation
where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation"> <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation">
insert into tab_haoban_staff_clerk_relation (staff_clerk_relation_id, staff_id, wx_enterprise_id, insert into tab_haoban_staff_clerk_relation (staff_clerk_relation_id, staff_id, wx_enterprise_id,
wx_user_id, enterprise_id, store_id, wx_user_id, enterprise_id, store_id,
...@@ -42,46 +37,6 @@ ...@@ -42,46 +37,6 @@
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{openConcatFlag}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{openConcatFlag})
</insert> </insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation">
update tab_haoban_staff_clerk_relation
<set>
<if test="staffId != null">
staff_id = #{staffId,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="wxUserId != null">
wx_user_id = #{wxUserId,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if test="storeId != null">
store_id = #{storeId,jdbcType=VARCHAR},
</if>
<if test="clerkId != null">
clerk_id = #{clerkId,jdbcType=VARCHAR},
</if>
<if test="clerkCode != null">
clerk_code = #{clerkCode,jdbcType=VARCHAR},
</if>
<if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="openConcatFlag != null">
open_concat_flag = #{openConcatFlag},
</if>
</set>
where staff_clerk_relation_id = #{staffClerkRelationId,jdbcType=VARCHAR}
</update>
<select id="listBindCode" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="listBindCode" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
...@@ -173,7 +128,8 @@ ...@@ -173,7 +128,8 @@
a.clerk_id clerkId, a.clerk_id clerkId,
a.clerk_code clerkCode, a.clerk_code clerkCode,
a.status_flag statusFlag, a.status_flag statusFlag,
b.wx_open_user_id wxOpenUserId b.wx_open_user_id openUserId ,
b.wx_user_id qwUserId
from tab_haoban_staff_clerk_relation a from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on b.staff_id = a.staff_id left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.status_flag=1 where a.status_flag=1
...@@ -241,6 +197,25 @@ ...@@ -241,6 +197,25 @@
where clerk_id = #{clerkId,jdbcType=VARCHAR} where clerk_id = #{clerkId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
</select> </select>
<select id="getByClerkIdForWxUserId" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO" parameterType="java.lang.String">
select
a.staff_clerk_relation_id staffClerkRelationId,
a.staff_id staffId,
a.wx_enterprise_id wxEnterpriseId,
a.enterprise_id enterpriseId,
a.store_id storeId,
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
b.wx_user_id qwUserId ,
b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.clerk_id = #{clerkId,jdbcType=VARCHAR} and a.status_flag=1
</select>
<select id="getByClerkIdNoStatus" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="getByClerkIdNoStatus" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
...@@ -319,11 +294,21 @@ ...@@ -319,11 +294,21 @@
</select> </select>
<select id="listBindByStoreId" resultMap="BaseResultMap"> <select id="listBindByStoreId" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List"/> a.staff_clerk_relation_id staffClerkRelationId,
from tab_haoban_staff_clerk_relation a.staff_id staffId,
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} a.wx_enterprise_id wxEnterpriseId,
and store_id=#{storeId} a.enterprise_id enterpriseId,
and status_flag =1 a.store_id storeId,
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
b.wx_user_id qwUserId ,
b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and a.store_id=#{storeId}
and a.status_flag =1
</select> </select>
<select id="listBindByStoreIds" resultMap="BaseResultMap"> <select id="listBindByStoreIds" resultMap="BaseResultMap">
...@@ -376,20 +361,6 @@ ...@@ -376,20 +361,6 @@
group by store_id group by store_id
</select> </select>
<select id="listAll" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO">
SELECT a.store_id storeId,
a.wx_enterprise_id wxEnterpriseId,
a.enterprise_id enterpriseId,
a.wx_user_id wxUserId,
a.staff_id staffId,
a.clerk_id clerkId,
b.staff_name staffName,
b.wx_open_user_id wxOpenUserId
FROM tab_haoban_staff_clerk_relation a
LEFT JOIN tab_haoban_staff b ON b.staff_id = a.staff_id
WHERE a.status_flag = 1
GROUP BY a.staff_id
</select>
<select id="listRelationsStaffId" resultType="java.lang.String"> <select id="listRelationsStaffId" resultType="java.lang.String">
select staff_id select staff_id
......
...@@ -385,7 +385,7 @@ public class StaffController extends WebBaseController { ...@@ -385,7 +385,7 @@ public class StaffController extends WebBaseController {
relationDTO.setEnterpriseId(clerkDTO.getEnterpriseId()); relationDTO.setEnterpriseId(clerkDTO.getEnterpriseId());
relationDTO.setStoreId(clerkDTO.getStoreId()); relationDTO.setStoreId(clerkDTO.getStoreId());
relationDTO.setWxEnterpriseId(staffDTO.getWxEnterpriseId()); relationDTO.setWxEnterpriseId(staffDTO.getWxEnterpriseId());
relationDTO.setWxUserId(staffDTO.getWxUserId()); // relationDTO.setWxUserId(staffDTO.getWxUserId());
ServiceResponse response = staffClerkRelationApiService.bindStaffClerk(relationDTO, login.getClerkId(), ChannelCodeEnum.ADMIN_BIND.getCode()); ServiceResponse response = staffClerkRelationApiService.bindStaffClerk(relationDTO, login.getClerkId(), ChannelCodeEnum.ADMIN_BIND.getCode());
......
...@@ -274,7 +274,7 @@ public class AuditController extends WebBaseController { ...@@ -274,7 +274,7 @@ public class AuditController extends WebBaseController {
staffClerkRelation.setClerkId(clerkId); staffClerkRelation.setClerkId(clerkId);
staffClerkRelation.setStoreId(storeId); staffClerkRelation.setStoreId(storeId);
staffClerkRelation.setWxEnterpriseId(wxEnterpriseId); staffClerkRelation.setWxEnterpriseId(wxEnterpriseId);
staffClerkRelation.setWxUserId(wxUserId); // staffClerkRelation.setWxUserId(wxUserId);
staffClerkRelation.setStaffId(auditStaffId); staffClerkRelation.setStaffId(auditStaffId);
staffClerkRelationApiService.delAndInsert(staffClerkRelation, staffId, ChannelCodeEnum.AUDIT_BIND.getCode()); staffClerkRelationApiService.delAndInsert(staffClerkRelation, staffId, ChannelCodeEnum.AUDIT_BIND.getCode());
audit.setAuditStatus(1); audit.setAuditStatus(1);
......
...@@ -832,7 +832,7 @@ public class ClerkController extends WebBaseController { ...@@ -832,7 +832,7 @@ public class ClerkController extends WebBaseController {
staffClerkRelation.setStoreId(clerk.getStoreId()); staffClerkRelation.setStoreId(clerk.getStoreId());
staffClerkRelation.setEnterpriseId(clerk.getEnterpriseId()); staffClerkRelation.setEnterpriseId(clerk.getEnterpriseId());
staffClerkRelation.setWxEnterpriseId(wxEnterpriseId); staffClerkRelation.setWxEnterpriseId(wxEnterpriseId);
staffClerkRelation.setWxUserId(wxUserId); // staffClerkRelation.setWxUserId(wxUserId);
staffClerkRelation.setStaffId(staffId); staffClerkRelation.setStaffId(staffId);
staffClerkRelationApiService.delAndInsert(staffClerkRelation, staffId, ChannelCodeEnum.SELF_BIND.getCode()); staffClerkRelationApiService.delAndInsert(staffClerkRelation, staffId, ChannelCodeEnum.SELF_BIND.getCode());
...@@ -1031,7 +1031,7 @@ public class ClerkController extends WebBaseController { ...@@ -1031,7 +1031,7 @@ public class ClerkController extends WebBaseController {
if (staffRelation == null) { if (staffRelation == null) {
return resultResponse(HaoBanErrCode.ERR_10006); return resultResponse(HaoBanErrCode.ERR_10006);
} }
staffApiService.wxGetAdd(staffRelation.getWxUserId(), wxEnterpriseId); // staffApiService.wxGetAdd(staffRelation.getWxUserId(), wxEnterpriseId);
String staffId = staffRelation.getStaffId(); String staffId = staffRelation.getStaffId();
StaffDTO staff = staffApiService.selectById(staffId); StaffDTO staff = staffApiService.selectById(staffId);
if (staff == null) { if (staff == null) {
......
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