去除采集的图片
This commit is contained in:
@@ -172,7 +172,7 @@ public class JDUtil {
|
||||
wxUtil.sendTextMessage(chatRoom_BY, "[爱心]- " + currentTime + " -[爱心] \n " + message, 1, chatRoom_BY, true);
|
||||
|
||||
// 2. 生成推广内容
|
||||
HashMap<String, List<String>> contentResult = generatePromotionContent(message);
|
||||
HashMap<String, List<String>> contentResult = generatePromotionContent(message, true);
|
||||
|
||||
// 3. 发送文本内容
|
||||
for (String text : contentResult.get("text")) {
|
||||
@@ -842,7 +842,7 @@ public class JDUtil {
|
||||
cacheMap.remove("finalWenAn" + wxid);
|
||||
|
||||
// 2. 生成推广内容
|
||||
HashMap<String, List<String>> contentResult = generatePromotionContent(message);
|
||||
HashMap<String, List<String>> contentResult = generatePromotionContent(message, false);
|
||||
|
||||
// 3. 发送文本内容
|
||||
for (String text : contentResult.get("text")) {
|
||||
@@ -943,7 +943,7 @@ public class JDUtil {
|
||||
* @param message 方案内容,包含商品链接
|
||||
* @return 处理后的方案,附带商品信息
|
||||
*/
|
||||
public HashMap<String, List<String>> generatePromotionContent(String message) {
|
||||
public HashMap<String, List<String>> generatePromotionContent(String message, Boolean isCj) {
|
||||
HashMap<String, List<String>> finallMessage = new HashMap<>();
|
||||
List<String> textList = new ArrayList<>();
|
||||
List<String> imagesList = new ArrayList<>();
|
||||
@@ -1247,14 +1247,17 @@ public class JDUtil {
|
||||
if (productInfo.getData()[0].getImageInfo() != null) {
|
||||
//images.append(" ").append("图片信息:\n");
|
||||
//int index = 1;
|
||||
if (!isCj) {
|
||||
for (UrlInfo image : productInfo.getData()[0].getImageInfo().getImageList()) {
|
||||
//images.append("图片 ").append(index++).append("\n").append(image.getUrl()).append("\n");
|
||||
imagesList.add(image.getUrl());
|
||||
}
|
||||
}
|
||||
}
|
||||
//textList.add(String.valueOf(images));
|
||||
resultList.add(itemMap);
|
||||
|
||||
if (!isCj) {
|
||||
/*直接生成闲鱼的商品文案*/
|
||||
StringBuilder sb1 = new StringBuilder();
|
||||
|
||||
@@ -1266,6 +1269,8 @@ public class JDUtil {
|
||||
//textList.add("闲鱼正常销售:\n");
|
||||
textList.add(String.valueOf(sb2));
|
||||
}
|
||||
|
||||
}
|
||||
textList.add(String.valueOf(couponInfo));
|
||||
finallMessage.put("data", dataList);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user