lyhzzz 2 years ago
parent
commit
eb23dd3bc5
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/main/java/com/fdkankan/tk/service/impl/WxUserServiceImpl.java

+ 5 - 0
src/main/java/com/fdkankan/tk/service/impl/WxUserServiceImpl.java

@@ -145,6 +145,11 @@ public class WxUserServiceImpl extends ServiceImpl<IWxUserMapper, WxUser> implem
             if(phoneObj==null){
                 throw new BusinessException(ResultCode.WX_PHONE_ERROR);
             }
+            log.info(phoneObj.toJSONString());
+            List<WxUser> wxUsers = this.getByPhone(phoneObj.getString("phoneNumber"));
+            if(wxUsers.size() >0){
+                throw new BusinessException(ResultCode.WX_PHONE_EXIST);
+            }
             //return phoneObj.getString("phoneNumber");
             return phoneObj;
         } catch (Exception e){