Commit 384150c1 by fudahua

同步绑定流程

parent 4237444c
...@@ -66,21 +66,22 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor ...@@ -66,21 +66,22 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
relationDTO.setClerkCode(syncPojo.getClerkCode()); relationDTO.setClerkCode(syncPojo.getClerkCode());
//非正常状态 删除 //非正常状态 删除
if (!syncPojo.getStatus().equals(1)) { if (!syncPojo.getStatus().equals(1)) {
logger.info("删除操作:{}",syncPojo.getClerkId());
staffClerkRelationService.delBind(syncPojo.getClerkId()); staffClerkRelationService.delBind(syncPojo.getClerkId());
}else { }else {
List<String> clerkIds=new ArrayList<>(); List<String> clerkIds=new ArrayList<>();
clerkIds.add(syncPojo.getClerkId()); clerkIds.add(syncPojo.getClerkId());
StaffClerkRelationDTO bindRelationDTO = staffClerkRelationService.getOneBindCodeNoStatus(syncPojo.getEnterpriseId(), syncPojo.getClerkCode()); StaffClerkRelationDTO bindRelationDTO = staffClerkRelationService.getOneBindCodeNoStatus(syncPojo.getEnterpriseId(), syncPojo.getClerkCode());
if (bindRelationDTO == null) { if (bindRelationDTO == null) {
logger.info("没有关联导购,不需要操作"); logger.info("没有关联导购,不需要操作:{}",syncPojo.getClerkId());
return; return;
} }
if (bindRelationDTO.getStatusFlag().equals(StatusEnum.NORMAL.getValue()) if (bindRelationDTO.getStatusFlag().equals(StatusEnum.NORMAL.getValue())
&&syncPojo.getOldStatus().equals(1)) { &&syncPojo.getOldStatus().equals(1)) {
logger.info("更新关联信息"); logger.info("更新关联信息:{}",syncPojo.getClerkId());
staffClerkRelationService.updateByClerkId(relationDTO); staffClerkRelationService.updateByClerkId(relationDTO);
}else { }else {
logger.info("走新增逻辑"); logger.info("走新增逻辑:{}",syncPojo.getClerkId());
//走新增逻辑 //走新增逻辑
moveOrAddClerk(syncPojo,bindRelationDTO); moveOrAddClerk(syncPojo,bindRelationDTO);
} }
......
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