限制演示用户和配置不被删除

This commit is contained in:
季圣华
2021-04-25 22:18:17 +08:00
parent dc7d15c310
commit b35243f2f4
4 changed files with 30 additions and 2 deletions

View File

@@ -40,6 +40,8 @@ public class SystemConfigService {
@Resource
private LogService logService;
private static final String TEST_USER = "jsh";
public SystemConfig getSystemConfig(long id)throws Exception {
SystemConfig result=null;
try{
@@ -136,7 +138,11 @@ public class SystemConfigService {
String [] idArray=ids.split(",");
int result=0;
try{
result=systemConfigMapperEx.batchDeleteSystemConfigByIds(new Date(),userInfo==null?null:userInfo.getId(),idArray);
if(userService.checkIsTestUser()) {
result=-1;
} else {
result = systemConfigMapperEx.batchDeleteSystemConfigByIds(new Date(), userInfo == null ? null : userInfo.getId(), idArray);
}
}catch(Exception e){
JshException.writeFail(logger, e);
}