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;
...@@ -525,18 +526,32 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -525,18 +526,32 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
} }
} }
// 导购门店转移
private void moveOrAddClerk(ClerkSyncQDTO clerkSyncQDTO, StaffClerkRelationDTO oldRelationDTO) { private void moveOrAddClerk(ClerkSyncQDTO clerkSyncQDTO, StaffClerkRelationDTO oldRelationDTO) {
//正常的时候 boolean flag = false ;
if(null != RedisUtil.getCache("clerkMoveFlag2022")) {
flag = true ;
}
if(flag) {
String oldClerkId = oldRelationDTO.getClerkId(); String oldClerkId = oldRelationDTO.getClerkId();
this.staffClerkRelationService.delBind(oldClerkId, "-1", ChannelCodeEnum.SYNC_UNBIND.getCode(), clerkSyncQDTO.getClerkId()); this.staffClerkRelationService.delBind(oldClerkId, "-1", ChannelCodeEnum.SYNC_UNBIND.getCode(), clerkSyncQDTO.getClerkId());
// 设置新的ID
oldRelationDTO.setClerkId(clerkSyncQDTO.getClerkId()); oldRelationDTO.setClerkId(clerkSyncQDTO.getClerkId());
oldRelationDTO.setStoreId(clerkSyncQDTO.getStoreId()); oldRelationDTO.setStoreId(clerkSyncQDTO.getStoreId());
ServiceResponse response = this.bindCheck(oldRelationDTO, "-1", ChannelCodeEnum.SYNC_BIND.getCode()) ;// this.bindStaffClerk(oldRelationDTO, "-1", ChannelCodeEnum.SYNC_BIND.getCode()); ServiceResponse response = this.bindCheck(oldRelationDTO, "-1", ChannelCodeEnum.SYNC_BIND.getCode()) ;
logger.info("绑定结果正常:{},{}", JSONObject.toJSONString(response), oldRelationDTO.getClerkId()); logger.info("绑定结果正常:{},{}", JSONObject.toJSONString(response), oldRelationDTO.getClerkId());
if(response==null) { if(response==null) {
this.staffClerkRelationService.insert(oldRelationDTO) ; 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());
}
} }
@Override @Override
......
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