Compare commits

...

2 Commits

Author SHA1 Message Date
Van0313
41d2f8b84b 重构评论 2025-05-02 21:03:55 +08:00
Van0313
58c0d5884c 重构评论 2025-05-02 21:03:25 +08:00

View File

@@ -1661,7 +1661,7 @@ public class JDUtil {
String value = entry.getValue(); String value = entry.getValue();
productTypeStr.append(k).append(":").append(value).append("\n"); productTypeStr.append(k).append(":").append(value).append("\n");
} }
wxUtil.sendTextMessage(fromWxid, "请选择要生成的评论类型:" + productTypeStr, 1, fromWxid, false); wxUtil.sendTextMessage(fromWxid, "请选择要生成的评论类型:\n " + productTypeStr, 1, fromWxid, false);
logger.info("进入生成评论流程 - 用户: {}", fromWxid); logger.info("进入生成评论流程 - 用户: {}", fromWxid);
} catch (Exception e) { } catch (Exception e) {
@@ -1711,7 +1711,7 @@ public class JDUtil {
if (productTypeMap.containsKey(message)) { if (productTypeMap.containsKey(message)) {
generateComment(fromWxid, message); generateComment(fromWxid, message);
} else { } else {
wxUtil.sendTextMessage(fromWxid, "无效的选择,请回复 1 或 2", 1, fromWxid, false); wxUtil.sendTextMessage(fromWxid, "无效的选择", 1, fromWxid, false);
} }
} catch (Exception e) { } catch (Exception e) {
@@ -1754,7 +1754,7 @@ public class JDUtil {
} else { } else {
// 没有本地评论,调用外部接口抓取 // 没有本地评论,调用外部接口抓取
try { try {
String fetchUrl = "http://192.168.8.169:5000/fetch_comments?product_id=" + product_id; String fetchUrl = "http://192.168.8.6:5000/fetch_comments?product_id=" + product_id;
// 用hutool发起post请求 // 用hutool发起post请求
HttpResponse response = HttpRequest.post(fetchUrl).execute(); HttpResponse response = HttpRequest.post(fetchUrl).execute();