公众号推送

This commit is contained in:
2025-10-20 11:39:33 +08:00
parent 05a3be5ecb
commit 9646b7458d
17 changed files with 781 additions and 80 deletions

View File

@@ -2,6 +2,7 @@ package com.czg.config;
import com.czg.account.service.ShopTableService;
import com.czg.market.entity.MkShopCouponRecord;
import com.czg.market.service.AcPushEventService;
import com.czg.market.service.MkShopCouponRecordService;
import com.czg.market.service.SmsPushEventService;
import com.czg.order.service.OrderInfoService;
@@ -37,6 +38,8 @@ public class RedisKeyExpirationListener implements MessageListener {
private MkShopCouponRecordService mkShopCouponRecordService;
@Resource
private SmsPushEventService smsPushEventService;
@Resource
private AcPushEventService acPushEventService;
//redis key失效监听
@@ -73,6 +76,10 @@ public class RedisKeyExpirationListener implements MessageListener {
log.info("监听到短信定时发放优惠券,sms_push_event任务Id: {}", expiredKey);
String eventId = expiredKey.substring(RedisCst.classKeyExpired.EXPIRED_SMS.length());
smsPushEventService.sendPushEventCoupon(eventId);
} else if (expiredKey.startsWith(RedisCst.classKeyExpired.EXPIRED_WECHAT)) {
log.info("监听到公众号推送优惠券,ac_push_event任务Id: {}", expiredKey);
String eventId = expiredKey.substring(RedisCst.classKeyExpired.EXPIRED_WECHAT.length());
acPushEventService.sendPushEventCoupon(eventId);
}
}
}