Skip to content

Commit

Permalink
Merge pull request #238 from TerrenceGee/fix_add_user_account_trim
Browse files Browse the repository at this point in the history
fix add keyword trim when add user
  • Loading branch information
rk2b-fenghaolun authored Mar 5, 2024
2 parents 9d95af1 + 263512b commit dc0381a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,12 @@ public BaseResultEntity saveOrUpdateUser(SaveOrUpdateUserParam saveOrUpdateUserP
Long userId=saveOrUpdateUserParam.getUserId();
SysUser sysUser;
if(userId==null){
if(saveOrUpdateUserParam.getUserAccount()==null|| "".equals(saveOrUpdateUserParam.getUserAccount().trim())) {
saveOrUpdateUserParam.setUserAccount(saveOrUpdateUserParam.getUserAccount().trim());
saveOrUpdateUserParam.setUserName(saveOrUpdateUserParam.getUserName().trim());
if(saveOrUpdateUserParam.getUserAccount()==null|| saveOrUpdateUserParam.getUserAccount().isEmpty()) {
return BaseResultEntity.failure(BaseResultEnum.LACK_OF_PARAM,"userAccount");
}
if(saveOrUpdateUserParam.getUserName()==null|| "".equals(saveOrUpdateUserParam.getUserName().trim())) {
if(saveOrUpdateUserParam.getUserName()==null|| saveOrUpdateUserParam.getUserName().isEmpty()) {
return BaseResultEntity.failure(BaseResultEnum.LACK_OF_PARAM,"userName");
}
if(saveOrUpdateUserParam.getIsForbid()==null) {
Expand Down

0 comments on commit dc0381a

Please sign in to comment.