修改应用缓存

This commit is contained in:
lvleigang 2024-05-28 15:25:30 +08:00
parent db41cff8d2
commit 80a1d2bf11
1 changed files with 13 additions and 7 deletions

View File

@ -234,7 +234,6 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
entity.setSecretKey(AESUtil.encipher(entity.getPublicKey()));
entity.setAppId(null);
sysApplicationDao.save(entity);
applicationCache.reloadData("1");
//接口环境参数表 sys_application_api_para
saveApiPara(entity, olderAppId);
@ -254,6 +253,10 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
//应用api关联三方调用系统表 sys_application_api_auth_detail
Map<String, String> apiAuthDetail = saveCopyApiAuthDetail(entity, olderAppId, apiType, apiAuth, api);
applicationCache.reloadData("1");
applicationCache.reloadData("2");
applicationCache.reloadData("3");
applicationCache.reloadData("4");
return BaseResult.getSuccessMessageEntity("复制应用成功", entity.getId());
}
@ -284,8 +287,8 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
list.get(i).setTripartiteSystemId(apiAuth.get(list.get(i).getTripartiteSystemId()));//转换三方调用系统表id
sysApplicationApiAuthDetailDao.save(list.get(i));
}
applicationCache.reloadData("4");
}
applicationCache.reloadData("4");
return ids;
}
@ -316,8 +319,8 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
apilist.get(i).setCatalogueId(apiType.get(apilist.get(i).getCatalogueId()));//转换目录
sysApplicationApiDao.save(apilist.get(i));
}
applicationCache.reloadData("2");
}
applicationCache.reloadData("2");
return apiIds;
}
@ -341,8 +344,8 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
list.get(i).setAppId(entity.getId());
sysApplicationApiAuthDao.save(list.get(i));
}
applicationCache.reloadData("3");
}
applicationCache.reloadData("3");
return ids;
}
@ -532,6 +535,10 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
doUpdateApiPara(entity);//api接口参数
doUpdateDatabase(entity);//数据源
}
applicationCache.reloadData("1");
applicationCache.reloadData("2");
applicationCache.reloadData("3");
applicationCache.reloadData("4");
return BaseResult.getSuccessMessageEntity("修改应用成功");
}
@ -1179,7 +1186,6 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
sysApplicationApiAuthEntity.setModify_time(new Date());
sysApplicationApiAuthEntity.setSts("Y");
sysApplicationApiAuthDao.logicRemoveMultiCondition(sysApplicationApiAuthEntity);
applicationCache.reloadData("3");
List<String> tripartiteSystemIds = new ArrayList<>();
//添加
List<SysApplicationApiAuthEntity> apiAuths = entity.getApiAuths();
@ -1201,7 +1207,6 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
tripartiteSystemIds.add(apiAuths.get(i).getId());
sysApplicationApiAuthDao.save(apiAuths.get(i));
}
applicationCache.reloadData("3");
}
}
//删除三方系统关联表
@ -1209,6 +1214,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
sysApplicationApiAuthDetailEntity.setAppId(entity.getAppId());
sysApplicationApiAuthDetailEntity.setTripartiteSystemIds(tripartiteSystemIds);
sysApplicationApiAuthDetailDao.updateDeleteTripartiteSystem(sysApplicationApiAuthDetailEntity);
applicationCache.reloadData("3");
applicationCache.reloadData("4");
return BaseResult.getSuccessMessageEntity("保存成功");
}
@ -2042,7 +2048,7 @@ public class SysApplicationServiceImpl extends BaseService<SysApplicationEntity,
//sendApp
sysMessageManageLogEntity.setSendApp(sendApp.getId());//发送者应用
//sendApi 发送者
sysMessageManageLogEntity.setReceiveCode(receiveApi.getApiCode().toString());//接收者编码
sysMessageManageLogEntity.setReceiveCode(receiveApi.getApiCode() != null ? receiveApi.getApiCode().toString() : null);//接收者编码
sysMessageManageLogEntity.setReceiveApp(receiveApp.getId());//接收者应用
sysMessageManageLogEntity.setReceiveApi(receiveApi.getId());//接收者
JSONObject jsonObject = new JSONObject();