Commit 71fa2870 by 墨竹

feat:导购门店转移

parent 326fabdc
......@@ -185,4 +185,15 @@ public interface StaffClerkRelationApiService {
*/
List<StaffClerkRelationDTO> listClerkIdConcatFlagByClerkIds(List<String> clerkIds,String wxEnterpriseId);
/**
* 导购门店转移
* clerkStoreMoveMq
*
* @param param 参数
* @author mozhu
* @date 2022-07-12 18:57:15
*/
void clerkStoreMove(String param);
}
package com.gic.haoban.manage.api.service;
import java.util.List;
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.*;
import java.util.List;
public interface WxEnterpriseRelatedApiService {
/**
......@@ -48,6 +48,7 @@ public interface WxEnterpriseRelatedApiService {
/**
* 异步刷新门店
* "routerName": "flushHaobanBindStoreMq"
*
* @param message
*/
......
package com.gic.haoban.manage.service.pojo;
import com.gic.binlog.base.entity.enums.GicRecordType;
import java.io.Serializable;
/**
......@@ -10,6 +8,8 @@ import java.io.Serializable;
* @author hua
*/
public class BinlogBasePojo implements Serializable {
private static final long serialVersionUID = 508165278619116309L;
protected int recordType;
protected String prefix;
......
......@@ -466,4 +466,10 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
public List<StaffClerkRelationDTO> listClerkIdConcatFlagByClerkIds(List<String> clerkIds, String wxEnterpriseId) {
return staffClerkRelatinService.listClerkIdConcatFlagByClerkIds(clerkIds, wxEnterpriseId);
}
@Override
public void clerkStoreMove(String param) {
// TODO: 2022/7/13 导购门店转移
}
}
......@@ -81,7 +81,8 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
//发消息处理新增店长,任务重新分配问题
ClerkSyncPojo syncPojo = (ClerkSyncPojo) pojo;
GicRecordType gicRecordType = GicRecordType.valueOf(syncPojo.getRecordType());
if (gicRecordType.equals(GicRecordType.INSERT) || gicRecordType.equals(GicRecordType.UPDATE)) {
if (gicRecordType.equals(GicRecordType.INSERT)
|| gicRecordType.equals(GicRecordType.UPDATE)) {
//新增,更新某个人为店长
String clerkId = syncPojo.getClerkId();
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(clerkId);
......@@ -101,7 +102,7 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
GICMQClientUtil.getClientInstance().sendCommonMessage(RouterConstant.ROUTERTYPE, s,
"com.gic.haoban.task.api.service.MqAsynApiService", "run");
} catch (Exception e) {
e.printStackTrace();
logger.error("任务重新分配问题发送消息队列出错",e);
}
}
}
......@@ -167,7 +168,8 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
relationDTO.setStoreId(syncPojo.getStoreId());
ServiceResponse response = staffClerkRelationApiService.bindStaffClerk(relationDTO, "-1", ChannelCodeEnum.SYNC_BIND.getCode());
logger.info("绑定结果正常:{},{}", JSONObject.toJSONString(response), relationDTO.getClerkId());
} else {//删除状态 需要判断是否近段时间有操作删除 2分组内有更新 判断是转移操作
} else {
//删除状态 需要判断是否近段时间有操作删除 2分组内有更新 判断是转移操作
Date timeDiff = DateUtils.addMinutes(new Date(), -2);
if (relationDTO.getUpdateTime().after(timeDiff)) {
staffClerkRelationService.delBind(relationDTO.getClerkId(), "-1", ChannelCodeEnum.SYNC_UNBIND.getCode());
......
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