Explorar o código

新增用户修改

sl hai 2 meses
pai
achega
33c95c18d0

+ 1 - 1
jeecg-module-interlock/src/main/java/org/jeecg/modules/interlockUser/entity/InterlockUserAdd.java

@@ -36,7 +36,7 @@ public class InterlockUserAdd {
     /**密码*/
     private java.lang.String password;
 
-    /** 联锁用户类型:0email账户 1普通账户 */
+    /** 联锁用户类型:email-email账户 normal-普通账户 */
     @Dict(dicCode = "interlock_user_type")
     private String interlockUserType;
 

+ 2 - 2
jeecg-module-interlock/src/main/java/org/jeecg/modules/interlockUser/service/impl/InterlockUserServiceImpl.java

@@ -147,7 +147,7 @@ public class InterlockUserServiceImpl extends ServiceImpl<InterlockUserMapper, I
         int count = 0;
         try {
             String password = "";
-            if ("1".equals(interlockUserAdd.getInterlockUserType()) && ObjectUtil.isNotNull(interlockUserAdd.getPassword())){
+            if ("normal".equals(interlockUserAdd.getInterlockUserType()) && ObjectUtil.isNotNull(interlockUserAdd.getPassword())){
                 password = interlockUserAdd.getPassword();
             }
             restClientService.addSSOUser(interlockUserAdd.getUsername(),password);
@@ -210,7 +210,7 @@ public class InterlockUserServiceImpl extends ServiceImpl<InterlockUserMapper, I
         //普通用户
         if(interlockUserAdd.getInterlockUserType().equals("normal")){
             //sso账户不存在
-            if(!(interlockUserAdd.getIsExistSSO())){
+            if(((interlockUserAdd.getIsExistSSO()) != null) && (!(interlockUserAdd.getIsExistSSO()))){
                 JSONObject addJSONObject = toAddJSONObject(interlockUserAdd.getUsername(), interlockUserAdd.getPassword());
                 return addUser(addJSONObject);
             }