| | |
| | |
|
| | | UserInfo userInfo = userInfoMapper.selectByPrimaryKeyForUpdate(uid);
|
| | | if (userInfo.getMyHongBao().compareTo(new BigDecimal("0")) <= 0)
|
| | | throw new AlipayAccountException(AlipayAccountException.CODE_NO_MONEY, "你的账户目前没有余额,暂时不能绑定支付宝提现");
|
| | | throw new AlipayAccountException(AlipayAccountException.CODE_NO_MONEY, "你的账户目前没有余额,无需绑定提现帐号。");
|
| | |
|
| | | // 需要转账验证
|
| | | BigDecimal money = new BigDecimal("0.1");
|
| | |
| | | public boolean canVerifyAlipayAccount(Long uid) throws BindingAccountException {
|
| | | UserInfo userInfo = userInfoMapper.selectByPrimaryKeyForUpdate(uid);
|
| | | if (userInfo.getMyHongBao().compareTo(new BigDecimal("0")) <= 0)
|
| | | throw new BindingAccountException(1, "账户无余额");
|
| | | throw new BindingAccountException(1, "你的账户目前没有余额,无需绑定提现帐号。");
|
| | |
|
| | | AlipayAccountValidNormalHistory latest = alipayAccountValidNormalHistoryMapper.selectLatestByUid(uid);
|
| | | if (latest != null) {
|
| | |
| | | caLatest.setTimeInMillis(latest.getCreateTime().getTime());
|
| | | Calendar nowLatest = Calendar.getInstance();
|
| | | if (caLatest.get(Calendar.MONTH) == nowLatest.get(Calendar.MONTH))// 上次更改和现在是同一个月
|
| | | throw new BindingAccountException(2, "本月支付宝绑定次数超限");
|
| | | throw new BindingAccountException(2, "每月仅可修改1次提现账号,请下月再试吧。");
|
| | | }
|
| | | return true;
|
| | | }
|