This commit is contained in:
2025-10-10 02:07:29 +08:00
parent 4070dfdf91
commit e435298978
2 changed files with 81 additions and 1 deletions

View File

@@ -54,7 +54,7 @@ public class BatchPublishServiceImpl implements IBatchPublishService
// 京东接口配置
private final static String requestUrl = "http://192.168.8.88:6666/jd/";
private final static String skey = "your_skey_here";
private final static String skey = "2192057370ef8140c201079969c956a3";
@Autowired
private IOuterIdGeneratorService outerIdGeneratorService;
@@ -68,7 +68,10 @@ public class BatchPublishServiceImpl implements IBatchPublishService
JSONObject param = new JSONObject();
param.put("skey", skey);
param.put("promotionContent", requestBody.get("promotionContent"));
log.info("调用京东接口URL: {}, 参数: {}", url, param.toJSONString());
String result = HttpUtils.sendJsonPost(url, param.toJSONString());
log.info("京东接口响应: {}", result);
// 尝试将 priceInfo.price 提取为顶层 price 字段,并清理文案中的 URL
try {
@@ -113,6 +116,8 @@ public class BatchPublishServiceImpl implements IBatchPublishService
List<String> skuids = LineReportParser.extractSkuids(message);
log.info("提取到 {} 个URL, {} 个SKUID", urls.size(), skuids.size());
log.info("提取的URLs: {}", urls);
log.info("提取的SKUIDs: {}", skuids);
// 查询商品详情
List<Map<String, Object>> products = new ArrayList<>();