Commit 776656bb by 墨竹

fix:导购删除、转移门店、设置店长处理

parent 3bb0f553
package com.gic.haoban.manage.api.dto.qdto;
import java.io.Serializable;
/**
* 导购删除、门店转移、新增修改店长
*
* @author mozhu
* @date 2022-07-15 10:33:15
*/
public class ClerkSyncQDTO implements Serializable {
private static final long serialVersionUID = 3952563675969267345L;
private String clerkId;
private String storeId;
private String clerkCode;
private String enterpriseId;
private Integer status;
private Integer oldStatus;
/**
* 1:删除;2:门店转移;3:导购其他数据变动
*/
private Integer type;
public String getClerkId() {
return clerkId;
}
public void setClerkId(String clerkId) {
this.clerkId = clerkId;
}
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getClerkCode() {
return clerkCode;
}
public void setClerkCode(String clerkCode) {
this.clerkCode = clerkCode;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getOldStatus() {
return oldStatus;
}
public void setOldStatus(Integer oldStatus) {
this.oldStatus = oldStatus;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
......@@ -187,13 +187,13 @@ public interface StaffClerkRelationApiService {
/**
* 导购门店转移
* clerkStoreMoveMq
* 导购门店转移或者删除
* clerkStoreMoveDelMq
*
* @param param 参数
* @author mozhu
* @date 2022-07-12 18:57:15
*/
void clerkStoreMove(String param);
void clerkStoreMoveDel(String param);
}
......@@ -75,11 +75,14 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
}
BinlogBasePojo pojo = binlogChange(record.value());
logger.info("binlog数据:{}", JSONObject.toJSONString(pojo));
if (pojo == null) {
logger.error("binlog数据为空");
return;
}
if (record.value().getTableName().equals(CLERK)) {
dealClerk((ClerkSyncPojo) pojo);
//发消息处理新增店长,任务重新分配问题
ClerkSyncPojo syncPojo = (ClerkSyncPojo) pojo;
dealClerk(syncPojo);
//发消息处理新增店长,任务重新分配问题
GicRecordType gicRecordType = GicRecordType.valueOf(syncPojo.getRecordType());
if (gicRecordType.equals(GicRecordType.INSERT)
|| gicRecordType.equals(GicRecordType.UPDATE)) {
......@@ -96,6 +99,7 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
try {
logger.info("待分配任务重分配======>{}", clerkId);
MqMessageQo mqMessageQo = new MqMessageQo();
//任务分配给店长
mqMessageQo.setType(MqMessageQo.DISTRIBUTE_TASK);
mqMessageQo.setData(clerkId);
String s = JSONObject.toJSONString(mqMessageQo);
......@@ -106,11 +110,13 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
}
}
}
}
else if (record.value().getTableName().equals(GROUP)) {
//分组
} else if (record.value().getTableName().equals(GROUP)) {
dealStoreGroup((GroupSyncPojo) pojo);
}
else if (record.value().getTableName().equals(STORE)) {
//门店
} else if (record.value().getTableName().equals(STORE)) {
dealStore((StoreSyncPojo) pojo);
}
}
......
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