| | |
| | | @Resource
|
| | | private HongBaoV2SettleTempService hongBaoV2SettleTempService;
|
| | |
|
| | | //下级被封禁,红包失效
|
| | | private void invalidHongBaoForbidden(Long id) {
|
| | | HongBaoV2 updateHongBaoV2 = new HongBaoV2(id);
|
| | | updateHongBaoV2.setState(HongBaoV2.STATE_SHIXIAO);
|
| | | updateHongBaoV2.setBeizhu("封禁失效");
|
| | | updateHongBaoV2.setUpdateTime(new Date());
|
| | | hongBaoV2Mapper.updateByPrimaryKeySelective(updateHongBaoV2);
|
| | | }
|
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | @Override
|
| | | public void inviteSettleTB(Long uid) throws OrderMoneySettleException {
|
| | |
| | | // 上级用户不是正常用户,订单均不能到账
|
| | | UserInfo userInfo = userInfoMapper.selectAvailableByPrimaryKey(co.getUserInfo().getId());
|
| | | if (userInfo == null || userInfo.getState() != UserInfo.STATE_NORMAL) {
|
| | | invalidHongBaoForbidden(item.getId());
|
| | | hongBaoList.remove(i);
|
| | | i--;
|
| | | }
|
| | |
| | | // 上级用户不是正常用户,订单均不能到账
|
| | | UserInfo userInfo = userInfoMapper.selectAvailableByPrimaryKey(co.getUserInfo().getId());
|
| | | if (userInfo == null || userInfo.getState() != UserInfo.STATE_NORMAL) {
|
| | | invalidHongBaoForbidden(item.getId());
|
| | | hongBaoList.remove(i);
|
| | | i--;
|
| | | }
|
| | |
| | | // 上级用户不是正常用户,订单均不能到账
|
| | | UserInfo userInfo = userInfoMapper.selectAvailableByPrimaryKey(co.getUserInfo().getId());
|
| | | if (userInfo == null || userInfo.getState() != UserInfo.STATE_NORMAL) {
|
| | | invalidHongBaoForbidden(item.getId());
|
| | | hongBaoList.remove(i);
|
| | | i--;
|
| | | }
|
| | |
| | | Long uid = its.next();
|
| | | if (userSubMoneyMap.get(uid) != null) {
|
| | | // 减去维权资金
|
| | | userMoney.put(uid, userMoney.get(uid).subtract(userSubMoneyMap.get(uid))); |
| | | userMoney.put(uid, userMoney.get(uid).subtract(userSubMoneyMap.get(uid)));
|
| | | }
|
| | | }
|
| | | }
|