1
This commit is contained in:
@@ -44,6 +44,8 @@ public class OrderUtil {
|
||||
//标记唯一订单行:订单+sku维度的唯一标识
|
||||
private static final String ORDER_ROW_KEY = "jd:order:row:";
|
||||
private static final String ORDER_ROW_JB_KEY = "jd:order:row:jb:";
|
||||
private static final String SEND_DAILY_STATS_KEY = "sendDailyStats:";
|
||||
|
||||
|
||||
/**
|
||||
* 手动调用 将订单发送到微信
|
||||
@@ -123,6 +125,10 @@ public class OrderUtil {
|
||||
}
|
||||
|
||||
private void sendDailyStats(String wxId) {
|
||||
String key = SEND_DAILY_STATS_KEY + wxId;
|
||||
if (Boolean.TRUE.equals(redisTemplate.hasKey(key))) {
|
||||
return;
|
||||
}
|
||||
List<WXUtil.SuperAdmin> superAdmins = getSuperAdmins(wxId);
|
||||
if (superAdmins.isEmpty()) return;
|
||||
|
||||
@@ -147,6 +153,8 @@ public class OrderUtil {
|
||||
String totalMsg = buildStatsContent("今日总统计 : ", totalStats) + " \n详:\n━━━━━━━━━━━━\n" + resultContent;
|
||||
|
||||
wxUtil.sendTextMessage(wxId, totalMsg, 1, wxId, true);
|
||||
//60秒
|
||||
redisTemplate.opsForValue().set(key, "true", 60);
|
||||
}
|
||||
|
||||
private String getFromRedis(String key) {
|
||||
|
||||
Reference in New Issue
Block a user