| | |
| | |
|
| | | // 消息推送
|
| | | try {
|
| | | if (coupon.getType() != CouponTypeEnum.welfareFreeCoupon) {
|
| | | if (coupon.getType() == CouponTypeEnum.welfareFreeCoupon) {
|
| | | userOtherMsgNotificationService.welfareCouponGet(userCoupon);
|
| | | } else if (coupon.getType() != CouponTypeEnum.freeCoupon) {
|
| | | } else if (coupon.getType() == CouponTypeEnum.freeCoupon) {
|
| | | userOtherMsgNotificationService.freeSheetCouponGet(userCoupon);
|
| | | } else if (coupon.getType() != CouponTypeEnum.rebatePercentCoupon) {
|
| | | } else if (coupon.getType() == CouponTypeEnum.rebatePercentCoupon) {
|
| | | userOtherMsgNotificationService.rewardCouponGet(userCoupon,coupon.getPercent().intValue());
|
| | | }
|
| | |
|
| | |
| | | userCouponVO.setCouponEffect(systemCoupon.getEffect());
|
| | | userCouponVO.setCouponRule(systemCoupon.getRule());
|
| | |
|
| | | Integer stateActivated = userCouponVO.getStateActivated();
|
| | | if (stateActivated == null || stateActivated == 0) {
|
| | | userCouponVO.setState(0);
|
| | | userCouponVO.setCouponEffect("待激活");
|
| | | userCouponVO.setCouponPicture(PIC_INVALID); // 未激活图片
|
| | | } else {
|
| | | userCouponVO.setCouponPicture(systemCoupon.getPicture());
|
| | | }
|
| | |
|
| | | int differentDays = 0;
|
| | | String couponTerm = "有效期:";
|
| | |
| | | // 剩余天数
|
| | | Map<String, Object> remainDays = new HashMap<String, Object>();
|
| | | remainDays.put("content", "还剩" + differentDays + "天过期");
|
| | | remainDays.put("fontColor", "#F14242");
|
| | | String remainDaysFontColor = "";
|
| | | |
| | | Integer stateActivated = userCouponVO.getStateActivated();
|
| | | if (stateActivated == null || stateActivated == 0) {
|
| | | userCouponVO.setState(0);
|
| | | userCouponVO.setCouponEffect("待激活");
|
| | | userCouponVO.setCouponPicture(PIC_INVALID); // 未激活图片
|
| | | |
| | | remainDaysFontColor = "#CCCCCC";
|
| | | |
| | | } else {
|
| | | userCouponVO.setCouponPicture(systemCoupon.getPicture());
|
| | | |
| | | remainDaysFontColor = "#F14242";
|
| | | }
|
| | | |
| | | remainDays.put("fontColor", remainDaysFontColor);
|
| | | userCouponVO.setRemainDays(remainDays);
|
| | | }
|
| | |
|
| | |
| | | // 显示不能使用
|
| | | userCouponVO.setState(0);
|
| | | userCouponVO.setCouponPicture(PIC_INVALID);
|
| | | |
| | | Map<String, Object> map = userCouponVO.getRemainDays();
|
| | | if (map != null) {
|
| | | map.put("fontColor", "#CCCCCC");
|
| | | }
|
| | | userCouponVO.setRemainDays(map);
|
| | | |
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | // 消息推送
|
| | | try {
|
| | | if (baseCoupon.getType() != CouponTypeEnum.welfareFreeCoupon) {
|
| | | if (baseCoupon.getType() == CouponTypeEnum.welfareFreeCoupon) {
|
| | | // userOtherMsgNotificationService.welfareCouponUsing(userSystemCoupon,order);
|
| | | } else if (baseCoupon.getType() != CouponTypeEnum.freeCoupon) {
|
| | | } else if (baseCoupon.getType() == CouponTypeEnum.freeCoupon) {
|
| | | // userOtherMsgNotificationService.freeSheetCouponUsing(userSystemCoupon);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | // 消息推送
|
| | | try {
|
| | | if (baseCoupon.getType() != CouponTypeEnum.welfareFreeCoupon) {
|
| | | if (baseCoupon.getType() == CouponTypeEnum.welfareFreeCoupon) {
|
| | | userOtherMsgNotificationService.welfareCouponAlreadyOutOfDate(userSystemCoupon);
|
| | | } else if (baseCoupon.getType() != CouponTypeEnum.freeCoupon) {
|
| | | } else if (baseCoupon.getType() == CouponTypeEnum.freeCoupon) {
|
| | | userOtherMsgNotificationService.freeSheetCouponAlreadyOutOfDate(userSystemCoupon);
|
| | | } else if (baseCoupon.getType() != CouponTypeEnum.rebatePercentCoupon) {
|
| | | } else if (baseCoupon.getType() == CouponTypeEnum.rebatePercentCoupon) {
|
| | | userOtherMsgNotificationService.rewardCouponAlreadyOutOfDate(userSystemCoupon);
|
| | | }
|
| | |
|
| | |
| | | if (baseCoupon == null) {
|
| | | // 券已使用
|
| | | userOtherMsgNotificationService.freeSheetCouponUsed(userSystemCoupon, orderNo);
|
| | | } else if (baseCoupon.getType() != CouponTypeEnum.welfareFreeCoupon) {
|
| | | } else if (baseCoupon.getType() == CouponTypeEnum.welfareFreeCoupon) {
|
| | | userOtherMsgNotificationService.welfareCouponUsing(userSystemCoupon,orderNo,payment);
|
| | | } else if (baseCoupon.getType() != CouponTypeEnum.freeCoupon) {
|
| | | } else if (baseCoupon.getType() == CouponTypeEnum.freeCoupon) {
|
| | | userOtherMsgNotificationService.freeSheetCouponUsed(userSystemCoupon,orderNo);
|
| | | }
|
| | | }
|