| | |
| | | if (notificationMap.get(child.getType()) == null) {
|
| | | HongBaoV2 tempHongBao = new HongBaoV2(child.getId());
|
| | | tempHongBao.setUserInfo(child.getUserInfo());
|
| | | tempHongBao.setMoney(childUpdate.getMoney());
|
| | | tempHongBao
|
| | | .setMoney(childUpdate.getMoney() == null ? new BigDecimal(0) : childUpdate.getMoney());
|
| | | CommonOrder tempCommonOrder = new CommonOrder(commonOrder.getId());
|
| | | tempCommonOrder.setPayment(commonOrder.getPayment());
|
| | | notificationMap.put(child.getType(), new HongBaoOrder(tempCommonOrder, tempHongBao));
|
| | | } else {
|
| | | // 增加付款金额与资金
|
| | | HongBaoOrder tempHongBaoOrder = notificationMap.get(child.getType());
|
| | | tempHongBaoOrder.getCommonOrder().setPayment(
|
| | | tempHongBaoOrder.getCommonOrder().getPayment().add(commonOrder.getPayment()));
|
| | | tempHongBaoOrder.getHongBaoV2()
|
| | | .setMoney(tempHongBaoOrder.getHongBaoV2().getMoney().add(childUpdate.getMoney()));
|
| | | if (commonOrder.getPayment() != null)
|
| | | tempHongBaoOrder.getCommonOrder().setPayment(
|
| | | tempHongBaoOrder.getCommonOrder().getPayment().add(commonOrder.getPayment()));
|
| | | if (childUpdate.getMoney() != null)
|
| | | tempHongBaoOrder.getHongBaoV2()
|
| | | .setMoney(tempHongBaoOrder.getHongBaoV2().getMoney().add(childUpdate.getMoney()));
|
| | | notificationMap.put(child.getType(), tempHongBaoOrder);
|
| | | }
|
| | |
|
| | |
| | | firstHongbao.setMoney(
|
| | | MoneyBigDecimalUtil.mul(hongBao.getMoney(), firstRate.divide(new BigDecimal(100))));
|
| | | }
|
| | | //返利为0的不通知
|
| | | // 返利为0的不通知
|
| | | if (firstHongbao.getMoney() == null || firstHongbao.getMoney().compareTo(new BigDecimal(0)) <= 0)
|
| | | return;
|
| | |
|
| | |
| | | secondHongbao.setMoney(
|
| | | MoneyBigDecimalUtil.mul(hongBao.getMoney(), secondRate.divide(new BigDecimal(100))));
|
| | | }
|
| | | |
| | | //返利为0的不统计
|
| | |
|
| | | // 返利为0的不统计
|
| | | if (secondHongbao.getMoney() == null || secondHongbao.getMoney().compareTo(new BigDecimal(0)) <= 0)
|
| | | return;
|
| | |
|
| | |
| | | public List<HongBaoV2> listChildrenById(Long id) {
|
| | | return hongBaoV2Mapper.listChildrenById(id);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public List<Long> getUidByNear30DayShareSucceed(){
|
| | | public List<Long> getUidByNear30DayShareSucceed() {
|
| | | return hongBaoV2Mapper.getUidByNear30DayShareSucceed();
|
| | | }
|
| | | }
|