Browse Source

联合丽格

huangzhiguo 2 years ago
parent
commit
948eb53a0b

+ 8 - 0
src/main/java/com/caimei365/user/mapper/BaseMapper.java

@@ -50,6 +50,14 @@ public interface BaseMapper {
      * @return
      */
     Integer getUserIdByOrganize(@Param("organizeId") Integer organizeId, @Param("mobile") String mobile);
+
+    /**
+     * 获取组织机构审核状态
+     * @param organizeId
+     * @param mobile
+     * @return
+     */
+    Integer getUserIdByOrganizeStatus(@Param("organizeId") Integer organizeId, @Param("mobile") String mobile);
     /**
      * 根据运营人员手机号获用户Id
      *

+ 4 - 0
src/main/java/com/caimei365/user/service/impl/BaseServiceImpl.java

@@ -229,6 +229,10 @@ public class BaseServiceImpl implements BaseService {
                 if (dbUserId == null) {
                     return ResponseJson.error("该手机号暂未注册");
                 }
+                Integer clubStatus = baseMapper.getUserIdByOrganizeStatus(4, mobile);
+                if ( null != clubStatus && 1 == clubStatus) {
+                    return ResponseJson.error(-1,"账号待审核,请耐心等待",null);
+                }
                 // 欢迎登录联合丽格,您的验证码为:{s6},5分钟内有效,请勿泄漏他人。
                 content = "【丽格集采联盟】欢迎登录联合丽格,您的验证码为:" + randomCode + ",5分钟内有效,请勿泄漏他人。";
                 codeTypeTxt = "登录联合丽格";

+ 7 - 7
src/main/java/com/caimei365/user/service/impl/LoginServiceImpl.java

@@ -222,7 +222,7 @@ public class LoginServiceImpl implements LoginService {
                     return ResponseJson.error(-1, "账号待审核,请耐心等待审核结果", null);
                 }
                 if (92 == baseUser.getClubStatus()) {
-                    return ResponseJson.error(-1, "账号审核未通过,请重新提交资料", null);
+                    return ResponseJson.error(-3, "账号审核未通过,请重新提交资料", null);
                 }
             }
             // 比对密码
@@ -256,7 +256,7 @@ public class LoginServiceImpl implements LoginService {
                 }
             }
         }
-        return ResponseJson.error("账户名与密码不匹配,请重新输入", null);
+        return ResponseJson.error(-1,"账户名与密码不匹配,请重新输入", null);
     }
 
     /**
@@ -345,7 +345,7 @@ public class LoginServiceImpl implements LoginService {
             // 查看验证码是否过期
             long expireTime = redisService.getExpireTime("code:" + mobile);
             if (expireTime < 0) {
-                return ResponseJson.error("验证码已失效,请重新获取");
+                return ResponseJson.error(-1,"验证码已失效,请重新获取",null);
             }
             // 获取redis手机短信验证码
             Object randomCode = redisService.get("code:"+mobile);
@@ -382,7 +382,7 @@ public class LoginServiceImpl implements LoginService {
                             return ResponseJson.error(-1, "账号待审核,请耐心等待审核结果", null);
                         }
                         if (92 == baseUser.getClubStatus()) {
-                            return ResponseJson.error(-1, "账号审核未通过,请重新提交资料", null);
+                            return ResponseJson.error(-3, "账号审核未通过,请重新提交资料", null);
                         }
                     }
                     if (baseUser.getUserIdentity() == 1) {
@@ -393,13 +393,13 @@ public class LoginServiceImpl implements LoginService {
                         return logonVerify(baseUser);
                     }
                 } else {
-                    return ResponseJson.error("验证码不匹配,请重新输入");
+                    return ResponseJson.error(-1,"验证码不匹配,请重新输入",null);
                 }
             } else {
-                return ResponseJson.error("验证码错误,请重新获取");
+                return ResponseJson.error(-1,"验证码错误,请重新获取",null);
             }
         } else {
-            return ResponseJson.error("验证码错误,请重新获取");
+            return ResponseJson.error(-1,"验证码错误,请重新获取",null);
         }
     }
 

+ 8 - 0
src/main/resources/mapper/BaseMapper.xml

@@ -82,6 +82,14 @@
           AND u.userIdentity IN (1, 2, 3, 4)
         LIMIT 1
     </select>
+    <select id="getUserIdByOrganizeStatus" resultType="java.lang.Integer">
+        SELECT clubStatus
+        FROM USER
+        WHERE userOrganizeID = #{organizeId}
+          AND bindMobile = #{mobile}
+          AND userIdentity IN (1, 2, 3, 4)
+        LIMIT 1
+    </select>
     <select id="getOperationUserIdByMobile" resultType="java.lang.Integer">
         select userID
         from cm_mall_operation_user

+ 1 - 1
src/main/resources/mapper/LoginMapper.xml

@@ -134,7 +134,7 @@
         limit 1
     </select>
     <select id="getOperationUser" resultType="java.lang.Integer">
-        select id from cm_mall_operation_user where mobile = #{mobileOrEmail} and delFlag = 0
+        select id from cm_mall_operation_user where mobile = #{mobileOrEmail} and delFlag = 0 and userOrganizeID = 4 limit 1
     </select>
     <insert id="insertOperation">
         INSERT INTO cm_mall_operation_user (userOrganizeID, userType, userID, clubID, mobile, linkName, STATUS, unionId, bindTime, delFlag)