录单
This commit is contained in:
@@ -1992,19 +1992,25 @@ public class JDUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
gptResponse = gptClientUtil.getGPTResponse(deepSeekPrompt.toString());
|
gptResponse = gptClientUtil.getGPTResponse(deepSeekPrompt.toString());
|
||||||
|
logger.info("gptResponse: {}", gptResponse);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("生成评论异常 - 用户: {}", fromWxid, e);
|
logger.error("生成评论异常 - 用户: {}", fromWxid, e);
|
||||||
wxUtil.sendTextMessage(fromWxid, "AI 评论生成失败", 1, fromWxid, false);
|
wxUtil.sendTextMessage(fromWxid, "AI 评论生成失败", 1, fromWxid, false);
|
||||||
}
|
}
|
||||||
// 发送生成的评论文本
|
// 发送生成的评论文本
|
||||||
if (Util.isNotEmpty(gptResponse)) {
|
if (gptResponse != null && !gptResponse.isEmpty()) {
|
||||||
|
try {
|
||||||
String[] split = gptResponse.split("\n");
|
String[] split = gptResponse.split("\n");
|
||||||
for (String s : split) {
|
for (String s : split) {
|
||||||
s = s.replaceAll("1.|2.", "");
|
s = s.replaceAll("1.|2.", "");
|
||||||
wxUtil.sendTextMessage(fromWxid, s, 1, fromWxid, true);
|
wxUtil.sendTextMessage(fromWxid, s, 1, fromWxid, true);
|
||||||
}
|
}
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
} finally {
|
||||||
|
wxUtil.sendTextMessage(fromWxid, gptResponse, 1, fromWxid, true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
//wxUtil.sendTextMessage(fromWxid, gptResponse, 1, fromWxid, true);
|
|
||||||
wxUtil.sendTextMessage(fromWxid, "评论统计:\n" + "型号 " + productType + "\n" + "新增:" + addCommentCount + "\n" + "已使用:" + usedCommentCount + "\n" + "可用:" + canUseComentCount + "\n" + "总数:" + allCommentCount, 1, fromWxid, true);
|
wxUtil.sendTextMessage(fromWxid, "评论统计:\n" + "型号 " + productType + "\n" + "新增:" + addCommentCount + "\n" + "已使用:" + usedCommentCount + "\n" + "可用:" + canUseComentCount + "\n" + "总数:" + allCommentCount, 1, fromWxid, true);
|
||||||
// 更新评论状态为已使用
|
// 更新评论状态为已使用
|
||||||
commentToUse.setIsUse(1);
|
commentToUse.setIsUse(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user