Browse Source

增加入驻校验

Yangzw 7 months ago
parent
commit
8208d4f644

+ 5 - 0
feifan-module-mall/feifan-module-sale-biz/src/main/java/cn/newfeifan/mall/module/sale/service/merchantapply/MerchantApplyServiceImpl.java

@@ -46,6 +46,11 @@ public class MerchantApplyServiceImpl implements MerchantApplyService {
     @Override
     public Long createMerchantApply(MerchantApplySaveReqVO createReqVO) {
 
+        if(merchantApplyMapper.selectOne(MerchantApplyDO::getApplyMemberUserId, getLoginUserId()) != null){
+            ErrorCode ERROR = new ErrorCode(1_002_029_003, "当前手机号已存在商户账号");
+            throw exception(ERROR);
+        }
+
         // 校验存在
         if (usersService.getUserByMobile(createReqVO.getContactNumber()) != null) {
             ErrorCode ERROR = new ErrorCode(1_002_029_003, "联络人账户已存在");