| | |
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dao.mybatis.redpack.RedPackWinInviteMapper;
|
| | | import com.yeshi.fanli.dto.mq.user.body.UserAccountBindingMQMsg;
|
| | | import com.yeshi.fanli.dto.msg.MsgRedPackAddContentDTO;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.UserActiveLog;
|
| | |
| | | UserInfo boss = threeSaleSerivce.getBoss(uid);
|
| | | if(boss != null) {
|
| | | UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(boss.getId());
|
| | | if (activeLog != null) {
|
| | | // 小于2.0.2版本不增加积分
|
| | | if (!VersionUtil.greaterThan_2_0_2("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | activeLog.getVersionCode()))
|
| | | return;
|
| | | }
|
| | | if (activeLog == null) |
| | | return;
|
| | |
|
| | | // 小于2.0.2版本不增加
|
| | | if (!VersionUtil.greaterThan_2_0_2("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | activeLog.getVersionCode()))
|
| | | return;
|
| | |
|
| | | bossReward(boss.getId(), uid, source, orderNo);
|
| | | }
|
| | |
| | | dto.setTitle("红包增加");
|
| | | dto.setMoney("¥" + money.setScale(2));
|
| | | dto.setBalance("¥" + redPackBalanceService.getBalance(uid).setScale(2));
|
| | | userMoneyMsgNotificationService.redPackMsg(uid, MsgTypeMoneyTypeEnum.redPackFirstSharedOrder, new Gson().toJson(dto), "红包可用于购买会员");
|
| | | userMoneyMsgNotificationService.redPackMsg(uid, MsgTypeMoneyTypeEnum.redPackFirstSharedOrder, |
| | | new Gson().toJson(dto), "请到“我的-红包”中查看");
|
| | | }
|
| | |
|
| | |
|
| | |
| | | dto.setTitle("红包增加");
|
| | | dto.setMoney("¥" + money.setScale(2));
|
| | | dto.setBalance("¥" + redPackBalanceService.getBalance(uid).setScale(2));
|
| | | userMoneyMsgNotificationService.redPackMsg(uid, MsgTypeMoneyTypeEnum.redPackMonthSharedOrder, new Gson().toJson(dto), "红包可用于购买会员");
|
| | | userMoneyMsgNotificationService.redPackMsg(uid, MsgTypeMoneyTypeEnum.redPackMonthSharedOrder,
|
| | | new Gson().toJson(dto), "请到“我的-红包”中查看");
|
| | | }
|
| | |
|
| | |
|
| | |
| | | return;
|
| | |
|
| | | UserActiveLog activeLog = userActiveLogService.getUserLatestActiveInfo(boss.getId());
|
| | | if (activeLog != null) {
|
| | | // 小于2.0.2版本不增加积分
|
| | | if (!VersionUtil.greaterThan_2_0_2("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | activeLog.getVersionCode()))
|
| | | return;
|
| | | }
|
| | | if (activeLog == null)
|
| | | return;
|
| | |
|
| | | |
| | | // 小于2.0.2版本不增加
|
| | | if (!VersionUtil.greaterThan_2_0_2("appstore".equalsIgnoreCase(activeLog.getChannel()) ? "ios" : "android",
|
| | | activeLog.getVersionCode()))
|
| | | return;
|
| | |
|
| | | // 同一队员奖励一次
|
| | | long totalReward = redPackWinInviteMapper.countByUidAndTeamUidAndType(boss.getId(), uid, RedPackWinInviteTypeEnum.inviteSucceed.name());
|
| | | if (totalReward > 0)
|
| | |
| | | dto.setTitle("红包增加");
|
| | | dto.setMoney("¥" + money.setScale(2));
|
| | | dto.setBalance("¥" + redPackBalanceService.getBalance(boss.getId()).setScale(2));
|
| | | userMoneyMsgNotificationService.redPackMsg(boss.getId(), MsgTypeMoneyTypeEnum.redPackInviteSucceed, new Gson().toJson(dto), "红包可用于购买会员");
|
| | | userMoneyMsgNotificationService.redPackMsg(boss.getId(), MsgTypeMoneyTypeEnum.redPackInviteSucceed,
|
| | | new Gson().toJson(dto), "请到“我的-红包”中查看");
|
| | | }
|
| | | }
|
| | |
|