Commit e4e4dd04 authored by shiyu's avatar shiyu

商品上新

parent 5e47ab95
......@@ -18,6 +18,7 @@ import org.redisson.api.RedissonClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import java.time.LocalDateTime;
......@@ -57,7 +58,7 @@ public class NewItemNoticeJob {
/**
* 每天晚上八点执行一次
*/
// @Scheduled(cron = "0 0 20 * * ?")
@Scheduled(cron = "0 0 20 * * ?")
public void execute() {
RLock lock = redissonClient.getLock(NEW_ITEM_NOTICE_KEY);
if (!lock.tryLock()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment