| | |
| | | import com.stylefeng.guns.modular.account.server.UserWithdrawalService; |
| | | import com.stylefeng.guns.modular.system.model.UserBankAccount; |
| | | import com.stylefeng.guns.modular.system.model.UserInfo; |
| | | import com.stylefeng.guns.modular.system.model.UserWithdrawal; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.annotations.Api; |
| | |
| | | int count = bankAccountService.selectCount(new EntityWrapper<UserBankAccount>().eq("userId", uid) |
| | | .eq("userType", 1).eq("bankCardCode", userBankAccount.getBankCardCode()) |
| | | .eq("status", 1)); |
| | | if(count > 0){ |
| | | if (count > 0) { |
| | | return ResultUtil.error("不能重复添加银行卡"); |
| | | } |
| | | |
| | | List<UserWithdrawal> userId = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", user.getPhone()).eq("userType",1)); |
| | | if(userId.size()==0){ |
| | | return ResultUtil.error("请先进行个人用户进件信息填写"); |
| | | } |
| | | // List<UserWithdrawal> userId = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", user.getPhone()).eq("userType",1)); |
| | | // if(userId.size()==0){ |
| | | // return ResultUtil.error("请先进行个人用户进件信息填写"); |
| | | // } |
| | | userBankAccount.setUserId(uid); |
| | | UserBankAccount userBankAccount1 = new UserBankAccount(); |
| | | BeanUtils.copyProperties(userBankAccount, userBankAccount1); |
| | |
| | | // userBankAccount1.setAcctValidationFailureMsg(settleAcctResp.getAcctValidationFailureMsg()); |
| | | // userBankAccount1.setAcctValidationFinishedAt(settleAcctResp.getAcctValidationFinishedAt().toString()); |
| | | // userBankAccount1.setSettleAcctId(settleAcctResp.getSettleAcctId()); |
| | | bankAccountService.updateById(userBankAccount1); |
| | | // bankAccountService.updateById(userBankAccount1); |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |