mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
系统管理bug修复;1、mvc参数校验不正确直接提示,不提示"请求参数不正确",优化手机格式不正确的提示;2、新增机构不自动生成机构代码;3、用户管理列表筛选登陆用户本身;
This commit is contained in:
+1
-1
@@ -19,7 +19,7 @@ import java.lang.annotation.*;
|
||||
)
|
||||
public @interface Mobile {
|
||||
|
||||
String message() default "手机号格式不正确";
|
||||
String message() default "手机号格式不正确,请重新确认";
|
||||
|
||||
Class<?>[] groups() default {};
|
||||
|
||||
|
||||
+4
-1
@@ -90,7 +90,10 @@ public class SecurityFrameworkUtils {
|
||||
@Nullable
|
||||
public static Long getLoginUserId() {
|
||||
LoginUser loginUser = getLoginUser();
|
||||
return loginUser != null ? loginUser.getId() : null;
|
||||
if (loginUser == null) {
|
||||
throw new ServiceException(GlobalErrorCodeConstants.UNAUTHORIZED);
|
||||
}
|
||||
return loginUser.getId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -124,7 +124,7 @@ public class GlobalExceptionHandler {
|
||||
log.warn("[methodArgumentNotValidExceptionExceptionHandler]", ex);
|
||||
FieldError fieldError = ex.getBindingResult().getFieldError();
|
||||
assert fieldError != null; // 断言,避免告警
|
||||
return CommonResult.error(BAD_REQUEST.getCode(), String.format("请求参数不正确:%s", fieldError.getDefaultMessage()));
|
||||
return CommonResult.error(BAD_REQUEST.getCode(), fieldError.getDefaultMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user