yujian
2019-03-06 d49287202635214ca9f9aba80f4e242b7f77d0a3
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
@@ -45,6 +45,8 @@
import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
import com.yeshi.fanli.service.inter.order.OrderHongBaoMapService;
import com.yeshi.fanli.service.inter.order.OrderService;
import com.yeshi.fanli.service.inter.push.PushCouponRecordService;
import com.yeshi.fanli.service.inter.push.PushCouponService;
import com.yeshi.fanli.service.inter.user.DeviceLotteryRecordService;
import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
import com.yeshi.fanli.service.inter.user.UserInfoService;
@@ -125,7 +127,14 @@
   @Resource
   private CommonOrderCountService commonOrderCountService;
   @Resource
   private PushCouponService pushCouponService;
   @Resource
   private PushCouponRecordService pushCouponRecordService;
   @Override
   public int insertSelective(UserSystemCoupon record) {
      return userSystemCouponMapper.insertSelective(record);
@@ -186,7 +195,8 @@
      }
      // 结束日期
      String endDay = DateUtil.plusDay(coupon.getExpiryDay(), new Date());
      // 今天在内  减去一天
      String endDay = DateUtil.plusDay(coupon.getExpiryDay() - 1, new Date());
      SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
      Date endTime = format.parse(endDay);
@@ -517,6 +527,8 @@
      updateCounponInvalid(uid);
      // 退回券
      sendBackTimeOutCoupon(uid);
      // 活动领取券
      receivedCoupon(uid);
      // 订单相关的券
      List<SystemCoupon> couponList = systemCouponService.getOrderCouponList();
@@ -544,6 +556,9 @@
      updateCounponInvalid(uid);
      // 退回券
      sendBackTimeOutCoupon(uid);
      // 活动领取券
      receivedCoupon(uid);
      // 商品相关的券
      List<SystemCoupon> couponList = systemCouponService.getGoodsCouponList();
@@ -904,7 +919,7 @@
      String progressMsg = "";
      String progressColor = "";
      // 跳转奖励券规则
      userRecordVO.setRuleLink(configService.get("reward_coupon_help"));
      userRecordVO.setRuleLink(configService.get("free_coupon_help"));
      // 进度: 1 灰色 2 红色 3 绿色
      String progressState1 = "3";
@@ -1230,7 +1245,8 @@
         // 结束日期
         Date endTime = null;
         try {
            String endDay = DateUtil.plusDay(expiryDay, new Date());
            // 今天在内  减去一天
            String endDay = DateUtil.plusDay(expiryDay - 1, new Date());
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
            endTime = format.parse(endDay);
         } catch (ParseException e) {
@@ -1342,7 +1358,8 @@
      // 结束日期
      Date endTime = null;
      try {
         String endDay = DateUtil.plusDay(expiryDay, new Date());
         // 今天在内  减去一天
         String endDay = DateUtil.plusDay(expiryDay - 1, new Date());
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
         endTime = format.parse(endDay);
      } catch (ParseException e) {
@@ -1419,9 +1436,10 @@
               stateActivated = 0;
            }
         }
         // 结束日期
         String endDay = DateUtil.plusDay(systemCoupon.getExpiryDay(), new Date());
         // 今天在内  减去一天
         String endDay = DateUtil.plusDay(systemCoupon.getExpiryDay() - 1, new Date());
         SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
         Date endTime = format.parse(endDay);
@@ -1475,5 +1493,6 @@
      userInfoExtraService.saveUserInfoExtra(userInfoExtra);
   }
}