1
This commit is contained in:
@@ -158,11 +158,20 @@ public class ErpProductServiceImpl implements IErpProductService
|
|||||||
}
|
}
|
||||||
|
|
||||||
JSONArray productList = data.getJSONArray("list");
|
JSONArray productList = data.getJSONArray("list");
|
||||||
|
Integer totalCount = data.getInteger("count");
|
||||||
|
|
||||||
if (productList == null || productList.isEmpty()) {
|
if (productList == null || productList.isEmpty()) {
|
||||||
log.info("拉取商品列表为空");
|
String statusMsg = productStatus != null ? "(状态:" + productStatus + ")" : "";
|
||||||
|
if (totalCount != null && totalCount > 0) {
|
||||||
|
log.info("拉取商品列表为空,但总数显示为 {},可能是分页问题", totalCount);
|
||||||
|
} else {
|
||||||
|
log.info("拉取商品列表为空{},该账号下没有符合条件的商品", statusMsg);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.info("拉取到 {} 个商品,开始保存", productList.size());
|
||||||
|
|
||||||
// 转换为实体对象并保存
|
// 转换为实体对象并保存
|
||||||
List<ErpProduct> erpProducts = new ArrayList<>();
|
List<ErpProduct> erpProducts = new ArrayList<>();
|
||||||
for (int i = 0; i < productList.size(); i++) {
|
for (int i = 0; i < productList.size(); i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user