zhoutg 6 年之前
父节点
当前提交
1fa008eb19

+ 1 - 1
uaa-service/src/main/java/com/diagbot/service/UrlUserService.java

@@ -42,7 +42,7 @@ public class UrlUserService implements UserDetailsService {
             user.setGrantedAuthorities(grantedAuthorities);
             user.setGrantedAuthorities(grantedAuthorities);
             return user;
             return user;
         } else {
         } else {
-            throw new UsernameNotFoundException("admin: " + userName + " do not exist!");
+            throw new UsernameNotFoundException("admin: " + userName + " do not exist");
         }
         }
     }
     }
 }
 }

+ 11 - 11
user-service/src/main/java/com/diagbot/exception/ServiceErrorCode.java

@@ -8,17 +8,17 @@ package com.diagbot.exception;
  * @time: 2018/9/10 11:11
  * @time: 2018/9/10 11:11
  */
  */
 public enum ServiceErrorCode implements ErrorCode {
 public enum ServiceErrorCode implements ErrorCode {
-    USER_NOT_FOUND("10020000", "该手机号暂未注册"),
-    USER_PASSWORD_ERROR("10020001", "手机号或密码不正确"),
-    GET_TOKEN_FAIL("10020002", "获取token失败"),
-    TOKEN_IS_NOT_MATCH_USER("10020003", "请使用自己的token进行接口请求"),
-
-    SMS_SEND_ERROR("10020004", "短信发送错误!"),
-    USER_BIND_ERROR("10020005", "用户手机号已经绑定无需再次验证!"),
-    USER_UN_BIND_ERROR("10020006", "用户手机号未绑定无需解绑!"),
-    VERIFYCODE_ERROR("10020007", "图片验证码生成错误!"),
-    USER_EXIST("10020008", "该手机已注册!"),
-    EMAIL_IS_NULL("10020009", "请输入邮箱");
+    USER_NOT_FOUND("10020000", "该手机号暂未注册"),
+    USER_PASSWORD_ERROR("10020001", "手机号或密码不正确"),
+    GET_TOKEN_FAIL("10020002", "获取token失败"),
+    TOKEN_IS_NOT_MATCH_USER("10020003", "请使用自己的token进行接口请求"),
+
+    SMS_SEND_ERROR("10020004", "短信发送错误"),
+    USER_BIND_ERROR("10020005", "用户手机号已经绑定无需再次验证"),
+    USER_UN_BIND_ERROR("10020006", "用户手机号未绑定无需解绑"),
+    VERIFYCODE_ERROR("10020007", "图片验证码生成错误"),
+    USER_EXIST("10020008", "该手机已注册"),
+    EMAIL_IS_NULL("10020009", "请输入邮箱");
 
 
     private String code;
     private String code;
     private String msg;
     private String msg;

+ 1 - 1
user-service/src/main/java/com/diagbot/facade/PermissionFacade.java

@@ -37,7 +37,7 @@ public class PermissionFacade extends PermissionServiceImpl {
         }
         }
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
         if (!passwordEncoder.matches(secret, user.getPassword())) {
         if (!passwordEncoder.matches(secret, user.getPassword())) {
-            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "appkey 或 secret 错误【" + appkey + "," + secret + "】");
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "appkey 或 secret 错误【" + appkey + "," + secret + "】");
         }
         }
         List<Permission> permissions = this.getPermissionByUserId(user.getId());
         List<Permission> permissions = this.getPermissionByUserId(user.getId());
         return RespDTO.onSuc(permissions);
         return RespDTO.onSuc(permissions);

+ 3 - 3
user-service/src/main/java/com/diagbot/facade/UserFacade.java

@@ -120,7 +120,7 @@ public class UserFacade extends UserServiceImpl {
             throw new CommonException(ServiceErrorCode.USER_EXIST);
             throw new CommonException(ServiceErrorCode.USER_EXIST);
         }
         }
         if (!RegexValidateUtil.checkMobileNumber(userSaveVO.getUsername())) {
         if (!RegexValidateUtil.checkMobileNumber(userSaveVO.getUsername())) {
-            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "请输入正确的手机号!");
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "请输入正确的手机号");
         }
         }
 
 
         //TODO 测试注释了图形验证和短信验证,后面要开启
         //TODO 测试注释了图形验证和短信验证,后面要开启
@@ -233,7 +233,7 @@ public class UserFacade extends UserServiceImpl {
             paramMap1.put("is_deleted", IsDeleteEnum.N.getKey());
             paramMap1.put("is_deleted", IsDeleteEnum.N.getKey());
             List<UserOrganization> res1 = userOrganizationFacade.selectByMap(paramMap1);
             List<UserOrganization> res1 = userOrganizationFacade.selectByMap(paramMap1);
             if (ListUtil.isNotEmpty(res1)) {
             if (ListUtil.isNotEmpty(res1)) {
-                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该机构下已存在用户,不能再添加别的用户");
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该机构下已存在用户,不能再添加别的用户");
             }
             }
         }
         }
 
 
@@ -540,7 +540,7 @@ public class UserFacade extends UserServiceImpl {
 
 
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
         if (!passwordEncoder.matches(password, user.getPassword())) {
         if (!passwordEncoder.matches(password, user.getPassword())) {
-            throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "原密码错误");
+            throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "原密码错误");
         }
         }
 
 
         String entryPassword = passwordEncoder.encode(modifyPassword);
         String entryPassword = passwordEncoder.encode(modifyPassword);

+ 4 - 4
user-service/src/main/java/com/diagbot/vo/OrganizationVO.java

@@ -18,22 +18,22 @@ public class OrganizationVO {
     /**
     /**
      * 机构名称
      * 机构名称
      */
      */
-    @NotBlank(message = "请输入机构名称!")
+    @NotBlank(message = "请输入机构名称")
     private String organizationName;
     private String organizationName;
     /**
     /**
      * 机构类型
      * 机构类型
      */
      */
-    @NotNull(message = "请输入机构类型!")
+    @NotNull(message = "请输入机构类型")
     private Integer type;
     private Integer type;
     /**
     /**
      * 负责人
      * 负责人
      */
      */
-    @NotBlank(message = "请输入机构负责人!")
+    @NotBlank(message = "请输入机构负责人")
     private String principal;
     private String principal;
     /**
     /**
      * 机构地址
      * 机构地址
      */
      */
-    @NotBlank(message = "请输入机构地址!")
+    @NotBlank(message = "请输入机构地址")
     private String address;
     private String address;
     /**
     /**
      * 下属机构数量
      * 下属机构数量

+ 4 - 4
user-service/src/main/java/com/diagbot/vo/UserAndOrganizationVO.java

@@ -19,7 +19,7 @@ public class UserAndOrganizationVO {
     /**
     /**
      * 机构id
      * 机构id
      */
      */
-    @NotNull(message = "请输入机构id!")
+    @NotNull(message = "请输入机构id")
     private Long organizationid;
     private Long organizationid;
 
 
     /**
     /**
@@ -37,19 +37,19 @@ public class UserAndOrganizationVO {
     /**
     /**
      * 联系人
      * 联系人
      */
      */
-    @NotBlank(message = "请输入联系人!")
+    @NotBlank(message = "请输入联系人")
     private String linkman;
     private String linkman;
 
 
     /**
     /**
      * 邮箱
      * 邮箱
      */
      */
-    @NotBlank(message = "请输入邮箱!")
+    @NotBlank(message = "请输入邮箱")
     private String email;
     private String email;
 
 
     /**
     /**
      * 岗位信息
      * 岗位信息
      */
      */
-    @NotBlank(message = "请输入岗位信息!")
+    @NotBlank(message = "请输入岗位信息")
     private String position;
     private String position;
 
 
 }
 }

+ 2 - 2
user-service/src/main/java/com/diagbot/vo/UserAuthenticationVO.java

@@ -13,10 +13,10 @@ import javax.validation.constraints.NotBlank;
 @Getter
 @Getter
 @Setter
 @Setter
 public class UserAuthenticationVO {
 public class UserAuthenticationVO {
-    @NotBlank(message = "请输入手机号!")
+    @NotBlank(message = "请输入手机号")
     private String username;
     private String username;
     private String position;
     private String position;
-    @NotBlank(message = "请输入机构名称!")
+    @NotBlank(message = "请输入机构名称")
     private String organization;
     private String organization;
     private String organizationPrincipal;
     private String organizationPrincipal;
     private String organizationAddress;
     private String organizationAddress;

+ 1 - 1
user-service/src/main/java/com/diagbot/vo/UserInfoAuditVO.java

@@ -19,7 +19,7 @@ public class UserInfoAuditVO {
     private Integer rejectType;//未通过类型
     private Integer rejectType;//未通过类型
     private String rejectComment;//认证被拒理由
     private String rejectComment;//认证被拒理由
     private Integer status;//认证状态(0:未认证,1:已认证,2:认证中)
     private Integer status;//认证状态(0:未认证,1:已认证,2:认证中)
-    @NotNull(message = "请输入用户id!")
+    @NotNull(message = "请输入用户id")
     private Long userId;//用户id
     private Long userId;//用户id
 
 
 }
 }

+ 5 - 5
user-service/src/main/java/com/diagbot/vo/UserInfoVO.java

@@ -15,15 +15,15 @@ import javax.validation.constraints.Pattern;
 @Setter
 @Setter
 public class UserInfoVO {
 public class UserInfoVO {
 
 
-    @NotBlank(message = "请输入密码!")
+    @NotBlank(message = "请输入密码")
     @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$", message = "密码必须数字和字母组成,并且要同时含有数字和字母,且长度要在6-16位之间")
     @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$", message = "密码必须数字和字母组成,并且要同时含有数字和字母,且长度要在6-16位之间")
     private String password;
     private String password;
-    @NotBlank(message = "请输入手机号!")
+    @NotBlank(message = "请输入手机号")
     private String username;
     private String username;
-    @NotBlank(message = "请输入机构名称!")
+    @NotBlank(message = "请输入机构名称")
     private String organization;
     private String organization;
-    @NotBlank(message = "请输入联系人姓名!")
+    @NotBlank(message = "请输入联系人姓名")
     private String linkman;
     private String linkman;
-    @NotBlank(message = "请输入邮箱!")
+    @NotBlank(message = "请输入邮箱")
     private String email; //邮箱
     private String email; //邮箱
 }
 }