| | |
| | | private String source;// 来源
|
| | | private String orderId;// 订单号
|
| | | private String desc;// 说明
|
| | | private BigDecimal fanLiMoney;
|
| | |
|
| | | |
| | |
|
| | | private BigDecimal fanLiMoney;// 预估返利
|
| | | private BigDecimal orderFanLiMoney;// 订单返利
|
| | | private BigDecimal rewardMoney;// 奖励金
|
| | | private String startTime;
|
| | | private String endTime;
|
| | | private Integer leftDay;
|
| | |
| | | public void setDesc(String desc) {
|
| | | this.desc = desc;
|
| | | }
|
| | | |
| | |
|
| | | public BigDecimal getFanLiMoney() {
|
| | | return fanLiMoney;
|
| | | }
|
| | |
| | | this.fanLiMoney = fanLiMoney;
|
| | | }
|
| | |
|
| | | public BigDecimal getOrderFanLiMoney() {
|
| | | return orderFanLiMoney;
|
| | | }
|
| | |
|
| | | public void setOrderFanLiMoney(BigDecimal orderFanLiMoney) {
|
| | | this.orderFanLiMoney = orderFanLiMoney;
|
| | | }
|
| | |
|
| | | public BigDecimal getRewardMoney() {
|
| | | return rewardMoney;
|
| | | }
|
| | |
|
| | | public void setRewardMoney(BigDecimal rewardMoney) {
|
| | | this.rewardMoney = rewardMoney;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.omg.CORBA.PERSIST_STORE;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dto.msg.MsgOtherCouponContentDTO;
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void welfareCouponUsing(UserSystemCoupon coupon,String orderId,BigDecimal money) {
|
| | | public void welfareCouponUsing(UserSystemCoupon coupon, String orderId, BigDecimal money) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createWelfareCouponUsing(orderId,money,coupon.getStartTime(),
|
| | | coupon.getEndTime());
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createWelfareCouponUsing(orderId, money,
|
| | | coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponWelfareMianDan, "实付款-返利=0元购(免单)"));
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void welfareCouponUsed(UserSystemCoupon coupon,String orderId) {
|
| | | public void welfareCouponUsed(UserSystemCoupon coupon, String orderId) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createWelfareCouponUsed(getLeftDay(coupon),"实付款-返利=0元购(免单)",
|
| | | coupon.getStartTime(), coupon.getEndTime());
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createWelfareCouponUsed(orderId,
|
| | | "实付款-返利=0元购(免单)", coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponWelfareMianDan, "参与其他活动可获得更多免单券"));
|
| | |
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory
|
| | | .createWelfareCouponAlreadyOutOfDate(coupon.getStartTime(), coupon.getEndTime());
|
| | | .createWelfareCouponAlreadyOutOfDate(coupon.getSource(),coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponWelfareMianDan, "参与其他活动可获得更多免单券"));
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void welfareCouponDrawBack(UserSystemCoupon coupon,String orderId) {
|
| | | public void welfareCouponDrawBack(UserSystemCoupon coupon, String orderId) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory
|
| | | .createWelfareCouponAlreadyOutOfDate(coupon.getStartTime(), coupon.getEndTime());
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createWelfareCouponDrawBack(getLeftDay(coupon),
|
| | | orderId, coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponWelfareMianDan, "退回后依然可在有效期内使用"));
|
| | |
| | | coupon.getSource(), coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, null));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, "可在首页-免单商品-选择商品-使用"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void freeSheetCouponUsing(UserSystemCoupon coupon) {
|
| | | public void freeSheetCouponUsing(UserSystemCoupon coupon, String orderId, BigDecimal money) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createCouponUsing(coupon.getSource(),
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createCouponUsing(orderId, money,
|
| | | coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, null));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, "实付款-返利=0元购(免单)"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void freeSheetCouponUsed(UserSystemCoupon coupon) {
|
| | | public void freeSheetCouponUsed(UserSystemCoupon coupon, String orderId) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createCouponUsed(getLeftDay(coupon),
|
| | | coupon.getSource(), coupon.getStartTime(), coupon.getEndTime());
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createWelfareCouponUsed(orderId,
|
| | | "实付款-返利=0元购(免单)", coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, null));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, "参与其他活动可获得更多免单券"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | public void freeSheetCouponWillOutOfDate(UserSystemCoupon coupon) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createCouponWillOutOfDate(getLeftDay(coupon),
|
| | | coupon.getSource(), coupon.getStartTime(), coupon.getEndTime());
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory
|
| | | .createWelfareCouponWillOutOfDate(getLeftDay(coupon), coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, null));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, "至少成功邀请1个队员后可激活"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | public void freeSheetCouponAlreadyOutOfDate(UserSystemCoupon coupon) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createCouponAlreadyOutOfDate(coupon.getSource(),
|
| | | coupon.getStartTime(), coupon.getEndTime());
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory
|
| | | .createWelfareCouponAlreadyOutOfDate(coupon.getSource(),coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, null));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, "参与其他活动可获得更多免单券"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void rewardCouponGet(UserSystemCoupon coupon) {
|
| | | public void freeSheetCouponDrawBack(UserSystemCoupon coupon, String orderId) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createWelfareCouponDrawBack(getLeftDay(coupon),
|
| | | orderId, coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponMianDan, "退回后依然可在有效期内使用"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void rewardCouponGet(UserSystemCoupon coupon, int percent) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createRewardCouponGet(getLeftDay(coupon),
|
| | | coupon.getSource(), coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, null));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, "返利已到账后再奖励返利" + percent + "%"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void rewardCouponUsed(UserSystemCoupon coupon) {
|
| | | public void rewardCouponUsed(UserSystemCoupon coupon, BigDecimal oldFanLiMoney, BigDecimal rewardMoney,
|
| | | String orderId) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createRewardCouponUsed(getLeftDay(coupon),
|
| | | coupon.getSource(), coupon.getStartTime(), coupon.getEndTime());
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createRewardCouponUsed(oldFanLiMoney,
|
| | | rewardMoney, orderId);
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, null));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, "参与活动可获取更多奖励券"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void rewardCouponWillOutOfDate(UserSystemCoupon coupon) {
|
| | | public void rewardCouponWillOutOfDate(UserSystemCoupon coupon, int percent) {
|
| | | if (coupon == null || coupon.getUid() == null)
|
| | | return;
|
| | | MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createRewardCouponWillOutOfDate(
|
| | | getLeftDay(coupon), coupon.getSource(), coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, null));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, "返利已到账后再奖励返利" + percent + "%"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | .createRewardCouponAlreadyOutOfDate(coupon.getSource(), coupon.getStartTime(), coupon.getEndTime());
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(),
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, null));
|
| | | coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, "参与活动可获取更多奖励券"));
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void freeSheetCouponDrawBack(UserSystemCoupon coupon) {
|
| | | // TODO Auto-generated method stub
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | } else if (coupon.getType() != CouponTypeEnum.freeCoupon) {
|
| | | userOtherMsgNotificationService.freeSheetCouponGet(userCoupon);
|
| | | } else if (coupon.getType() != CouponTypeEnum.rebatePercentCoupon) {
|
| | | userOtherMsgNotificationService.rewardCouponGet(userCoupon);
|
| | | userOtherMsgNotificationService.rewardCouponGet(userCoupon,coupon.getPercent().intValue());
|
| | | }
|
| | |
|
| | | } catch(Exception e) {
|
| | |
| | | if (baseCoupon.getType() != CouponTypeEnum.welfareFreeCoupon) {
|
| | | // userOtherMsgNotificationService.welfareCouponUsing(userSystemCoupon,order);
|
| | | } else if (baseCoupon.getType() != CouponTypeEnum.freeCoupon) {
|
| | | userOtherMsgNotificationService.freeSheetCouponUsing(userSystemCoupon);
|
| | | // userOtherMsgNotificationService.freeSheetCouponUsing(userSystemCoupon);
|
| | | }
|
| | |
|
| | | } catch(Exception e) {
|
| | |
| | |
|
| | | // 消息推送
|
| | | try {
|
| | | userOtherMsgNotificationService.rewardCouponUsed(userSystemCoupon);
|
| | | userOtherMsgNotificationService.rewardCouponUsed(userSystemCoupon, hongBao, money, orderNo);
|
| | | } catch(Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | |
| | | SystemCoupon baseCoupon = systemCouponService.selectByPrimaryKey(systemCoupon.getId());
|
| | | if (baseCoupon == null) {
|
| | | // 券已使用
|
| | | userOtherMsgNotificationService.freeSheetCouponUsed(userSystemCoupon);
|
| | | userOtherMsgNotificationService.freeSheetCouponUsed(userSystemCoupon, orderNo);
|
| | | } else if (baseCoupon.getType() != CouponTypeEnum.welfareFreeCoupon) {
|
| | | userOtherMsgNotificationService.welfareCouponUsing(userSystemCoupon,orderNo,payment);
|
| | | } else if (baseCoupon.getType() != CouponTypeEnum.freeCoupon) {
|
| | | userOtherMsgNotificationService.freeSheetCouponUsed(userSystemCoupon);
|
| | | userOtherMsgNotificationService.freeSheetCouponUsed(userSystemCoupon,orderNo);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | * @param startTime
|
| | | * @param endTime
|
| | | */
|
| | | public void freeSheetCouponUsing(UserSystemCoupon coupon);
|
| | | public void freeSheetCouponUsing(UserSystemCoupon coupon,String orderId,BigDecimal money);
|
| | |
|
| | | /**
|
| | | * 免单券已经使用
|
| | |
| | | * @param startTime
|
| | | * @param endTime
|
| | | */
|
| | | public void freeSheetCouponUsed(UserSystemCoupon coupon);
|
| | | public void freeSheetCouponUsed(UserSystemCoupon coupon,String orderId);
|
| | |
|
| | | /**
|
| | | * 免单券即将过期
|
| | |
| | | * 已退回
|
| | | * @param coupon
|
| | | */
|
| | | public void freeSheetCouponDrawBack(UserSystemCoupon coupon);
|
| | | public void freeSheetCouponDrawBack(UserSystemCoupon coupon,String orderId);
|
| | |
|
| | | // 奖励券
|
| | |
|
| | | /**
|
| | | * 奖励券获得
|
| | | * |
| | | * @param leftDay
|
| | | * @param source
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | */
|
| | | public void rewardCouponGet(UserSystemCoupon coupon);
|
| | |
|
| | | /**
|
| | | * 奖励券已经使用
|
| | | * |
| | | * @param leftDay
|
| | | * @param source
|
| | | * @param startTime
|
| | | * @param endTime
|
| | | * 奖励券获得
|
| | | * @param coupon
|
| | | * @param percent -百分比
|
| | | */
|
| | | public void rewardCouponUsed(UserSystemCoupon coupon);
|
| | | public void rewardCouponGet(UserSystemCoupon coupon,int percent);
|
| | |
|
| | |
|
| | | /**
|
| | | * 奖励券使用成功
|
| | | * @param coupon
|
| | | * @param oldFanLiMoney-原始返利金额
|
| | | * @param rewardMoney-奖励金额
|
| | | */
|
| | | public void rewardCouponUsed(UserSystemCoupon coupon,BigDecimal oldFanLiMoney,BigDecimal rewardMoney,String orderId);
|
| | |
|
| | | /**
|
| | | * 奖励券即将过期
|
| | |
| | | * @param startTime
|
| | | * @param endTime
|
| | | */
|
| | | public void rewardCouponWillOutOfDate(UserSystemCoupon coupon);
|
| | | public void rewardCouponWillOutOfDate(UserSystemCoupon coupon,int percent);
|
| | |
|
| | | /**
|
| | | * 奖励券已经过期
|
| | |
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createWelfareCouponActive(Integer leftDay, String source, Date startTime, Date endTime) {
|
| | | public static MsgOtherCouponContentDTO createWelfareCouponActive(Integer leftDay, String source, Date startTime,
|
| | | Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(leftDay, source, startTime, endTime);
|
| | | dto.setState("已被激活");
|
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createWelfareCouponUsing(String orderId,BigDecimal money, Date startTime, Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, null, startTime, endTime);
|
| | | public static MsgOtherCouponContentDTO createWelfareCouponUsing(String orderId, BigDecimal money, Date startTime,
|
| | | Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, null, null, null);
|
| | | dto.setOrderId(orderId);
|
| | | dto.setState("已经使用");
|
| | | dto.setFanLiMoney(money);
|
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createWelfareCouponUsed(Integer leftDay,String desc, Date startTime, Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, null, startTime, endTime);
|
| | | public static MsgOtherCouponContentDTO createWelfareCouponUsed(String orderId, String desc, Date startTime,
|
| | | Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, null, null, null);
|
| | | dto.setState("完成免单");
|
| | | dto.setDesc(desc);
|
| | | dto.setOrderId(orderId);
|
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createWelfareCouponWillOutOfDate(Integer leftDay, Date startTime,
|
| | | Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(leftDay, "成功邀请1个队员", startTime, endTime);
|
| | | dto.setState("即将过期");
|
| | | MsgOtherCouponContentDTO dto = getGeneral(leftDay, null, startTime, endTime);
|
| | | dto.setState("即将到期");
|
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createWelfareCouponAlreadyOutOfDate(Date startTime, Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(0, "成功邀请1个队员", startTime, endTime);
|
| | | public static MsgOtherCouponContentDTO createWelfareCouponAlreadyOutOfDate(String source,Date startTime, Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, source, startTime, endTime);
|
| | | dto.setState("已经过期");
|
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createWelfareCouponDrawBack(Integer leftDay, String orderId, Date startTime,
|
| | | Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(leftDay, null, startTime, endTime);
|
| | | dto.setState("已退回");
|
| | | dto.setOrderId(orderId);
|
| | | return dto;
|
| | | }
|
| | |
|
| | |
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createCouponUsing(String source, Date startTime, Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, source, startTime, endTime);
|
| | | dto.setState("使用中,等待系统同步订单");
|
| | | public static MsgOtherCouponContentDTO createCouponUsing(String orderId, BigDecimal money, Date startTime,
|
| | | Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, null, null, null);
|
| | | dto.setOrderId(orderId);
|
| | | dto.setState("已经使用");
|
| | | dto.setFanLiMoney(money);
|
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createCouponUsed(Integer leftDay, String source, Date startTime,
|
| | | public static MsgOtherCouponContentDTO createCouponUsed(String orderId, String desc, Date startTime,
|
| | | Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, source, startTime, endTime);
|
| | | dto.setState("已被使用");
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, null, null, null);
|
| | | dto.setState("完成免单");
|
| | | dto.setDesc(desc);
|
| | | dto.setOrderId(orderId);
|
| | | return dto;
|
| | | }
|
| | |
|
| | |
| | | public static MsgOtherCouponContentDTO createCouponAlreadyOutOfDate(String source, Date startTime, Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(0, source, startTime, endTime);
|
| | | dto.setState("已经过期");
|
| | | return dto;
|
| | | }
|
| | | |
| | | public static MsgOtherCouponContentDTO createCouponDrawBack(Integer leftDay, String orderId, Date startTime,
|
| | | Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(leftDay, null, startTime, endTime);
|
| | | dto.setState("已退回");
|
| | | dto.setOrderId(orderId);
|
| | | return dto;
|
| | | }
|
| | |
|
| | |
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createRewardCouponUsed(Integer leftDay, String source, Date startTime,
|
| | | Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, source, startTime, endTime);
|
| | | dto.setState("已被使用");
|
| | | public static MsgOtherCouponContentDTO createRewardCouponUsed(BigDecimal oldFanLiMoney,BigDecimal rewardMoney,String orderId) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, null, null, null);
|
| | | dto.setState("成功使用");
|
| | | dto.setOrderFanLiMoney(oldFanLiMoney);
|
| | | dto.setRewardMoney(rewardMoney);
|
| | | dto.setOrderId(orderId);
|
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createRewardCouponWillOutOfDate(Integer leftDay, String source,
|
| | | Date startTime, Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(leftDay, source, startTime, endTime);
|
| | | dto.setState("即将过期");
|
| | | dto.setState("即将到期");
|
| | | return dto;
|
| | | }
|
| | |
|
| | | public static MsgOtherCouponContentDTO createRewardCouponAlreadyOutOfDate(String source, Date startTime,
|
| | | Date endTime) {
|
| | | MsgOtherCouponContentDTO dto = getGeneral(0, source, startTime, endTime);
|
| | | MsgOtherCouponContentDTO dto = getGeneral(null, source, startTime, endTime);
|
| | | dto.setState("已经过期");
|
| | | return dto;
|
| | | }
|
| | |
| | |
|
| | | if (dto.getFanLiMoney() != null) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(MoneyBigDecimalUtil.getWithNoZera(dto.getFanLiMoney()) + "",
|
| | | contentList.add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(dto.getFanLiMoney()),
|
| | | COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("预估返利", COLOR_TITLE), contentList));
|
| | | }
|
| | | |
| | | if (dto.getOrderFanLiMoney() != null) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(dto.getOrderFanLiMoney()),
|
| | | COLOR_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("订单返利", COLOR_TITLE), contentList));
|
| | | }
|
| | | |
| | | if (dto.getRewardMoney() != null) {
|
| | | contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + MoneyBigDecimalUtil.getWithNoZera(dto.getRewardMoney()),
|
| | | COLOR_HIGHLIGHT_CONTENT));
|
| | | items.add(new CommonMsgItemVO(new ClientTextStyleVO("奖励金", COLOR_TITLE), contentList));
|
| | | }
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(dto.getSource())) {
|
| | | contentList = new ArrayList<>();
|