去除采集的图片
This commit is contained in:
2
.idea/ApifoxUploaderProjectSetting.xml
generated
2
.idea/ApifoxUploaderProjectSetting.xml
generated
@@ -1,8 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ApifoxUploaderProjectSetting">
|
<component name="ApifoxUploaderProjectSetting">
|
||||||
<option name="apiAccessToken" value="APS-2AIfzBc2W8qdmTsj3zVDdIlI5LyVVtcz" />
|
|
||||||
<option name="apiApiOverwriteMode" value="不导入" />
|
|
||||||
<option name="yapiTokens" value="" />
|
<option name="yapiTokens" value="" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@@ -167,7 +167,9 @@ public class JDUtil {
|
|||||||
public void cjwlm(String message) {
|
public void cjwlm(String message) {
|
||||||
logger.info("执行 cjwlm 方法,order: {}", message);
|
logger.info("执行 cjwlm 方法,order: {}", message);
|
||||||
if (message.contains("https://u.jd")) {
|
if (message.contains("https://u.jd")) {
|
||||||
wxUtil.sendTextMessage(chatRoom_BY, "[爱心]---采集开始---[爱心] \n " + message, 1, chatRoom_BY, true);
|
// 生成当前时间格式
|
||||||
|
String currentTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||||
|
wxUtil.sendTextMessage(chatRoom_BY, "[爱心]- "+currentTime+" -[爱心] \n " + message, 1, chatRoom_BY, true);
|
||||||
|
|
||||||
// 2. 生成推广内容
|
// 2. 生成推广内容
|
||||||
HashMap<String, List<String>> contentResult = generatePromotionContent(message);
|
HashMap<String, List<String>> contentResult = generatePromotionContent(message);
|
||||||
@@ -178,15 +180,15 @@ public class JDUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 4. 发送图片(如果有)
|
// 4. 发送图片(如果有)
|
||||||
List<String> images = contentResult.get("images");
|
//List<String> images = contentResult.get("images");
|
||||||
if (images != null) {
|
//if (images != null) {
|
||||||
for (String imageUrl : images) {
|
// for (String imageUrl : images) {
|
||||||
if (imageUrl != null) {
|
// if (imageUrl != null) {
|
||||||
wxUtil.sendImageMessage(chatRoom_BY, imageUrl);
|
// wxUtil.sendImageMessage(chatRoom_BY, imageUrl);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
wxUtil.sendTextMessage(chatRoom_BY, "[爱心]---采集完成---[爱心]", 1, chatRoom_BY, true);
|
//wxUtil.sendTextMessage(chatRoom_BY, "[爱心]---采集完成---[爱心]", 1, chatRoom_BY, true);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user