优化演示用户的删除逻辑

This commit is contained in:
季圣华
2021-06-18 21:23:16 +08:00
parent bcd07444b9
commit a13fcfcd21
2 changed files with 4 additions and 4 deletions

View File

@@ -257,7 +257,7 @@ public class UserService {
sb.append(BusinessConstants.LOG_OPERATION_TYPE_DELETE);
List<User> list = getUserListByIds(ids);
for(User user: list){
if(user.getLoginName().equals(TEST_USER)){
if(demonstrateOpen && user.getLoginName().equals(TEST_USER)){
logger.error("异常码[{}],异常提示[{}],参数,ids:[{}]",
ExceptionConstants.USER_LIMIT_DELETE_CODE,ExceptionConstants.USER_LIMIT_DELETE_MSG,ids);
throw new BusinessRunTimeException(ExceptionConstants.USER_LIMIT_DELETE_CODE,
@@ -539,7 +539,7 @@ public class UserService {
throw new BusinessRunTimeException(ExceptionConstants.USER_NAME_LIMIT_USE_CODE,
ExceptionConstants.USER_NAME_LIMIT_USE_MSG);
} else {
if(ue.getLoginName().equals(TEST_USER)){
if(demonstrateOpen && ue.getLoginName().equals(TEST_USER)){
logger.error("异常码[{}],异常提示[{}],参数,obj:[{}]",
ExceptionConstants.USER_LIMIT_UPDATE_CODE,ExceptionConstants.USER_LIMIT_UPDATE_MSG, TEST_USER);
throw new BusinessRunTimeException(ExceptionConstants.USER_LIMIT_UPDATE_CODE,