| | |
| | |
|
| | | String shareRate = "可享佣金的<label style=\"color:#E5005C;\">%s</label>";
|
| | | String fansRate = "最高佣金的<label style=\"color:#E5005C;\">%s</label>";
|
| | | String fansIndirect = "最高佣金的<label style=\"color:#E5005C;\">%s</label>";
|
| | | String teamBonus = "可享佣金的<label style=\"color:#E5005C;\">%s</label>";
|
| | | String fansIndirect = "团队分红池<label style=\"color:#E5005C;\">%s</label>";
|
| | | String teamBonus = "团队分红池<label style=\"color:#E5005C;\">%s</label>";
|
| | | // 达人版
|
| | | JSONObject jsonrRed1 = new JSONObject();
|
| | | jsonrRed1.put("shareRate", String.format(shareRate, "152%"));
|
| | |
| | |
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.bus.user.HongBaoV2;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserSystemCouponRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.ESOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.InviteOrderSubsidyService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMapService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoWeiQuanOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.UserCustomSettingsService;
|
| | |
| | |
|
| | | @Resource
|
| | | private ThreeSaleSerivce threeSaleSerivce;
|
| | | |
| | | @Resource
|
| | | private OrderHongBaoMapService orderHongBaoMapService;
|
| | |
|
| | | /**
|
| | | * 订单列表
|
| | |
| | | if (userLevel == null)
|
| | | userLevel = UserLevelEnum.daRen;
|
| | | UserLevelEnum upperLevel = UserLevelEnum.superVIP;
|
| | | |
| | | |
| | | BigDecimal upperTotalMoney = new BigDecimal(0);
|
| | | List<GoodsRebateVO> voList = new ArrayList<>();
|
| | | for (HongBaoOrder hongBaoOrder : hoList) {
|
| | |
| | | if (payment == null)
|
| | | payment = new BigDecimal(0);
|
| | | goodsVO.setActualPay("¥" + payment.setScale(2));
|
| | |
|
| | |
|
| | | BigDecimal commission = orderHongBaoMoneyComputeService.computeBaseFanliMoney(commonOrder);
|
| | | if (type == 3) { // 奖金
|
| | |
| | | orderRebateVO.setType(type);
|
| | | orderRebateVO.setStateDesc(stateDesc);
|
| | | orderRebateVO.setListGoods(voList);
|
| | | orderRebateVO.setUserLevel(userLevel.name());
|
| | |
|
| | | // 上级返利
|
| | | if (upperLevel != null) {
|
| | | orderRebateVO.setUpperFanLi("¥" + upperTotalMoney);
|
| | | orderRebateVO.setUserLevel(upperLevel.name());
|
| | | orderRebateVO.setJumpLink(upperLevel.getDetailLink());
|
| | | }
|
| | |
|
| | | |
| | | int freeState = 0;
|
| | | boolean rewardSuccess = false;
|
| | | List<String> listNo = new ArrayList<String>();
|
| | | listNo.add(orderNo);
|
| | | List<UserSystemCouponRecord> useRecord = userSystemCouponRecordService.getRecordByOrderNoList(sourceType, listNo);
|
| | | if (useRecord != null && useRecord.size() > 0) {
|
| | | for (UserSystemCouponRecord couponRecord : useRecord) {
|
| | | int goodSource = couponRecord.getGoodSource();
|
| | | if (goodSource == 0)
|
| | | goodSource = 1;
|
| | |
|
| | | Integer state = couponRecord.getState();
|
| | | String systemCouponType = couponRecord.getCouponType();
|
| | | if (CouponTypeEnum.rebatePercentCoupon.name().equals(systemCouponType)
|
| | | && UserSystemCouponRecord.STATE_SUCCESS == state) {
|
| | | String cType = couponRecord.getCouponType();
|
| | | if (CouponTypeEnum.rebatePercentCoupon.name().equals(cType) && UserSystemCouponRecord.STATE_SUCCESS == state) {
|
| | | rewardSuccess = true;
|
| | | break;
|
| | | } else if (CouponTypeEnum.freeCoupon.name().equals(cType) || CouponTypeEnum.welfareFreeCoupon.name().equals(cType)
|
| | | || CouponTypeEnum.freeCouponBuy.name().equals(cType)) {
|
| | | freeState = state;
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | if (rewardSuccess) { // 已使用奖励券
|
| | | Map<String, Object> jumpLink = new HashMap<String, Object>();
|
| | | jumpLink.put("orderNo", orderNo);
|
| | | jumpLink.put("goodsType", sourceType + "");
|
| | | orderRebateVO.setCouponSuccess(true);
|
| | | orderRebateVO.setCouponParams(jumpLink.toString());
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("orderNo", orderNo);
|
| | | params.put("goodsType", sourceType + "");
|
| | | BigDecimal couponMoney = orderHongBaoMapService.getCouponHongbaoByOrderNo(orderNo, uid);
|
| | | if (couponMoney == null) {
|
| | | couponMoney = new BigDecimal(0);
|
| | | }
|
| | | orderRebateVO.setCouponType(1);
|
| | | orderRebateVO.setCouponUse(true);
|
| | | orderRebateVO.setCouponText("奖励成功");
|
| | | orderRebateVO.setCouponDesc("已再返¥" +couponMoney.setScale(2));
|
| | | orderRebateVO.setCouponParams(params.toString());
|
| | | orderRebateVO.setCouponJumpDetail(jumpDetailV2Service.getByTypeCache("rewardCouponDetail"));
|
| | | } else { // 可使用奖励券
|
| | | Date accountTime = hongBaoCountVO.getAccountTime();
|
| | | } else if (freeState > 0) { // 已使用免单券
|
| | | JSONObject params = new JSONObject();
|
| | | params.put("orderNo", orderNo);
|
| | | params.put("goodsType", sourceType + "");
|
| | | orderRebateVO.setCouponType(2);
|
| | | orderRebateVO.setCouponUse(true);
|
| | | orderRebateVO.setCouponParams(params.toString());
|
| | | orderRebateVO.setCouponJumpDetail(jumpDetailV2Service.getByTypeCache("freeCouponDetail"));
|
| | | if (UserSystemCouponRecord.STATE_FREE_ON == freeState) {
|
| | | orderRebateVO.setCouponText("免单中");
|
| | | } else if (UserSystemCouponRecord.STATE_SUCCESS == freeState) {
|
| | | orderRebateVO.setCouponText("免单成功");
|
| | | } else if (UserSystemCouponRecord.STATE_FAIL_RULE == freeState
|
| | | || UserSystemCouponRecord.STATE_FAIL_DRAWBACK == freeState) {
|
| | | orderRebateVO.setCouponText("免单失败");
|
| | | }
|
| | | } else {
|
| | | Date accountTime = hongBaoV2.getGetTime();
|
| | | if (accountTime != null) {
|
| | | boolean vip = userInviteService.verifyVIP(uid);
|
| | | Date endDay = DateUtil.plusDayDate(Constant.COUPON_REWARD_LIMIT_DAY, accountTime);
|
| | |
| | | if (couponRecord == null
|
| | | || (couponRecord.getCouponType() == CouponTypeEnum.rebatePercentCoupon.name() && couponRecord.getState() != UserSystemCouponRecord.STATE_SUCCESS)) {
|
| | | orderRebateVO.setCoupon(true);
|
| | | orderRebateVO.setCouponType(1);
|
| | | orderRebateVO.setCouponText("立即使用");
|
| | | orderRebateVO.setCouponDesc("返利再返");
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserMsgReadStateService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class MsgMoneyDetailServiceImpl implements MsgMoneyDetailService {
|
| | |
| | |
|
| | | @Override
|
| | | public void addMsgMoneyDetail(MsgMoneyDetail detail) throws MsgMoneyDetailException {
|
| | | if (detail == null)
|
| | | throw new MsgMoneyDetailException(1, "消息为空");
|
| | | if (detail == null || detail.getUser() == null || StringUtil.isNullOrEmpty(detail.getExtraInfo()))
|
| | | throw new MsgMoneyDetailException(1, "消息信息不全");
|
| | | if (detail.getMsgType() == MsgTypeMoneyTypeEnum.extract) {
|
| | | if (detail.getExtract() == null || detail.getUser() == null)
|
| | | if (detail.getExtract() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | | MsgMoneyDetail msg = msgMoneyDetailMapper.selectBySourceIdAndMsgType(detail.getExtract().getId(),
|
| | | MsgTypeMoneyTypeEnum.extract);
|
| | |
| | | update.setRead(false);
|
| | | update.setStateDesc(detail.getStateDesc());
|
| | | msgMoneyDetailMapper.updateByPrimaryKeySelective(update);
|
| | | msgExtraService.updateMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | msgExtraService.addMsgExtra(update.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | }
|
| | | } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.extractValid) {
|
| | | if (detail.getAlipayAccountValid() == null || detail.getUser() == null)
|
| | | if (detail.getAlipayAccountValid() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | | MsgMoneyDetail msg = msgMoneyDetailMapper.selectBySourceIdAndMsgType(detail.getAlipayAccountValid().getId(),
|
| | | MsgTypeMoneyTypeEnum.extractValid);
|
| | |
| | | update.setRead(false);
|
| | | update.setStateDesc(detail.getStateDesc());
|
| | | msgMoneyDetailMapper.updateByPrimaryKeySelective(update);
|
| | | msgExtraService.updateMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | msgExtraService.addMsgExtra(update.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | }
|
| | | } else {
|
| | | if(detail.getUser() == null)
|
| | | throw new MsgMoneyDetailException(2, "消息信息不全");
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgMoneyDetailMapper.insertSelective(detail);
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | }
|
| | | userMsgReadStateService.addMoneyMsgUnReadCount(detail.getUser().getId(), 1);
|
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.scheduling.annotation.Async;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dto.push.PushContentDTO;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgMoneyDetail.MsgTypeMoneyTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.user.AlipayAccountValidNormalHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.Extract;
|
| | | import com.yeshi.fanli.entity.bus.user.ExtractWeiXinRecord;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.config.push.PushMsgFactory;
|
| | | import com.yeshi.fanli.exception.msg.MsgMoneyDetailException;
|
| | |
| | | extract, null, null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | extract, reason, null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | extract, null, alipayNo);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | Constant.systemCommonConfig.getProjectChineseName(), new BigDecimal("0.1"), limitDay, change);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | Constant.systemCommonConfig.getProjectChineseName(), new BigDecimal("0.1"), limitDay, change);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | uid, Constant.TYPE_REBATE, downTime, false);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | goodsCount, downTime, Constant.TYPE_REBATE);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | uid, Constant.TYPE_SHAER, downTime, false);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | goodsCount, downTime, Constant.TYPE_SHAER);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public void inviteOrderReceived(Long uid, int orderType, int orderCount, int goodsCount, BigDecimal money,
|
| | | BigDecimal balance) {
|
| | | // MsgMoneyDetail detail = MsgMoneyDetailFactory.createInviteReceivedMsg(money, balance, orderType, orderCount, goodsCount,
|
| | | // uid, null);
|
| | | public void systemEqualize(Long uid, String reason, BigDecimal money, BigDecimal balance) {
|
| | | // MsgMoneyDetail detail = MsgMoneyDetailFactory.createSystemEqualizeMsg(uid, reason, money, balance, null);
|
| | | // try {
|
| | | // msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // } catch (MsgMoneyDetailException e) {
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | //
|
| | | // PushContentDTO dto = PushMsgFactory.createMoneyInviteRecieved(orderType, money);
|
| | | // PushContentDTO dto = PushMsgFactory.createMoneySystemCompensate(reason, money);
|
| | | // try {
|
| | | // pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | // } catch (NumberFormatException e) {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | |
| | | @Override
|
| | | public void inviteOrderWeiQuan(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createInviteWeiQuanMsg(uid, orderId, orderType, money, balance,
|
| | | null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | PushContentDTO dto = PushMsgFactory.createMoneyOrderShareOrInviteWeiquan(orderType, orderId, false, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void orderReward(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createOrderRewardMsg(uid, orderId, orderType, money, balance,
|
| | | null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createMoneySystemReward("使用返利奖励券", money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void systemEqualize(Long uid, String reason, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createSystemEqualizeMsg(uid, reason, money, balance, null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | PushContentDTO dto = PushMsgFactory.createMoneySystemCompensate(reason, money);
|
| | | try {
|
| | | pushService.pushZNX(uid, dto.getTitle(), dto.getContent(), null, null);
|
| | | } catch (NumberFormatException e) {
|
| | | e.printStackTrace();
|
| | | } catch (PushException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void elmeFanli(Long uid, String orderId, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createElmeFanliMsg(uid, orderId, money, balance, null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void redPackMsg(Long uid, MsgTypeMoneyTypeEnum type, String content, String beiZhu) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createRedPackMsg(uid, type, content, beiZhu);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void inviteOrderSubSidy(Long uid, Date date, String from, BigDecimal money, BigDecimal balance) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createInviteOrderSubSidyMsg(uid, date, from, money, balance,
|
| | | null);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void teamReceive(Long uid, BigDecimal money, BigDecimal balance, Date receivedDate) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createTeamReceivedMsg(uid, money, balance, receivedDate);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_MONEY);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | |
|
| | | @Override
|
| | | public void addMsgExtra(long rid, String content, String type){
|
| | | MsgExtra msgExtra = new MsgExtra();
|
| | | msgExtra.setRid(rid);
|
| | | msgExtra.setType(type);
|
| | | msgExtra.setContent(content);
|
| | | msgExtra.setCreateTime(new Date());
|
| | | msgExtraMapper.insertSelective(msgExtra);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void updateMsgExtra(long rid, String content, String type) {
|
| | | MsgExtra msgExtra = msgExtraMapper.getByRidAndType(rid, type);
|
| | | if (msgExtra == null) {
|
| | | addMsgExtra(rid, content, type);
|
| | | msgExtra = new MsgExtra();
|
| | | msgExtra.setRid(rid);
|
| | | msgExtra.setType(type);
|
| | | msgExtra.setContent(content);
|
| | | msgExtra.setCreateTime(new Date());
|
| | | msgExtraMapper.insertSelective(msgExtra);
|
| | | } else {
|
| | | MsgExtra upExtra = new MsgExtra();
|
| | | upExtra.setId(msgExtra.getId());
|
| | |
| | | msgExtraMapper.updateByPrimaryKeySelective(upExtra);
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | |
| | | |
| | | // 是否已使用奖励券、免单券情况 |
| | | if (sourceType == Constant.SOURCE_TYPE_TAOBAO) { |
| | | couponUseFactory(order, signList, listRecordTB); |
| | | couponUseFactory(order, listRecordTB); |
| | | } else if (sourceType == Constant.SOURCE_TYPE_JD) { |
| | | couponUseFactory(order, signList, listRecordJD); |
| | | couponUseFactory(order, listRecordJD); |
| | | } else if (sourceType == Constant.SOURCE_TYPE_PDD) { |
| | | couponUseFactory(order, signList, listRecordPDD); |
| | | couponUseFactory(order, listRecordPDD); |
| | | } |
| | | } else if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType) { |
| | | // 分享 |
| | |
| | | * 订单: 免单标识 奖励标识 |
| | | * |
| | | * @param order |
| | | * @param hasRewardCoupon |
| | | * @param hongBaoState |
| | | * @param list |
| | | * @param signList |
| | | */ |
| | | private void couponUseFactory(CommonOrderVO order,List<String> signList, List<UserSystemCouponRecord> list) throws Exception { |
| | | private void couponUseFactory(CommonOrderVO order, List<UserSystemCouponRecord> list) throws Exception { |
| | | if (list == null || list.size() == 0) { |
| | | return; |
| | | } |
| | | |
| | | // 是否免单商品 |
| | | boolean freeOrder = false; |
| | | String text = null; |
| | | for (UserSystemCouponRecord couponRecord : list) { |
| | | int goodSource = couponRecord.getGoodSource(); |
| | | if (goodSource == 0) |
| | |
| | | if (order.getOrderNo().equals(orderNo) && goodSource == order.getSourceType()) { |
| | | Integer state = couponRecord.getState(); |
| | | String systemCouponType = couponRecord.getCouponType(); |
| | | if (CouponTypeEnum.freeCoupon.name().equals(systemCouponType) |
| | | if (CouponTypeEnum.rebatePercentCoupon.name().equals(systemCouponType) |
| | | && UserSystemCouponRecord.STATE_SUCCESS == state) { |
| | | text = "已奖励"; |
| | | } else if (CouponTypeEnum.freeCoupon.name().equals(systemCouponType) |
| | | || CouponTypeEnum.welfareFreeCoupon.name().equals(systemCouponType) |
| | | || CouponTypeEnum.freeCouponBuy.name().equals(systemCouponType)) { |
| | | if (UserSystemCouponRecord.STATE_FREE_ON == state) { |
| | | // 免单中 |
| | | freeOrder = true; |
| | | signList.add(PIC_FREE_ON); |
| | | text = "免单中"; |
| | | } else if (UserSystemCouponRecord.STATE_SUCCESS == state) { |
| | | // 免单成功 |
| | | freeOrder = true; |
| | | signList.add(PIC_FREE_SUCCEED); |
| | | } else if (UserSystemCouponRecord.STATE_FAIL_RULE == state |
| | | || UserSystemCouponRecord.STATE_FAIL_DRAWBACK == state) { |
| | | // 规则不匹配、退款 |
| | | freeOrder = true; |
| | | signList.add(PIC_FREE_FAIL); |
| | | } |
| | | text = "免单成功"; |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | // 免单详情 |
| | | if (freeOrder) { |
| | | if (!StringUtil.isNullOrEmpty(text)) { |
| | | ClientTextStyleVO rewardStyleVO = new ClientTextStyleVO(); |
| | | rewardStyleVO.setContent("免单详情 >"); |
| | | rewardStyleVO.setContent(text); |
| | | rewardStyleVO.setColor("#E5005C"); |
| | | rewardStyleVO.setBottomColor("#FFDCEA"); |
| | | |
| | | Map<String, Object> jumpLink = new HashMap<String, Object>(); |
| | | jumpLink.put("orderNo", order.getOrderNo()); |
| | | jumpLink.put("goodsType", order.getSourceType() + ""); |
| | | |
| | | Map<String, Object> jump = new HashMap<String, Object>(); |
| | | jump.put("type", 1); // 页面跳转 |
| | | jump.put("params", jumpLink); |
| | | jump.put("jumpDetail", jumpDetailV2Service.getByTypeCache("freeCouponDetail")); |
| | | |
| | | Map<String, Object> rewardMap = new HashMap<String, Object>(); |
| | | rewardMap.put("text", rewardStyleVO); |
| | | rewardMap.put("jump", jump); |
| | | order.setRewardDetail(rewardMap); |
| | | } |
| | | } |
| | |
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgOrderDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOrderDetail;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.exception.msg.MsgOrderDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserMsgReadStateService;
|
| | | import com.yeshi.fanli.service.inter.order.msg.MsgOrderDetailService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import redis.clients.jedis.Jedis;
|
| | | import redis.clients.jedis.JedisPool;
|
| | |
| | |
|
| | | @Resource
|
| | | private JedisPool jedisPool;
|
| | | |
| | | @Resource
|
| | | private MsgExtraService msgExtraService;
|
| | | |
| | |
|
| | | @Override
|
| | | public void addMsgOrderDetail(MsgOrderDetail detail, boolean needNotify) throws MsgOrderDetailException {
|
| | | if (detail == null)
|
| | | throw new MsgOrderDetailException(1, "消息为空");
|
| | | if (detail.getOrderId() == null || detail.getType() == null || detail.getUser() == null)
|
| | | if (detail.getOrderId() == null || detail.getType() == null || detail.getUser() == null
|
| | | || StringUtil.isNullOrEmpty(detail.getExtraInfo()))
|
| | | throw new MsgOrderDetailException(2, "消息不完整");
|
| | | // 锁住订单号
|
| | | Jedis jedis = jedisPool.getResource();
|
| | |
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgOrderDetailMapper.insertSelective(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ORDER);
|
| | | } else {
|
| | | MsgOrderDetail update = new MsgOrderDetail();
|
| | | update.setId(old.getId());
|
| | |
| | | update.setRead(false);
|
| | | update.setBeiZhu(detail.getBeiZhu());
|
| | | msgOrderDetailMapper.updateByPrimaryKeySelective(update);
|
| | | msgExtraService.addMsgExtra(update.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ORDER);
|
| | | }
|
| | | if (needNotify)
|
| | | userMsgReadStateService.addOrderMsgUnReadCount(detail.getUser().getId(), 1);
|
| | |
| | | @Resource
|
| | | private PushService pushService;
|
| | |
|
| | | @Resource
|
| | | private MsgExtraService msgExtraService;
|
| | | |
| | |
|
| | | @Override
|
| | | public void orderFanLiStatistic(Long uid, String orderId, int orderType, BigDecimal payMoney, BigDecimal money,
|
| | |
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createOrderStatistics(uid, orderId, source, type, goodsCount, payMoney, money, downTime, beiZhu);
|
| | | // 消息
|
| | | msgOrderDetailService.addMsgOrderDetail(detail, needNotify);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(),detail.getExtraInfo(), MsgExtra.MSG_TYPE_ORDER);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createOrderFoundSuccess(uid, orderId, orderSource, type, goodsCount, payMoney, money, submitTime, "");
|
| | | // 消息
|
| | | msgOrderDetailService.addMsgOrderDetail(detail, true);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ORDER);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | MsgOrderDetail detail = MsgOrderDetailFactory.createOrderFoundFail(uid, orderId, "");
|
| | | // 消息
|
| | | msgOrderDetailService.addMsgOrderDetail(detail, true);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ORDER);
|
| | | } catch (MsgOrderDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | |
|
| | | public void shareOrderWeiQuan(Long uid, String orderId, int orderType, BigDecimal money,BigDecimal fanliMoney, int goodsCount, Date downTime);
|
| | |
|
| | | /**
|
| | | * 邀请赚订单被统计
|
| | | * |
| | | * @param uid
|
| | | * @param orderCount
|
| | | * @param goodsCount
|
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void inviteOrderReceived(Long uid, int orderType, int orderCount, int goodsCount, BigDecimal money,
|
| | | BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 邀请订单维权
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void inviteOrderWeiQuan(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 奖励订单到账
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void orderReward(Long uid, String orderId, int orderType, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 系统补齐
|
| | |
| | | */
|
| | | public void systemEqualize(Long uid, String reason, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 饿了么返利到账
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void elmeFanli(Long uid, String orderId, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | |
| | | /**
|
| | | * 补贴消息
|
| | | * |
| | | * @param uid
|
| | | * @param date
|
| | | * @param from
|
| | | * @param money
|
| | | * @param balance
|
| | | */
|
| | | public void inviteOrderSubSidy(Long uid, Date date, String from, BigDecimal money, BigDecimal balance);
|
| | |
|
| | | /**
|
| | | * 红包消息
|
| | |
| | |
|
| | | public void addMsgExtra(long rid, String content, String type);
|
| | |
|
| | | |
| | | |
| | | public void updateMsgExtra(long rid, String content, String type);
|
| | | |
| | | }
|
| | |
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 邀请赚维权
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @param balance
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createInviteWeiQuanMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | BigDecimal balance, String beiZhu) {
|
| | | if (money == null || orderId == null || money == null || uid == null)
|
| | | return null;
|
| | | // /**
|
| | | // * 邀请赚维权
|
| | | // * |
| | | // * @param uid
|
| | | // * @param orderId
|
| | | // * @param money
|
| | | // * @param balance
|
| | | // * @param beiZhu
|
| | | // * @return
|
| | | // */
|
| | | // public static MsgMoneyDetail createInviteWeiQuanMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | // BigDecimal balance, String beiZhu) {
|
| | | // if (money == null || orderId == null || money == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.inviteWeiQuan);
|
| | | // detail.setOrderId(orderId);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // detail.setOrderType(orderType);
|
| | | //
|
| | | // return detail;
|
| | | // }
|
| | | //
|
| | | // /**
|
| | | // * 分享赚到账
|
| | | // * |
| | | // * @param money
|
| | | // * @param balance
|
| | | // * @param orderCount
|
| | | // * @param goodsCount
|
| | | // * @param uid
|
| | | // * @param beiZhu
|
| | | // * @return
|
| | | // */
|
| | | // public static MsgMoneyDetail createShareMsg(BigDecimal money, BigDecimal balance, int orderType, int orderCount,
|
| | | // int goodsCount, Long uid, String beiZhu) {
|
| | | // if (money == null || balance == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setGoodsCount(goodsCount);
|
| | | // detail.setOrderType(orderType);
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.share);
|
| | | // detail.setOrderCount(orderCount);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | //
|
| | | // return detail;
|
| | | // }
|
| | | //
|
| | | // /**
|
| | | // * 分享赚维权
|
| | | // * |
| | | // * @param uid
|
| | | // * @param orderId
|
| | | // * @param money
|
| | | // * @param balance
|
| | | // * @param beiZhu
|
| | | // * @return
|
| | | // */
|
| | | // public static MsgMoneyDetail createShareWeiQuanMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | // BigDecimal balance, String beiZhu) {
|
| | | // if (money == null || orderId == null || money == null || uid == null)
|
| | | // return null;
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.shareWeiQuan);
|
| | | // detail.setOrderId(orderId);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // detail.setOrderType(orderType);
|
| | | // return detail;
|
| | | // }
|
| | | //
|
| | | // public static MsgMoneyDetail createOrderRewardMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | // BigDecimal balance, String beiZhu) {
|
| | | // if (money == null || orderId == null || money == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.orderReward);
|
| | | // detail.setOrderId(orderId);
|
| | | // detail.setRead(false);
|
| | | // detail.setOrderType(orderType);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // return detail;
|
| | | // }
|
| | | //
|
| | | // public static MsgMoneyDetail createSystemEqualizeMsg(Long uid, String reason, BigDecimal money, BigDecimal balance,
|
| | | // String beiZhu) {
|
| | | // if (money == null || money == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.systemEqualize);
|
| | | // detail.setOrderId(reason);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // return detail;
|
| | | // }
|
| | | //
|
| | | // public static MsgMoneyDetail createElmeFanliMsg(Long uid, String orderId, BigDecimal money, BigDecimal balance,
|
| | | // String beiZhu) {
|
| | | // if (money == null || money == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.fanliElme);
|
| | | // detail.setOrderId(orderId);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // return detail;
|
| | | // }
|
| | | // |
| | | // |
| | | //
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.inviteWeiQuan);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setOrderType(orderType);
|
| | |
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 分享赚到账
|
| | | * |
| | | * @param money
|
| | | * @param balance
|
| | | * @param orderCount
|
| | | * @param goodsCount
|
| | | * @param uid
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createShareMsg(BigDecimal money, BigDecimal balance, int orderType, int orderCount,
|
| | | int goodsCount, Long uid, String beiZhu) {
|
| | | if (money == null || balance == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setGoodsCount(goodsCount);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.share);
|
| | | detail.setOrderCount(orderCount);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | |
|
| | | return detail;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 分享赚维权
|
| | | * |
| | | * @param uid
|
| | | * @param orderId
|
| | | * @param money
|
| | | * @param balance
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createShareWeiQuanMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | BigDecimal balance, String beiZhu) {
|
| | | if (money == null || orderId == null || money == null || uid == null)
|
| | | return null;
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.shareWeiQuan);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setOrderType(orderType);
|
| | | return detail;
|
| | | }
|
| | |
|
| | | public static MsgMoneyDetail createOrderRewardMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | BigDecimal balance, String beiZhu) {
|
| | | if (money == null || orderId == null || money == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.orderReward);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setRead(false);
|
| | | detail.setOrderType(orderType);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | public static MsgMoneyDetail createSystemEqualizeMsg(Long uid, String reason, BigDecimal money, BigDecimal balance,
|
| | | String beiZhu) {
|
| | | if (money == null || money == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.systemEqualize);
|
| | | detail.setOrderId(reason);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | public static MsgMoneyDetail createElmeFanliMsg(Long uid, String orderId, BigDecimal money, BigDecimal balance,
|
| | | String beiZhu) {
|
| | | if (money == null || money == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.fanliElme);
|
| | | detail.setOrderId(orderId);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 邀请订单补贴
|
| | | * |
| | | * @param uid
|
| | | * @param date
|
| | | * @param from
|
| | | * @param money
|
| | | * @param balance
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createInviteOrderSubSidyMsg(Long uid, Date date, String from, BigDecimal money,
|
| | | BigDecimal balance, String beiZhu) {
|
| | | if (money == null || money == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.subSidy);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTime(date);
|
| | | detail.setStateDesc(String.format("%s年%s月额外补贴到账", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH)));
|
| | | detail.setDesc(from);
|
| | |
|
| | | return detail;
|
| | | }
|
| | | |
| | | /**
|
| | | * 团队奖励
|
| | | * @Title: createOrderTeamRewardMsg
|
| | | * @Description: |
| | | * @param uid
|
| | | * @param date
|
| | | * @param from
|
| | | * @param money
|
| | | * @param balance
|
| | | * @param beiZhu
|
| | | * @return |
| | | * MsgMoneyDetail 返回类型
|
| | | * @throws
|
| | | */
|
| | | public static MsgMoneyDetail createOrderTeamRewardMsg(Long uid, Date date, String from, BigDecimal money,
|
| | | BigDecimal balance, String beiZhu) {
|
| | | if (money == null || money == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.orderTeamReward);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTime(date);
|
| | | detail.setStateDesc(String.format("%s年%s月团队奖励到账", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH)));
|
| | | detail.setDesc(from);
|
| | |
|
| | | return detail;
|
| | | }
|
| | | |
| | | |
| | | // |
| | | // /**
|
| | | // * 团队奖励
|
| | | // * @Title: createOrderTeamRewardMsg
|
| | | // * @Description: |
| | | // * @param uid
|
| | | // * @param date
|
| | | // * @param from
|
| | | // * @param money
|
| | | // * @param balance
|
| | | // * @param beiZhu
|
| | | // * @return |
| | | // * MsgMoneyDetail 返回类型
|
| | | // * @throws
|
| | | // */
|
| | | // public static MsgMoneyDetail createOrderTeamRewardMsg(Long uid, Date date, String from, BigDecimal money,
|
| | | // BigDecimal balance, String beiZhu) {
|
| | | // if (money == null || money == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.orderTeamReward);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // Calendar calendar = Calendar.getInstance();
|
| | | // calendar.setTime(date);
|
| | | // detail.setStateDesc(String.format("%s年%s月团队奖励到账", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH)));
|
| | | // detail.setDesc(from);
|
| | | //
|
| | | // return detail;
|
| | | // }
|
| | | // |
| | | // |
| | | /**
|
| | | * 红包相关信息
|
| | | * @param uid
|
| | |
| | |
|
| | |
|
| | | MsgOrderDetail detail = new MsgOrderDetail();
|
| | | detail.setOrderId(orderId);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setOrderType(source);
|
| | |
| | |
|
| | | private String fanLi; // 预估总返利
|
| | | private String fanLiDesc; // 返利说明
|
| | | |
| | |
|
| | | private String upperFanLi; // 升级返利
|
| | | private String userLevel; // 用户等级
|
| | | private String jumpLink; // 跳转链接
|
| | | |
| | |
|
| | | private String subsidyDesc; // 团队说明
|
| | | private String subsidy; // 团队补贴
|
| | | private String originSubsidy; // 小一等级补贴
|
| | | |
| | | |
| | |
|
| | | private Integer couponType; // 券图标:1-奖励券 2-免单券
|
| | | private boolean coupon; // 使用奖励券
|
| | | private boolean couponSuccess; // 使用券成功
|
| | | private boolean couponUse; // 已使用券
|
| | | private String couponText; // 状态说明
|
| | | private String couponDesc; // 使用说明
|
| | | private String couponParams;
|
| | | private JumpDetailV2 couponJumpDetail;
|
| | |
|
| | | private List<GoodsRebateVO> listGoods;
|
| | |
|
| | |
|
| | | public String getFanLi() {
|
| | | return fanLi;
|
| | |
| | | this.subsidyDesc = subsidyDesc;
|
| | | }
|
| | |
|
| | | public boolean isCouponSuccess() {
|
| | | return couponSuccess;
|
| | | }
|
| | |
|
| | | public void setCouponSuccess(boolean couponSuccess) {
|
| | | this.couponSuccess = couponSuccess;
|
| | | }
|
| | |
|
| | | public String getCouponParams() {
|
| | | return couponParams;
|
| | | }
|
| | |
| | | public void setCouponJumpDetail(JumpDetailV2 couponJumpDetail) {
|
| | | this.couponJumpDetail = couponJumpDetail;
|
| | | }
|
| | |
|
| | | public boolean isCouponUse() {
|
| | | return couponUse;
|
| | | }
|
| | |
|
| | | public void setCouponUse(boolean couponUse) {
|
| | | this.couponUse = couponUse;
|
| | | }
|
| | |
|
| | | public String getCouponText() {
|
| | | return couponText;
|
| | | }
|
| | |
|
| | | public void setCouponText(String couponText) {
|
| | | this.couponText = couponText;
|
| | | }
|
| | |
|
| | | public String getCouponDesc() {
|
| | | return couponDesc;
|
| | | }
|
| | |
|
| | | public void setCouponDesc(String couponDesc) {
|
| | | this.couponDesc = couponDesc;
|
| | | }
|
| | |
|
| | | public Integer getCouponType() {
|
| | | return couponType;
|
| | | }
|
| | |
|
| | | public void setCouponType(Integer couponType) {
|
| | | this.couponType = couponType;
|
| | | }
|
| | |
|
| | | }
|