ccj 2 vuotta sitten
vanhempi
commit
64112d099d

+ 8 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/controller/CommonUserController.java

@@ -267,7 +267,10 @@ public class CommonUserController {
 
                     }
                     if ("zt".equals(branch)) {
-                        if (workflowSteps.get(i).getBranchNodeLocation()!= null &&"BEGIN".equals(workflowSteps.get(i).getBranchNodeLocation().name()) && (!StringUtils.isEmpty(workflowSteps.get(i).getBranchExpression())&&!workflowSteps.get(i).getBranchExpression().contains("!="))) {
+                        if (workflowSteps.get(i).getBranchNodeLocation()!= null
+                                &&"BEGIN".equals(workflowSteps.get(i).getBranchNodeLocation().name())
+                                && !StringUtils.isEmpty(workflowSteps.get(i).getBranchExpression())
+                                &&workflowSteps.get(i).getBranchExpression().contains("!=")) {
                             biaoshi = 1;
                         }
                         if(biaoshi ==1){
@@ -302,7 +305,10 @@ public class CommonUserController {
                             newWorkflowSteps.add(newWorkflowStep);
                         }
 
-                        if(workflowSteps.get(i).getBranchNodeLocation()!= null &&"END".equals(workflowSteps.get(i).getBranchNodeLocation().name()) && (!StringUtils.isEmpty(workflowSteps.get(i).getBranchExpression())&&!workflowSteps.get(i).getBranchExpression().contains("!="))){
+                        if(workflowSteps.get(i).getBranchNodeLocation()!= null
+                                &&"END".equals(workflowSteps.get(i).getBranchNodeLocation().name())
+                                && !StringUtils.isEmpty(workflowSteps.get(i).getBranchExpression())
+                                &&workflowSteps.get(i).getBranchExpression().contains("!=")){
                             biaoshi = 0;
                         }
                     }

+ 64 - 64
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/CommonUserServiceImpl.java

@@ -413,38 +413,38 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
                 userDO.setCid(commonUser.getCid());
             }
         }
-        if (commonUser.getPhone() != null) {
-            DBConnection();
-            String sUserId = null;
-            String password = null;
-            if (excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon) > 0) {
-                excUpdate("update t_user t set t.LAST_LOGIN_TIME = now() where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
-                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
-            } else {
-                password = MD5Util.encrypt(commonUser.getPhone(), "123456");
-                excInsert("insert into t_user (USERNAME,PASSWORD,REALNAME,STATUS,MOBILE,CREATE_TIME,MODIFY_TIME,LAST_LOGIN_TIME,AVATAR,OPER_ID) " +
-                        "VALUES ('" + commonUser.getPhone() + "','" + password + "','" + userDO.getUserName() + "',1,'" + commonUser.getPhone() + "',NOW(),NOW(),NOW(),'https://liangxin.zthymaoyi.com/upload/default.jpg','"
-                        + UUID.randomUUID().toString(true) + "')", this.coon);
-                Long user_id = excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
-                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
-                excInsert("insert into t_user_role (USER_ID,ROLE_ID) " +
-                        "VALUES (" + user_id + ",7)", this.coon);
-                excInsert("insert into t_user_config (USER_ID,THEME,LAYOUT,MULTI_PAGE,FIX_SIDERBAR,FIX_HEADER,COLOR) " +
-                        "VALUES (" + user_id + ",'dark','side','0','1','1','rgb(66, 185, 131)')", this.coon);
-
-            }
-            close();
-            DBConnection1();
-            if (excSelect2("select * from s_user t where t.id = '" + sUserId + "'", this.coon1) != null) {
-                excUpdate("update s_user t set t.last_oper_time = now() where t.id = '" + sUserId + "'", this.coon1);
-            } else {
-                excInsert("insert into s_user (id,nick_name,user_name,password,avatar,money,status,oper_time,last_oper_time) " +
-                        "VALUES ('" + sUserId + "','" + userDO.getUserName() + "','" + commonUser.getPhone() + "','" + password + "','https://liangxin.zthymaoyi.com/upload/default.jpg','0.0',0,NOW(),NOW())", this.coon1);
-            }
-            close1();
-            userDO.setLiangxinId(sUserId);
-            this.updateById(userDO);
-        }
+//        if (commonUser.getPhone() != null) {
+//            DBConnection();
+//            String sUserId = null;
+//            String password = null;
+//            if (excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon) > 0) {
+//                excUpdate("update t_user t set t.LAST_LOGIN_TIME = now() where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+//                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+//            } else {
+//                password = MD5Util.encrypt(commonUser.getPhone(), "123456");
+//                excInsert("insert into t_user (USERNAME,PASSWORD,REALNAME,STATUS,MOBILE,CREATE_TIME,MODIFY_TIME,LAST_LOGIN_TIME,AVATAR,OPER_ID) " +
+//                        "VALUES ('" + commonUser.getPhone() + "','" + password + "','" + userDO.getUserName() + "',1,'" + commonUser.getPhone() + "',NOW(),NOW(),NOW(),'https://liangxin.zthymaoyi.com/upload/default.jpg','"
+//                        + UUID.randomUUID().toString(true) + "')", this.coon);
+//                Long user_id = excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+//                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+//                excInsert("insert into t_user_role (USER_ID,ROLE_ID) " +
+//                        "VALUES (" + user_id + ",7)", this.coon);
+//                excInsert("insert into t_user_config (USER_ID,THEME,LAYOUT,MULTI_PAGE,FIX_SIDERBAR,FIX_HEADER,COLOR) " +
+//                        "VALUES (" + user_id + ",'dark','side','0','1','1','rgb(66, 185, 131)')", this.coon);
+//
+//            }
+//            close();
+//            DBConnection1();
+//            if (excSelect2("select * from s_user t where t.id = '" + sUserId + "'", this.coon1) != null) {
+//                excUpdate("update s_user t set t.last_oper_time = now() where t.id = '" + sUserId + "'", this.coon1);
+//            } else {
+//                excInsert("insert into s_user (id,nick_name,user_name,password,avatar,money,status,oper_time,last_oper_time) " +
+//                        "VALUES ('" + sUserId + "','" + userDO.getUserName() + "','" + commonUser.getPhone() + "','" + password + "','https://liangxin.zthymaoyi.com/upload/default.jpg','0.0',0,NOW(),NOW())", this.coon1);
+//            }
+//            close1();
+//            userDO.setLiangxinId(sUserId);
+//            this.updateById(userDO);
+//        }
         //返回用户DTO
         cacheComponent.del(VERIFY_CODE_PREFIX + commonUser.getPhone());
         String accessToken = GeneratorUtil.genSessionId();
@@ -548,38 +548,38 @@ public class CommonUserServiceImpl extends ServiceImpl<CommonUserMapper, CommonU
         } else if (commonUser.getCid() != null && !commonUser.getCid().isEmpty()) {
             userDO.setCid(commonUser.getCid());
         }
-        if (commonUser.getPhone() != null) {
-            DBConnection();
-            String sUserId = null;
-            password = null;
-            if (excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon) > 0) {
-                excUpdate("update t_user t set t.LAST_LOGIN_TIME = now() where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
-                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
-            } else {
-                password = MD5Util.encrypt(commonUser.getPhone(), "123456");
-                excInsert("insert into t_user (USERNAME,PASSWORD,REALNAME,STATUS,MOBILE,CREATE_TIME,MODIFY_TIME,LAST_LOGIN_TIME,AVATAR,OPER_ID) " +
-                        "VALUES ('" + commonUser.getPhone() + "','" + password + "','" + userDO.getUserName() + "',1,'" + commonUser.getPhone() + "',NOW(),NOW(),NOW(),'https://liangxin.zthymaoyi.com/upload/default.jpg','"
-                        + UUID.randomUUID().toString(true) + "')", this.coon);
-                Long user_id = excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
-                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
-                excInsert("insert into t_user_role (USER_ID,ROLE_ID) " +
-                        "VALUES (" + user_id + ",7)", this.coon);
-                excInsert("insert into t_user_config (USER_ID,THEME,LAYOUT,MULTI_PAGE,FIX_SIDERBAR,FIX_HEADER,COLOR) " +
-                        "VALUES (" + user_id + ",'dark','side','0','1','1','rgb(66, 185, 131)')", this.coon);
-
-            }
-            close();
-            DBConnection1();
-            if (excSelect2("select * from s_user t where t.id = '" + sUserId + "'", this.coon1) != null) {
-                excUpdate("update s_user t set t.last_oper_time = now() where t.id = '" + sUserId + "'", this.coon1);
-            } else {
-                excInsert("insert into s_user (id,nick_name,user_name,password,avatar,money,status,oper_time,last_oper_time) " +
-                        "VALUES ('" + sUserId + "','" + userDO.getUserName() + "','" + commonUser.getPhone() + "','" + password + "','https://liangxin.zthymaoyi.com/upload/default.jpg','0.0',0,NOW(),NOW())", this.coon1);
-            }
-            close1();
-            userDO.setLiangxinId(sUserId);
-            this.updateById(userDO);
-        }
+//        if (commonUser.getPhone() != null) {
+//            DBConnection();
+//            String sUserId = null;
+//            password = null;
+//            if (excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon) > 0) {
+//                excUpdate("update t_user t set t.LAST_LOGIN_TIME = now() where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+//                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+//            } else {
+//                password = MD5Util.encrypt(commonUser.getPhone(), "123456");
+//                excInsert("insert into t_user (USERNAME,PASSWORD,REALNAME,STATUS,MOBILE,CREATE_TIME,MODIFY_TIME,LAST_LOGIN_TIME,AVATAR,OPER_ID) " +
+//                        "VALUES ('" + commonUser.getPhone() + "','" + password + "','" + userDO.getUserName() + "',1,'" + commonUser.getPhone() + "',NOW(),NOW(),NOW(),'https://liangxin.zthymaoyi.com/upload/default.jpg','"
+//                        + UUID.randomUUID().toString(true) + "')", this.coon);
+//                Long user_id = excSelect("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+//                sUserId = excSelect1("select * from t_user t where t.MOBILE = '" + commonUser.getPhone() + "'", this.coon);
+//                excInsert("insert into t_user_role (USER_ID,ROLE_ID) " +
+//                        "VALUES (" + user_id + ",7)", this.coon);
+//                excInsert("insert into t_user_config (USER_ID,THEME,LAYOUT,MULTI_PAGE,FIX_SIDERBAR,FIX_HEADER,COLOR) " +
+//                        "VALUES (" + user_id + ",'dark','side','0','1','1','rgb(66, 185, 131)')", this.coon);
+//
+//            }
+//            close();
+//            DBConnection1();
+//            if (excSelect2("select * from s_user t where t.id = '" + sUserId + "'", this.coon1) != null) {
+//                excUpdate("update s_user t set t.last_oper_time = now() where t.id = '" + sUserId + "'", this.coon1);
+//            } else {
+//                excInsert("insert into s_user (id,nick_name,user_name,password,avatar,money,status,oper_time,last_oper_time) " +
+//                        "VALUES ('" + sUserId + "','" + userDO.getUserName() + "','" + commonUser.getPhone() + "','" + password + "','https://liangxin.zthymaoyi.com/upload/default.jpg','0.0',0,NOW(),NOW())", this.coon1);
+//            }
+//            close1();
+//            userDO.setLiangxinId(sUserId);
+//            this.updateById(userDO);
+//        }
         //返回用户DTO
         cacheComponent.del(VERIFY_CODE_PREFIX + commonUser.getPhone());
         String accessToken = GeneratorUtil.genSessionId();