| | |
| | | payment = new BigDecimal(0);
|
| | | goodsVO.setActualPay("¥" + payment.setScale(2, BigDecimal.ROUND_DOWN));
|
| | |
|
| | | BigDecimal fanli = hongBaoOrder.getHongBaoV2().getMoney();
|
| | | // 基础佣金
|
| | | BigDecimal commission = orderHongBaoMoneyComputeService.computeBaseFanliMoney(commonOrder);
|
| | | if (type == 3) { // 奖金
|
| | | goodsVO.setBonus("¥" + hongBaoOrder.getHongBaoV2().getMoney() +"");
|
| | | } else { // 佣金
|
| | | goodsVO.setCommision("¥" +commission);
|
| | | }
|
| | | |
| | | // 平台补贴
|
| | | BigDecimal vipFanli = hongBaoOrder.getHongBaoV2().getMoney();
|
| | | goodsVO.setSubsidy("¥" + vipFanli.subtract(commission).setScale(2, BigDecimal.ROUND_DOWN));
|
| | | goodsVO.setCommision("¥" +commission.setScale(2, BigDecimal.ROUND_DOWN));
|
| | | // 平台补贴 = 返利 - 基础佣金
|
| | | goodsVO.setSubsidy("¥" + fanli.subtract(commission).setScale(2, BigDecimal.ROUND_DOWN));
|
| | | // 达人补贴
|
| | | if (userLevel != UserLevelEnum.daRen) {
|
| | | BigDecimal darenFanli = orderHongBaoMoneyComputeService.computeFanliMoney(commonOrder, UserLevelEnum.daRen);
|
| | | goodsVO.setOriginSubsidy("¥" + darenFanli.subtract(commission).setScale(2, BigDecimal.ROUND_DOWN) + "");
|
| | | }
|
| | |
|
| | | if (type == 3) { // 奖金
|
| | | goodsVO.setBonus("¥" + fanli.setScale(2, BigDecimal.ROUND_DOWN) +"");
|
| | | }
|
| | | |
| | | voList.add(goodsVO);
|
| | |
|
| | | if (type == 1 ) {
|
| | |
| | |
|
| | | @Override
|
| | | public void teamReceive(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createTeamReceivedMsg(uid, money, balance, receivedDate);
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createTeamReceivedMsg(uid, money, balance, receivedDate, "团队收益");
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | public void teamDividend(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createTeamReceivedMsg(uid, money, balance, receivedDate, "团队分红");
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | couponRecord.setUpdateTime(date);
|
| | | userSystemCouponRecordService.insertSelective(couponRecord);
|
| | |
|
| | | // 消息推送
|
| | | int goodsCount = 0;
|
| | | String orderId = order.getOrderId();
|
| | | Integer orderType = order.getOrderType();
|
| | | List<CommonOrder> orderList = commonOrderService.listBySourceTypeAndOrderId(orderType, orderId);
|
| | | if (orderList != null && orderList.size() > 0) {
|
| | | for (CommonOrder co : orderList) {
|
| | | goodsCount += co.getCount();
|
| | | }
|
| | | }
|
| | | |
| | | // 资金消息
|
| | | UserInfo userInfo = userInfoService.selectByPKey(uid);
|
| | | userMoneyMsgNotificationService.rewardCounponReceived(uid, orderId, orderType, goodsCount,
|
| | | money, userInfo.getMyHongBao(), order.getThirdCreateTime());
|
| | | |
| | | // 券使用成功消息
|
| | | try {
|
| | | userOtherMsgNotificationService.rewardCouponEndMsg(uid, userSystemCoupon.getSource(), 1, "使用成功");
|
| | | } catch (Exception e) {
|
| | |
| | | public void rewardCounponReceived(Long uid, String orderId, int orderType, int goodsCount, BigDecimal money,
|
| | | BigDecimal balance, Date downTime);
|
| | |
|
| | | /**
|
| | | * 团队分红
|
| | | * @param uid
|
| | | * @param money
|
| | | * @param balance
|
| | | * @param receivedDate
|
| | | */
|
| | | public void teamDividend(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate);
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createTeamReceivedMsg(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate) {
|
| | | public static MsgMoneyDetail createTeamReceivedMsg(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate,
|
| | | String teamName) {
|
| | | if (money == null || balance == null || uid == null)
|
| | | return null;
|
| | |
|
| | |
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("结算月度", ClientTextStyleVO.COLOR_TITLE), contentList));
|
| | |
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("到账类目", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("团队收益", ClientTextStyleVO.COLOR_CONTENT), true));
|
| | | new ClientTextStyleVO(teamName, ClientTextStyleVO.COLOR_CONTENT), true));
|
| | |
|
| | | List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
| | | contentList2.add(new ClientTextStyleVO("¥" + money.setScale(2, BigDecimal.ROUND_DOWN), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|