| | |
| | | return null;
|
| | | }
|
| | |
|
| | | // 过期券
|
| | | updateInvalidSate(uid);
|
| | | |
| | | // 退回券
|
| | | sendBackTimeOutCoupon(uid);
|
| | |
|
| | |
| | | throw new UserSystemCouponException(1, "用户未登录");
|
| | | }
|
| | |
|
| | | // 过期券
|
| | | updateInvalidSate(uid);
|
| | | |
| | | // 退回券
|
| | | sendBackTimeOutCoupon(uid);
|
| | |
|
| | |
| | | throw new UserSystemCouponException(1, "商品ID为空");
|
| | | }
|
| | |
|
| | | // 过期券
|
| | | updateInvalidSate(uid);
|
| | | |
| | | // 退回券
|
| | | sendBackTimeOutCoupon(uid);
|
| | |
|
| | |
| | | return userSystemCouponMapper.getCounponNowInvalid(count);
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public boolean updateCouponRecordUsed(Long uid, String orderNo, BigDecimal payment, Long auctionId)
|
| | |
| | | @Override
|
| | | public List<UserSystemCouponVO> getCouponList(long start, int count, Long uid)
|
| | | throws UserSystemCouponException, Exception {
|
| | | |
| | | // 过期券
|
| | | updateInvalidSate(uid);
|
| | | |
| | | // 退回券
|
| | | sendBackTimeOutCoupon(uid);
|
| | |
|
| | | |
| | | List<UserSystemCouponVO> listVO = userSystemCouponMapper.getUserCouponVOList(start, count, uid);
|
| | | if (listVO == null || listVO.size() == 0) {
|
| | | return listVO;
|
| | |
| | | Date useTime = userCouponVO.getUseTime();
|
| | | if (useTime != null) {
|
| | | Map<String, Object> remainDays = new HashMap<String, Object>();
|
| | | remainDays.put("content", "于" + sdf.format(useTime) + "成功赠送");
|
| | | remainDays.put("content", "于" + sdf.format(useTime) + "赠送");
|
| | | remainDays.put("fontColor", "#CCCCCC");
|
| | | userCouponVO.setRemainDays(remainDays);
|
| | | }
|
| | |
| | | Date useTime = userCouponVO.getUseTime();
|
| | | if (useTime != null) {
|
| | | Map<String, Object> remainDays = new HashMap<String, Object>();
|
| | | remainDays.put("content", "于" + sdf.format(useTime) + "成功使用");
|
| | | remainDays.put("content", "于" + sdf.format(useTime) + "使用");
|
| | | remainDays.put("fontColor", "#CCCCCC");
|
| | | userCouponVO.setRemainDays(remainDays);
|
| | | }
|
| | |
| | | }
|
| | |
|
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public void updateInvalidSate(Long uid) {
|
| | | List<UserSystemCoupon> list = userSystemCouponMapper.getCounponNowInvalidByUid(uid);
|
| | | if (list == null || list.size() == 0) {
|
| | | return;
|
| | | }
|
| | | updateCounponInvalid(list);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void updateCounponInvalid(List<UserSystemCoupon> list) {
|
| | | if (list == null || list.size() == 0) {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 退回券 初始数据
|
| | |
| | | couponRecord.setUpdateTime(new Date());
|
| | | userSystemCouponRecordService.updateByPrimaryKeySelective(couponRecord);
|
| | |
|
| | | UserSystemCoupon userSystemCoupon = couponRecord.getUserSystemCoupon();
|
| | | // 状态初始化
|
| | | UserSystemCoupon userSystemCoupon = couponRecord.getUserSystemCoupon();
|
| | | userSystemCoupon.setState(UserSystemCoupon.STATE_CAN_USE);
|
| | | userSystemCoupon.setUseTime(null);
|
| | | userSystemCoupon.setUpdateTime(new Date());
|
| | |
| | | if (systemCoupon == null)
|
| | | continue;
|
| | |
|
| | | |
| | | // 退回消息
|
| | | String couponName = systemCoupon.getName();
|
| | | if (CouponTypeEnum.freeCouponGive == systemCoupon.getType())
|
| | | couponName = "免单券";
|
| | |
|
| | | // 退回消息
|
| | | String beiZhu = "请到我的-福利中心查看";
|
| | | SimpleDateFormat sd = new SimpleDateFormat("yyyy.MM.dd HH:mm");
|
| | | MsgOtherGiveContentDTO msgOther = new MsgOtherGiveContentDTO();
|
| | |
| | |
|
| | | @Override
|
| | | public boolean getIncludeExchange(Long uid) {
|
| | | // 过期券
|
| | | updateInvalidSate(uid);
|
| | | |
| | | String percent = configService.get("exchange_rebate_percent");
|
| | | if (StringUtil.isNullOrEmpty(percent))
|
| | | percent = "35";
|
| | |
| | |
|
| | | @Override
|
| | | public boolean getIncludeNotExchange(Long uid) {
|
| | | // 过期券
|
| | | updateInvalidSate(uid);
|
| | | |
| | | String percent = configService.get("exchange_rebate_percent");
|
| | | if (StringUtil.isNullOrEmpty(percent))
|
| | | percent = "35";
|
| | |
| | |
|
| | | @Override
|
| | | public List<UserSystemCouponVO> listIncludeNotExchange(Long uid) throws Exception{
|
| | | // 过期券
|
| | | updateInvalidSate(uid);
|
| | | |
| | | // 退回券
|
| | | sendBackTimeOutCoupon(uid);
|
| | |
|
| | | String percent = configService.get("exchange_rebate_percent");
|