Compare commits

...

2 Commits

Author SHA1 Message Date
Van0313
c4799ea7c6 录单 2025-07-05 21:29:52 +08:00
Van0313
543f85d9a5 录单 2025-07-05 21:15:53 +08:00
2 changed files with 8 additions and 7 deletions

View File

@@ -548,10 +548,10 @@ public class JDScheduleJob {
hashOps.putAll(key, hours.stream().collect(Collectors.toMap(h -> h, h -> "1")));
}
@Scheduled(cron = "0 0 0,8 * * ?")
@Scheduled(cron = "0 0 0 * * ?")
public void checkGiftCouponsExpiry() {
Set<String> keys = redisTemplate.keys("gift_coupon:*");
if (keys == null || keys.isEmpty()) return;
if (keys.isEmpty()) return;
for (String key : keys) {
Map<Object, Object> entries = redisTemplate.opsForHash().entries(key);
@@ -578,6 +578,7 @@ public class JDScheduleJob {
if (isAboutToExpire) {
String message = String.format("[礼金提醒]\n商品%s\n礼金Key%s\n类型%s\n将在 %s 过期", skuName, giftKey, "g".equals(owner) ? "自营" : "POP", expireTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")));
wxUtil.sendTextMessage(WXUtil.default_super_admin_wxid, message, 1, "bot", false);
redisTemplate.delete(key);
}
}
}

View File

@@ -149,11 +149,11 @@ public class JDUtil {
}
private void handleProductWithJF() {
productWithJF.put("ZQD130F-EB130", "https://u.jd.com/2OdEuDJ");
productWithJF.put("ZQD130F-EB130B", "https://u.jd.com/21dEOWb");
productWithJF.put("ZQD180F-EB200", "https://u.jd.com/2rdELav");
productWithJF.put("ZQD150F-EB150", "https://u.jd.com/26dEiak");
productWithJF.put("CXW-358-E900C51", "https://u.jd.com/2DdEMsm");
productWithJF.put("ZQD130F-EB130", "https://u.jd.com/21x8qP6");
productWithJF.put("ZQD130F-EB130B", "https://u.jd.com/2ax86hv");
productWithJF.put("ZQD180F-EB200", "https://u.jd.com/26x8t4M");
productWithJF.put("ZQD150F-EB150", "https://u.jd.com/21x8M6G");
productWithJF.put("CXW-358-E900C51", "https://u.jd.com/2gx8MvZ");
}
private List<OrderRow> filterOrdersByDate(List<OrderRow> orderRows, int daysBack) {