浏览代码

feature 校验手机号的问题

xiahan 4 月之前
父节点
当前提交
93651e40e2

+ 0 - 1
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/AccountService.java

@@ -14,7 +14,6 @@ import com.rongwei.rwcommon.base.R;
 public interface AccountService {
     R bind(AccountBindVo accountBindVo);
 
-
     R info(String accountNumber);
 
     R list();

+ 4 - 4
zhsw-common/src/main/java/com/rongwei/zhsw/system/wechat/impl/AccountServiceImpl.java

@@ -66,10 +66,10 @@ public class AccountServiceImpl implements AccountService {
             log.error("户号不存在:{}", accountBindVo.getAccountNum());
             throw new CustomException("户号不存在!");
         }
-        // if (!swUserManagementVo.getUsername().equals(accountBindVo.getPhoneNum())) {
-        //     log.error("户名错误");
-        //     throw new CustomException("户名错误!");
-        // }
+        if (StringUtils.isBlank(accountBindVo.getPhoneNum())) {
+            log.error("手机号");
+            throw new CustomException("手机号必填!");
+        }
         String openId = WeChatUtils.getCurrentWeChatOpenId();
         if (swUserManagementVo.getWechatSign().contains(openId)) {
             log.error("当前户号已绑定");