| | |
| | | @PostMapping("/register") |
| | | public Result register(@Validated RegisterDto dto){ |
| | | try { |
| | | if(StringUtils.isEmpty(dto.getNikeName())){ |
| | | return Result.error("昵称不能为空!"); |
| | | } |
| | | // 验证手机号 |
| | | boolean isPhoneValid = ValidatorUtil.isValidPhone(dto.getAccount()); |
| | | if(!isPhoneValid){ |
| | |
| | | long count = userPolicyService.count(new LambdaQueryWrapper<>(UserPolicy.class) |
| | | .eq(UserPolicy::getUserId, userAccount.getId()) |
| | | .eq(UserPolicy::getProductId,f.getId()) |
| | | .and(a->a.ne(UserPolicy::getPayStatus,2).or().ne(UserPolicy::getPayStatus,1)) |
| | | .eq(UserPolicy::getPayStatus,2) |
| | | .ne(UserPolicy::getApprovalStatus,2) |
| | | ); |
| | | if(count > 0){ |