瀏覽代碼

供应商状态

chao 4 年之前
父節點
當前提交
50e2b571ff

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

@@ -47,6 +47,12 @@ public interface BaseMapper {
      * @return
      */
     Integer getClubStatusByUserId(Integer userId);
+    /**
+     * 根据用户Id获取供应商状态
+     * @param userId
+     * @return
+     */
+    Integer getShopStatusByUserId(Integer userId);
     /**
      * 根据手机号获取运营人员Id
      *

+ 6 - 1
src/main/java/com/caimei365/user/service/impl/BaseServiceImpl.java

@@ -222,7 +222,12 @@ public class BaseServiceImpl implements BaseService {
                 // 判断机构状态
                 Integer clubStatus = baseMapper.getClubStatusByUserId(operationUserId);
                 if(null != clubStatus && 91 != clubStatus) {
-                    return ResponseJson.error("该手机号已被使用");
+                    return ResponseJson.error("该手机号已被机构使用");
+                }
+                // 判断供应商状态
+                Integer shopStatus = baseMapper.getShopStatusByUserId(operationUserId);
+                if(null != shopStatus && 91 != shopStatus) {
+                    return ResponseJson.error("该手机号已被供应商使用");
                 }
             }
         }

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

@@ -45,6 +45,11 @@
         from user
         where userID = #{userId}
     </select>
+    <select id="getShopStatusByUserId" resultType="java.lang.Integer">
+        select manufacturerStatus
+        from user
+        where userID = #{userId}
+    </select>
     <select id="getOperationIdByMobile" resultType="java.lang.Integer">
         select id from cm_mall_operation_user
         where mobile = #{mobile} and delFlag = '0'