| | |
| | | winInvite.setUid(bossId);
|
| | | winInvite.setTeamUid(teamUid);
|
| | | winInvite.setMoney(money);
|
| | | winInvite.setIdentifyCode(StringUtil.Md5(RedPackWinInviteTypeEnum.oneStageReward.name() + ":" + teamUid));
|
| | | redPackWinInviteMapper.insertSelective(winInvite);
|
| | |
|
| | | // 增加红包
|
| | |
| | | private void twoStageRewardToBoss(Long bossId, Long teamUid, Date oneStageTime, Integer source, String orderNo) throws Exception{
|
| | | // 第一阶段完成之后的90天内 ; 队友产生的订单中(自购+分享),邀请人累计产生≥1 元奖金
|
| | | Date endDate = DateUtil.plusDayDate(Constant.TWO_STAGE_LIMIT_DAYS, oneStageTime);
|
| | | BigDecimal rewardMoney = hongBaoV2CountService.getShareRewardByTeamUid(bossId, teamUid, endDate);
|
| | | // 统计订单奖金 (“好友自购”和“好友分享”)
|
| | | BigDecimal rewardMoney = hongBaoV2CountService.getOrderRewardByTeamUid(bossId, teamUid, endDate);
|
| | | if (rewardMoney == null || rewardMoney.compareTo(Constant.TWO_STAGE_ORDER_REWARD_MIN) < 0)
|
| | | return;
|
| | |
|
| | |
| | | winInvite.setCreateTime(new Date());
|
| | | winInvite.setUpdateTime(new Date());
|
| | | winInvite.setType(RedPackWinInviteTypeEnum.twoStageReward);
|
| | | winInvite.setIdentifyCode(StringUtil.Md5(RedPackWinInviteTypeEnum.twoStageReward.name() + ":" + teamUid));
|
| | | redPackWinInviteMapper.insertSelective(winInvite);
|
| | |
|
| | | // 4、增加红包
|
| | |
| | | if (monthSpace != totalNum + 1)
|
| | | return;
|
| | |
|
| | | // 每月给你累计产生≥2 元
|
| | | BigDecimal rewardMoney = hongBaoV2CountService.getShareRewardByTeamUidLastMonth(bossId, teamUid);
|
| | | // 统计本月获得奖金 (“好友自购”和“好友分享”)
|
| | | BigDecimal rewardMoney = hongBaoV2CountService.getOrderRewardByTeamUidTheMonth(bossId, teamUid);
|
| | | if (rewardMoney == null || rewardMoney.compareTo(Constant.THREE_STAGE_ORDER_REWARD_MIN) < 0)
|
| | | return;
|
| | |
|
| | |
| | | winInvite.setMoney(money);
|
| | | winInvite.setSource(source);
|
| | | winInvite.setOrderNo(orderNo);
|
| | | winInvite.setIdentifyCode(StringUtil.Md5(RedPackWinInviteTypeEnum.threeStageReward.name() + ":" + teamUid + "-" + monthSpace));
|
| | | redPackWinInviteMapper.insertSelective(winInvite);
|
| | |
|
| | | // 4、增加红包
|