Kaynağa Gözat

代码整理

gaodm 5 yıl önce
ebeveyn
işleme
f464af81e8

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

@@ -33,11 +33,13 @@ public class PermissionFacade extends PermissionServiceImpl {
     public RespDTO getPermission(String appkey, String secret) {
         User user = userFacade.findByName(appkey);
         if (null == user) {
-            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "未找到对应的appkey【" + appkey + "】");
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                    "未找到对应的appkey【" + appkey + "】");
         }
         PasswordEncoder passwordEncoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();
         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());
         return RespDTO.onSuc(permissions);

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

@@ -268,7 +268,8 @@ public class UserFacade extends UserServiceImpl {
             paramMap1.put("is_deleted", IsDeleteEnum.N.getKey());
             List<UserOrganization> res1 = userOrganizationFacade.selectByMap(paramMap1);
             if (ListUtil.isNotEmpty(res1)) {
-                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该机构下已存在用户,不能再添加别的用户");
+                throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
+                        "该机构下已存在用户,不能再添加别的用户");
             }
         }