给系统移除演示用户的逻辑

This commit is contained in:
季圣华
2022-10-22 22:28:32 +08:00
parent 893d7634a9
commit d7c0012885
5 changed files with 16 additions and 88 deletions

View File

@@ -88,13 +88,9 @@ public class SystemConfigService {
SystemConfig systemConfig = JSONObject.parseObject(obj.toJSONString(), SystemConfig.class);
int result=0;
try{
if(userService.checkIsTestUser()) {
result=-1;
} else {
result=systemConfigMapper.insertSelective(systemConfig);
logService.insertLog("系统配置",
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(systemConfig.getCompanyName()).toString(), request);
}
result=systemConfigMapper.insertSelective(systemConfig);
logService.insertLog("系统配置",
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_ADD).append(systemConfig.getCompanyName()).toString(), request);
}catch(Exception e){
JshException.writeFail(logger, e);
}
@@ -106,13 +102,9 @@ public class SystemConfigService {
SystemConfig systemConfig = JSONObject.parseObject(obj.toJSONString(), SystemConfig.class);
int result=0;
try{
if(userService.checkIsTestUser()) {
result=-1;
} else {
result = systemConfigMapper.updateByPrimaryKeySelective(systemConfig);
logService.insertLog("系统配置",
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(systemConfig.getCompanyName()).toString(), request);
}
result = systemConfigMapper.updateByPrimaryKeySelective(systemConfig);
logService.insertLog("系统配置",
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_EDIT).append(systemConfig.getCompanyName()).toString(), request);
}catch(Exception e){
JshException.writeFail(logger, e);
}
@@ -138,11 +130,7 @@ public class SystemConfigService {
String [] idArray=ids.split(",");
int result=0;
try{
if(userService.checkIsTestUser()) {
result=-1;
} else {
result = systemConfigMapperEx.batchDeleteSystemConfigByIds(new Date(), userInfo == null ? null : userInfo.getId(), idArray);
}
result = systemConfigMapperEx.batchDeleteSystemConfigByIds(new Date(), userInfo == null ? null : userInfo.getId(), idArray);
}catch(Exception e){
JshException.writeFail(logger, e);
}