文案首行

This commit is contained in:
雷欧(林平凡)
2025-04-22 17:44:59 +08:00
parent c084faeee4
commit f40f7c35ad

View File

@@ -125,7 +125,7 @@ public class JDUtil {
this.orderUtil = orderUtil;
}
private List<OrderRow> filterOrdersByDate(List<OrderRow> orderRows, int daysBack) {
private List<OrderRow> filterOrdersByDate(List<OrderRow> orderRows, int daysBack) {
LocalDate now = LocalDate.now();
return orderRows.stream().filter(order -> {
@@ -137,7 +137,7 @@ public class JDUtil {
}).collect(Collectors.toList());
}
private Stream<OrderRow> getStreamForWeiGui(List<OrderRow> todayOrders) {
private Stream<OrderRow> getStreamForWeiGui(List<OrderRow> todayOrders) {
return todayOrders.stream().filter(orderRow -> orderRow.getValidCode() == 13 || orderRow.getValidCode() == 25 || orderRow.getValidCode() == 26 || orderRow.getValidCode() == 27 || orderRow.getValidCode() == 28 || orderRow.getValidCode() == 29);
}
@@ -1247,7 +1247,7 @@ public class JDUtil {
itemMap.put("shopId", String.valueOf(productInfo.getData()[0].getShopInfo().getShopId()));
itemMap.put("shopName", productInfo.getData()[0].getShopInfo().getShopName());
itemMap.put("skuName", productInfo.getData()[0].getSkuName());
String replaceAll = itemMap.get("skuName").replaceAll("以旧|政府|换新|领取|国家|补贴|15%|20%|国补|立减|【|】|", "");
String replaceAll = itemMap.get("skuName").replaceAll("以旧|政府|换新|领取|国家|补贴|15%|20%|国补|立减|【|】", "");
itemMap.put("spuid", String.valueOf(productInfo.getData()[0].getSpuid()));
itemMap.put("commission", String.valueOf(productInfo.getData()[0].getCommissionInfo().getCommission()));
itemMap.put("commissionShare", String.valueOf(productInfo.getData()[0].getCommissionInfo().getCommissionShare()));
@@ -1274,7 +1274,12 @@ public class JDUtil {
if (!isCj) {
String[] lines = message.split("\\r?\\n");
String title = lines.length > 0 ? lines[0] : "";
// 有的换行了
if (lines[1].length() > 3) {
title = title + lines[1];
}
logger.info("文案首行 {}", title);
title = title.replaceAll("@|所有人", "");
/*直接生成闲鱼的商品文案*/
StringBuilder sb1 = new StringBuilder();