|
@@ -198,8 +198,9 @@ public class MarketingTask {
|
|
|
/**
|
|
|
* 定时发送一定数量的活动订阅消息
|
|
|
* @param limit
|
|
|
+ * @param type 1开奖消息,2活动开始消息
|
|
|
*/
|
|
|
- public void sendMsgByLimit(Integer limit) {
|
|
|
+ public void sendMsgByLimit(Integer limit, Integer type) {
|
|
|
|
|
|
String lockKey = "MARKETING_SEND_MSG_LIMIT_KEY";
|
|
|
// 同时只能有一个线程发送活动通知任务,自动续期
|
|
@@ -209,6 +210,7 @@ public class MarketingTask {
|
|
|
|
|
|
try {
|
|
|
List<MarketingMsg> marketingMsgList = marketingMsgService.list(new LambdaQueryWrapper<MarketingMsg>()
|
|
|
+ .eq(MarketingMsg::getType, type)
|
|
|
.last("limit " + limit));
|
|
|
|
|
|
if (CollectionUtils.isEmpty(marketingMsgList)) {
|