| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Component |
| | |
| | | |
| | | R<TVip> info = vipClient.getInfo1(vipId); |
| | | TVip vip = info.getData(); |
| | | List<SendCouponDto> javaList = JSON.parseArray(vip.getCoupon()).toJavaList(SendCouponDto.class); |
| | | List<SendCouponDto> javaList = new ArrayList<>(); |
| | | if (vip.getCoupon()!=null) { |
| | | javaList = JSON.parseArray(vip.getCoupon()).toJavaList(SendCouponDto.class); |
| | | } |
| | | |
| | | tAppUserVipDetail.setCouponIds(vip.getCoupon()); |
| | | tAppUserVipDetail.setSendChargeNum(vip.getDiscountTimes()); |
| | |
| | | |
| | | |
| | | }else { |
| | | nowUser.setVipEndTime(nowUser.getVipEndTime().plusDays(plusDay)); |
| | | nowUser.setVipEndTime(nowUser.getVipEndTime().plusDays(plusDay).minusDays(1)); |
| | | //获取detail里结束时间大于当前时间的数据,并将enttime延长 |
| | | TAppUserVipDetail tAppUserVipDetail = tAppUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getAppUserId, nowUser.getId()).orderByDesc(TAppUserVipDetail::getEndTime).last("limit 1").one(); |
| | | |