人员中台 - 收到数据时不修改本地表
parent
b3ec041f58
commit
3dfa30514b
|
@ -27,6 +27,7 @@ import java.util.Map;
|
||||||
*/
|
*/
|
||||||
@Aspect
|
@Aspect
|
||||||
@Component
|
@Component
|
||||||
|
@SuppressWarnings("all")
|
||||||
public class SyncDataAdviceAspect {
|
public class SyncDataAdviceAspect {
|
||||||
|
|
||||||
@Pointcut(value = "@annotation(com.zcloud.syncData.SyncPlatformAdvice)")
|
@Pointcut(value = "@annotation(com.zcloud.syncData.SyncPlatformAdvice)")
|
||||||
|
|
|
@ -33,6 +33,7 @@ import java.util.Date;
|
||||||
topic = "${mq.consumer.dataChange.tongbu-data-change.topic}",
|
topic = "${mq.consumer.dataChange.tongbu-data-change.topic}",
|
||||||
selectorType = SelectorType.TAG,
|
selectorType = SelectorType.TAG,
|
||||||
messageModel = MessageModel.BROADCASTING) // 添加广播模式
|
messageModel = MessageModel.BROADCASTING) // 添加广播模式
|
||||||
|
@SuppressWarnings("all")
|
||||||
public class SyncDataListener implements RocketMQListener<String> {
|
public class SyncDataListener implements RocketMQListener<String> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -102,10 +103,10 @@ public class SyncDataListener implements RocketMQListener<String> {
|
||||||
// 相关方推送
|
// 相关方推送
|
||||||
xgfUserService.edit4Mq(syncInfo);
|
xgfUserService.edit4Mq(syncInfo);
|
||||||
}
|
}
|
||||||
PageData localData = usersService.findById(syncInfo);
|
// PageData localData = usersService.findById(syncInfo);
|
||||||
if (localData != null && !localData.isEmpty()){
|
// if (localData != null && !localData.isEmpty()){
|
||||||
usersService.editUser(syncInfo);
|
// usersService.editUser(syncInfo);
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 2024.8.9 按郭跃鹏提出:后期各公司从企业端分离后,需要其他公司的用户进行SQL联查,要求新增一张core_user的同步表,用于记录中台的所有用户数据
|
// 2024.8.9 按郭跃鹏提出:后期各公司从企业端分离后,需要其他公司的用户进行SQL联查,要求新增一张core_user的同步表,用于记录中台的所有用户数据
|
||||||
PageData coreLocalData = coreSyncUserMapper.findById(syncInfo);
|
PageData coreLocalData = coreSyncUserMapper.findById(syncInfo);
|
||||||
|
@ -134,9 +135,9 @@ public class SyncDataListener implements RocketMQListener<String> {
|
||||||
String str = tenCorpDto.getData().getString("syncInfo");
|
String str = tenCorpDto.getData().getString("syncInfo");
|
||||||
PageData syncInfo = JSONUtil.toBean(str, PageData.class);
|
PageData syncInfo = JSONUtil.toBean(str, PageData.class);
|
||||||
PageData localData = departmentMapper.findById(syncInfo);
|
PageData localData = departmentMapper.findById(syncInfo);
|
||||||
if (localData != null && !localData.isEmpty()){
|
// if (localData != null && !localData.isEmpty()){
|
||||||
departmentMapper.edit(syncInfo);
|
// departmentMapper.edit(syncInfo);
|
||||||
}
|
// }
|
||||||
|
|
||||||
PageData coreLocalData = coreSyncDeptMapper.findById(syncInfo);
|
PageData coreLocalData = coreSyncDeptMapper.findById(syncInfo);
|
||||||
try {
|
try {
|
||||||
|
@ -161,9 +162,9 @@ public class SyncDataListener implements RocketMQListener<String> {
|
||||||
String str = tenCorpDto.getData().getString("syncInfo");
|
String str = tenCorpDto.getData().getString("syncInfo");
|
||||||
PageData syncInfo = JSONUtil.toBean(str, PageData.class);
|
PageData syncInfo = JSONUtil.toBean(str, PageData.class);
|
||||||
PageData localData = corpinfoMapper.findById(syncInfo);
|
PageData localData = corpinfoMapper.findById(syncInfo);
|
||||||
if (localData != null && !localData.isEmpty()){
|
// if (localData != null && !localData.isEmpty()){
|
||||||
corpinfoMapper.edit(syncInfo);
|
// corpinfoMapper.edit(syncInfo);
|
||||||
}
|
// }
|
||||||
|
|
||||||
PageData coreLocalData = coreSyncCorpMapper.findById(syncInfo);
|
PageData coreLocalData = coreSyncCorpMapper.findById(syncInfo);
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue