Compare commits
2 Commits
61fcedf5d7
...
c4799ea7c6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4799ea7c6 | ||
|
|
543f85d9a5 |
@@ -548,10 +548,10 @@ public class JDScheduleJob {
|
|||||||
hashOps.putAll(key, hours.stream().collect(Collectors.toMap(h -> h, h -> "1")));
|
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() {
|
public void checkGiftCouponsExpiry() {
|
||||||
Set<String> keys = redisTemplate.keys("gift_coupon:*");
|
Set<String> keys = redisTemplate.keys("gift_coupon:*");
|
||||||
if (keys == null || keys.isEmpty()) return;
|
if (keys.isEmpty()) return;
|
||||||
|
|
||||||
for (String key : keys) {
|
for (String key : keys) {
|
||||||
Map<Object, Object> entries = redisTemplate.opsForHash().entries(key);
|
Map<Object, Object> entries = redisTemplate.opsForHash().entries(key);
|
||||||
@@ -578,6 +578,7 @@ public class JDScheduleJob {
|
|||||||
if (isAboutToExpire) {
|
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")));
|
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);
|
wxUtil.sendTextMessage(WXUtil.default_super_admin_wxid, message, 1, "bot", false);
|
||||||
|
redisTemplate.delete(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,11 +149,11 @@ public class JDUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleProductWithJF() {
|
private void handleProductWithJF() {
|
||||||
productWithJF.put("ZQD130F-EB130", "https://u.jd.com/2OdEuDJ");
|
productWithJF.put("ZQD130F-EB130", "https://u.jd.com/21x8qP6");
|
||||||
productWithJF.put("ZQD130F-EB130B", "https://u.jd.com/21dEOWb");
|
productWithJF.put("ZQD130F-EB130B", "https://u.jd.com/2ax86hv");
|
||||||
productWithJF.put("ZQD180F-EB200", "https://u.jd.com/2rdELav");
|
productWithJF.put("ZQD180F-EB200", "https://u.jd.com/26x8t4M");
|
||||||
productWithJF.put("ZQD150F-EB150", "https://u.jd.com/26dEiak");
|
productWithJF.put("ZQD150F-EB150", "https://u.jd.com/21x8M6G");
|
||||||
productWithJF.put("CXW-358-E900C51", "https://u.jd.com/2DdEMsm");
|
productWithJF.put("CXW-358-E900C51", "https://u.jd.com/2gx8MvZ");
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<OrderRow> filterOrdersByDate(List<OrderRow> orderRows, int daysBack) {
|
private List<OrderRow> filterOrdersByDate(List<OrderRow> orderRows, int daysBack) {
|
||||||
|
|||||||
Reference in New Issue
Block a user