人员中台 - 收到数据时不修改本地表

dev-9.10-修复中台bug-xuyifeng
water_xu 2024-09-05 11:33:24 +08:00
parent b3ec041f58
commit 3dfa30514b
2 changed files with 12 additions and 10 deletions

View File

@ -27,6 +27,7 @@ import java.util.Map;
*/
@Aspect
@Component
@SuppressWarnings("all")
public class SyncDataAdviceAspect {
@Pointcut(value = "@annotation(com.zcloud.syncData.SyncPlatformAdvice)")

View File

@ -33,6 +33,7 @@ import java.util.Date;
topic = "${mq.consumer.dataChange.tongbu-data-change.topic}",
selectorType = SelectorType.TAG,
messageModel = MessageModel.BROADCASTING) // 添加广播模式
@SuppressWarnings("all")
public class SyncDataListener implements RocketMQListener<String> {
@Autowired
@ -102,10 +103,10 @@ public class SyncDataListener implements RocketMQListener<String> {
// 相关方推送
xgfUserService.edit4Mq(syncInfo);
}
PageData localData = usersService.findById(syncInfo);
if (localData != null && !localData.isEmpty()){
usersService.editUser(syncInfo);
}
// PageData localData = usersService.findById(syncInfo);
// if (localData != null && !localData.isEmpty()){
// usersService.editUser(syncInfo);
// }
// 2024.8.9 按郭跃鹏提出后期各公司从企业端分离后需要其他公司的用户进行SQL联查要求新增一张core_user的同步表用于记录中台的所有用户数据
PageData coreLocalData = coreSyncUserMapper.findById(syncInfo);
@ -134,9 +135,9 @@ public class SyncDataListener implements RocketMQListener<String> {
String str = tenCorpDto.getData().getString("syncInfo");
PageData syncInfo = JSONUtil.toBean(str, PageData.class);
PageData localData = departmentMapper.findById(syncInfo);
if (localData != null && !localData.isEmpty()){
departmentMapper.edit(syncInfo);
}
// if (localData != null && !localData.isEmpty()){
// departmentMapper.edit(syncInfo);
// }
PageData coreLocalData = coreSyncDeptMapper.findById(syncInfo);
try {
@ -161,9 +162,9 @@ public class SyncDataListener implements RocketMQListener<String> {
String str = tenCorpDto.getData().getString("syncInfo");
PageData syncInfo = JSONUtil.toBean(str, PageData.class);
PageData localData = corpinfoMapper.findById(syncInfo);
if (localData != null && !localData.isEmpty()){
corpinfoMapper.edit(syncInfo);
}
// if (localData != null && !localData.isEmpty()){
// corpinfoMapper.edit(syncInfo);
// }
PageData coreLocalData = coreSyncCorpMapper.findById(syncInfo);
try {