1
This commit is contained in:
@@ -204,13 +204,13 @@ public class JDUtil {
|
||||
wxUtil.sendTextMessage(chatRoom_BY, chatRoomRemark + " " + date + "\n\n " + message, 1, chatRoom_BY, true);
|
||||
|
||||
// 2. 生成推广内容
|
||||
HashMap<String, List<String>> contentResult = generatePromotionContent(message, true);
|
||||
//HashMap<String, List<String>> contentResult = generatePromotionContent(message, true);
|
||||
|
||||
|
||||
// 3. 发送文本内容
|
||||
for (String text : contentResult.get("text")) {
|
||||
wxUtil.sendTextMessage(chatRoom_BY, text, 1, chatRoom_BY, true);
|
||||
}
|
||||
//for (String text : contentResult.get("text")) {
|
||||
// wxUtil.sendTextMessage(chatRoom_BY, text, 1, chatRoom_BY, true);
|
||||
//}
|
||||
|
||||
}
|
||||
// 具体逻辑
|
||||
@@ -2307,19 +2307,26 @@ public class JDUtil {
|
||||
List<LocalDate> dateFromLD = null;
|
||||
|
||||
// 处理特殊关键词:昨日、三日、七日
|
||||
if ("昨日".equals(dateStr)) {
|
||||
switch (dateStr) {
|
||||
case "昨日" -> {
|
||||
LocalDate yesterday = LocalDate.now().minusDays(1);
|
||||
dateFromLD = Arrays.asList(yesterday, yesterday);
|
||||
} else if ("三日".equals(dateStr)) {
|
||||
}
|
||||
case "三日" -> {
|
||||
LocalDate endDate = LocalDate.now().minusDays(1); // 昨天
|
||||
|
||||
LocalDate startDate = LocalDate.now().minusDays(3); // 三天前
|
||||
|
||||
dateFromLD = Arrays.asList(startDate, endDate);
|
||||
} else if ("七日".equals(dateStr)) {
|
||||
}
|
||||
case "七日" -> {
|
||||
LocalDate endDate = LocalDate.now().minusDays(1); // 昨天
|
||||
|
||||
LocalDate startDate = LocalDate.now().minusDays(7); // 七天前
|
||||
|
||||
dateFromLD = Arrays.asList(startDate, endDate);
|
||||
} else {
|
||||
dateFromLD = getDateFromLD(dateStr);
|
||||
}
|
||||
default -> dateFromLD = getDateFromLD(dateStr);
|
||||
}
|
||||
|
||||
if (dateFromLD != null && !dateFromLD.isEmpty()) {
|
||||
|
||||
@@ -105,7 +105,7 @@ public class WxMessageConsumer {
|
||||
|
||||
if (chatRoom_xb.containsKey(fromWxid)) {
|
||||
logger.info("线报群消息");
|
||||
//jdUtils.xb(msg, fromWxid);
|
||||
jdUtils.xb(msg, fromWxid);
|
||||
return;
|
||||
}
|
||||
// 录单群
|
||||
|
||||
Reference in New Issue
Block a user