Преглед на файлове

Revert "代码整理"

This reverts commit f464af8
gaodm преди 5 години
родител
ревизия
a47cceeb18

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

@@ -33,13 +33,11 @@ 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);

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

@@ -268,8 +268,7 @@ 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, "该机构下已存在用户,不能再添加别的用户");
             }
         }