|
@@ -323,6 +323,9 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
|
String res = sendPost(SYNC_DICT_URL, JSONUtil.toJsonStr(syncProd));
|
|
String res = sendPost(SYNC_DICT_URL, JSONUtil.toJsonStr(syncProd));
|
|
if ("fail".equals(res)) {
|
|
if ("fail".equals(res)) {
|
|
return R.fail("同步失败,请稍后重试");
|
|
return R.fail("同步失败,请稍后重试");
|
|
|
|
+ } else {
|
|
|
|
+ sysDictLog.setIsSync(true);
|
|
|
|
+ sysDictLogService.updateById(sysDictLog);
|
|
}
|
|
}
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|
|
@@ -412,13 +415,17 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
|
}
|
|
}
|
|
if (Emptys.check(paters)) {
|
|
if (Emptys.check(paters)) {
|
|
JList<String> codes = paters.getProperty(SysDict::getCode);
|
|
JList<String> codes = paters.getProperty(SysDict::getCode);
|
|
- if (CollUtil.isNotEmpty(paters)) {
|
|
|
|
- paters.forEach(sysDict -> {
|
|
|
|
|
|
+ LambdaQueryWrapper<SysDict> lqw = new LambdaQueryWrapper<SysDict>().in(SysDict::getPaterCode, codes);
|
|
|
|
+ List<SysDict> sysDicts = list(lqw);
|
|
|
|
+ if (CollUtil.isNotEmpty(sysDicts)) {
|
|
|
|
+ removeBatchByIds(sysDicts);
|
|
|
|
+ sysDicts.forEach(sysDict -> {
|
|
SysDictLog sysDictLog = BeanUtil.copyProperties(sysDict, SysDictLog.class);
|
|
SysDictLog sysDictLog = BeanUtil.copyProperties(sysDict, SysDictLog.class);
|
|
sysDictLogService.handleLog(sysDictLog, EnumSysDictOperateType.DEL);
|
|
sysDictLogService.handleLog(sysDictLog, EnumSysDictOperateType.DEL);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- remove(new LambdaQueryWrapper<SysDict>().in(SysDict::getPaterCode, codes));
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
//刷新redis
|
|
//刷新redis
|
|
list.forEach(sysDict -> refuRedis(sysDict));
|
|
list.forEach(sysDict -> refuRedis(sysDict));
|