Commit c7c94b82 by 徐高华

test

parent 037add80
...@@ -31,6 +31,7 @@ import com.gic.haoban.manage.service.service.*; ...@@ -31,6 +31,7 @@ import com.gic.haoban.manage.service.service.*;
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.redis.data.util.RedisUtil;
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.dto.qywx.welcome.QywxExternalcontactResultDTO;
import com.gic.wechat.api.service.qywx.QywxUserApiService; import com.gic.wechat.api.service.qywx.QywxUserApiService;
...@@ -524,18 +525,32 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -524,18 +525,32 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
} }
} }
} }
// 导购门店转移
private void moveOrAddClerk(ClerkSyncQDTO clerkSyncQDTO, StaffClerkRelationDTO oldRelationDTO) { private void moveOrAddClerk(ClerkSyncQDTO clerkSyncQDTO, StaffClerkRelationDTO oldRelationDTO) {
//正常的时候 boolean flag = false ;
String oldClerkId = oldRelationDTO.getClerkId(); if(null != RedisUtil.getCache("clerkMoveFlag2022")) {
this.staffClerkRelationService.delBind(oldClerkId, "-1", ChannelCodeEnum.SYNC_UNBIND.getCode(), clerkSyncQDTO.getClerkId()); flag = true ;
oldRelationDTO.setClerkId(clerkSyncQDTO.getClerkId()); }
oldRelationDTO.setStoreId(clerkSyncQDTO.getStoreId()); if(flag) {
ServiceResponse response = this.bindCheck(oldRelationDTO, "-1", ChannelCodeEnum.SYNC_BIND.getCode()) ;// this.bindStaffClerk(oldRelationDTO, "-1", ChannelCodeEnum.SYNC_BIND.getCode()); String oldClerkId = oldRelationDTO.getClerkId();
logger.info("绑定结果正常:{},{}", JSONObject.toJSONString(response), oldRelationDTO.getClerkId()); this.staffClerkRelationService.delBind(oldClerkId, "-1", ChannelCodeEnum.SYNC_UNBIND.getCode(), clerkSyncQDTO.getClerkId());
if(response==null) { // 设置新的ID
this.staffClerkRelationService.insert(oldRelationDTO) ; oldRelationDTO.setClerkId(clerkSyncQDTO.getClerkId());
oldRelationDTO.setStoreId(clerkSyncQDTO.getStoreId());
ServiceResponse response = this.bindCheck(oldRelationDTO, "-1", ChannelCodeEnum.SYNC_BIND.getCode()) ;
logger.info("绑定结果正常:{},{}", JSONObject.toJSONString(response), oldRelationDTO.getClerkId());
if(response==null) {
this.staffClerkRelationService.insert(oldRelationDTO) ;
}
}else {
String oldClerkId = oldRelationDTO.getClerkId();
this.staffClerkRelationService.delBind(oldClerkId, "-1", ChannelCodeEnum.SYNC_UNBIND.getCode(), null);
// 设置新的ID
oldRelationDTO.setClerkId(clerkSyncQDTO.getClerkId());
oldRelationDTO.setStoreId(clerkSyncQDTO.getStoreId());
ServiceResponse resp = this.bindStaffClerk(oldRelationDTO, "-1", ChannelCodeEnum.SYNC_BIND.getCode());
logger.info("绑定结果正常:{},{}", JSONObject.toJSONString(resp), oldRelationDTO.getClerkId());
} }
} }
......
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