| | |
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.config.SystemConfigService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoV2Service;
|
| | | import com.yeshi.fanli.service.inter.money.UserMoneyDebtService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserMoneyMsgNotificationService;
|
| | | import com.yeshi.fanli.service.inter.push.PushService;
|
| | | import com.yeshi.fanli.service.inter.user.ExtractRecordService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserAccountBindingHistoryService userAccountBindingHistoryService;
|
| | |
|
| | | @Resource
|
| | | private UserMoneyDebtService userMoneyDebtService;
|
| | |
|
| | | @Transactional
|
| | | public Integer addExtract(Extract extract) {
|
| | |
| | | return 3;
|
| | | }
|
| | |
|
| | | // 有借贷关系
|
| | | boolean isHaveToReplay = userMoneyDebtService.isHaveDebtToRepay(extract.getUserInfo().getId());
|
| | | if (isHaveToReplay) {
|
| | | return 110;
|
| | | }
|
| | |
|
| | | Integer type = setExtractRecord(extract, maxCount, maxMoney);
|
| | | if (type != 0) {
|
| | | return type;
|
| | | }
|
| | |
|
| | | extractMapper.insertSelective(extract);
|
| | |
|
| | | ExtractAuditRecord auditRecord = new ExtractAuditRecord();
|
| | |
| | | if ("是".equals(autoExtract)) {
|
| | | LogHelper.userInfo("uid=" + user.getId() + ",提交转账申请!");
|
| | | } else {// 暂时不自动提现
|
| | | transfer(extract, null);
|
| | | // transfer(extract, null);
|
| | | ;
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
| | | Long count = hongBaoV2Mapper.countByUidAndState(uid, HongBao.STATE_YILINGQU);
|
| | | if (count == null || count == 0)
|
| | | throw new ExtractException(1, "没有已到账的红包");
|
| | | // 查询是否有欠账
|
| | | boolean isDebt = userMoneyDebtService.isHaveDebtToRepay(uid);
|
| | | if (isDebt)
|
| | | throw new ExtractException(3, "有欠账未还");
|
| | | // 获取所有收入所得
|
| | | BigDecimal hongBaoMoney = hongBaoV2Service.computeMoneyByUidAndState(uid, HongBaoV2.STATE_YILINGQU);
|
| | |
|