| | |
| | | |
| | | @Slf4j |
| | | @Component |
| | | @ConditionalOnProperty(prefix = "system", name = "job", havingValue = "true") |
| | | @ConditionalOnProperty(prefix = "system", name = "job", havingValue = "false") |
| | | public class WxxcxJob { |
| | | |
| | | private final XcxProperties xcxProperties = SpringContextHolder.getBean(XcxProperties.class); |
| | |
| | | redisUtils.set(accessTokenKey,accessToken); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Scheduled(cron = "0 0 0/1 * * ? ") |
| | | public void expireCoupon() { |
| | | List<MallMemberCoupon> mallMemberCoupons = mallMemberCouponMapper.selectListByExpireTime(DateUtil.date()); |
| | | if(CollUtil.isEmpty(mallMemberCoupons)){ |
| | | return; |
| | | } |
| | | for(MallMemberCoupon mallMemberCoupon : mallMemberCoupons){ |
| | | mallMemberCoupon.setState(3); |
| | | mallMemberCouponMapper.updateById(mallMemberCoupon); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 更新发票记录表数据 |
| | | * 定时,每天凌晨一点 |
| | | * 已完成的订单,更新到发票记录中 |
| | | */ |
| | | @Scheduled(cron = "0 0 1 * * ?") |
| | | public void mallInvoiceJob() { |
| | | mallInvoiceService.mallInvoiceJob(); |
| | | } |
| | | |
| | | } |