基本完成转链。富贵指日可待!

This commit is contained in:
Leo
2025-04-05 01:49:04 +08:00
parent 82c54f409c
commit e1df955d07

View File

@@ -822,22 +822,6 @@ public class JDUtil {
for (String text : contentResult.get("text")) {
wxUtil.sendTextMessage(wxid, text, 1, wxid);
}
// 4. 发送图片(如果有)
List<String> images = contentResult.get("images");
if (images != null) {
try {
Thread.sleep(5000);
} catch (InterruptedException ignored) {
}
for (String imageUrl : images) {
if (imageUrl != null) {
wxUtil.sendImageMessage(wxid, imageUrl);
}
}
}
// 5. 缓存商品数据
if (!contentResult.get("data").isEmpty()) {
String productData = contentResult.get("data").get(0);
@@ -853,6 +837,22 @@ public class JDUtil {
wxUtil.sendTextMessage(wxid, "未获取到商品数据,请检查链接格式", 1, wxid);
state.reset();
}
// 4. 发送图片(如果有)
List<String> images = contentResult.get("images");
if (images != null) {
try {
Thread.sleep(5000);
} catch (InterruptedException ignored) {
}
for (String imageUrl : images) {
if (imageUrl != null) {
wxUtil.sendImageMessage(wxid, imageUrl);
}
}
}
} catch (Exception e) {
logger.error("处理推广内容异常 - 用户: {}", wxid, e);
wxUtil.sendTextMessage(wxid, "处理内容时发生异常,请重试", 1, wxid);