| | |
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.AlipayAccountValidNormalHistoryMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.money.UserMoneyDebtMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.money.UserMoneyDebtReturnHistoryMapper;
|
| | | import com.yeshi.fanli.entity.bus.user.AlipayAccountValidNormalHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDebt;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDebt.UserMoneyDebtTypeEnum;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Resource
|
| | | private AlipayAccountValidNormalHistoryMapper alipayAccountValidNormalHistoryMapper;
|
| | |
|
| | | @Override
|
| | | public void addUserMoneyDebt(UserMoneyDebt debt) throws UserMoneyDebtException {
|
| | |
| | | }
|
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.fanliOrderWeiQuan(uid, weiQuanDrawBack.getOrderId(),Constant.SOURCE_TYPE_TAOBAO, money,
|
| | | userInfoService.getBalance(uid));
|
| | | userMoneyMsgNotificationService.fanliOrderWeiQuan(uid, weiQuanDrawBack.getOrderId(),
|
| | | Constant.SOURCE_TYPE_TAOBAO, money, userInfoService.getBalance(uid));
|
| | |
|
| | | break;
|
| | | case HongBaoV2.TYPE_SHARE_GOODS:
|
| | |
| | | weiQuanDrawBack, money);
|
| | | userMoneyService.subUserMoney(uid, money, userMoneyDetail);
|
| | |
|
| | | userMoneyMsgNotificationService.shareOrderWeiQuan(debt.getUid(), weiQuanDrawBack.getOrderId(),Constant.SOURCE_TYPE_TAOBAO,
|
| | | money, userInfoService.getBalance(uid));
|
| | | userMoneyMsgNotificationService.shareOrderWeiQuan(debt.getUid(), weiQuanDrawBack.getOrderId(),
|
| | | Constant.SOURCE_TYPE_TAOBAO, money, userInfoService.getBalance(uid));
|
| | |
|
| | | } catch (UserMoneyDetailException e) {
|
| | | throw new UserMoneyDebtException(12, "插入资金详情出错");
|
| | |
| | | }
|
| | |
|
| | | // 新版通知
|
| | | userMoneyMsgNotificationService.inviteOrderWeiQuan(uid, weiQuanDrawBack.getOrderId(),Constant.SOURCE_TYPE_TAOBAO, money,
|
| | | userInfoService.getBalance(uid));
|
| | | userMoneyMsgNotificationService.inviteOrderWeiQuan(uid, weiQuanDrawBack.getOrderId(),
|
| | | Constant.SOURCE_TYPE_TAOBAO, money, userInfoService.getBalance(uid));
|
| | | break;
|
| | | }
|
| | | } else if (debt.getType() == UserMoneyDebtTypeEnum.extractVerify) {// 提现验证
|
| | | // 新版资金记录
|
| | | AlipayAccountValidNormalHistory aliPayAccountHistory = alipayAccountValidNormalHistoryMapper
|
| | | .selectByPrimaryKey(debt.getSourceId());
|
| | | if (aliPayAccountHistory == null)
|
| | | return;
|
| | | try {
|
| | | UserMoneyDetail userMoneyDetail = UserMoneyDetailFactory.createExtractAccountValid(aliPayAccountHistory,
|
| | | money);
|
| | | userMoneyService.subUserMoney(aliPayAccountHistory.getUid(), money, userMoneyDetail);
|
| | | } catch (UserMoneyDetailException e) {
|
| | | throw new UserMoneyDebtException(12, "插入资金详情出错");
|
| | | }
|
| | |
|
| | | userMoneyMsgNotificationService.alipayAccountValid(aliPayAccountHistory);
|
| | | }
|
| | | }
|
| | |
|