1
This commit is contained in:
@@ -103,7 +103,7 @@ public class ErpProductController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 从闲鱼ERP拉取商品列表并保存
|
||||
* 从闲鱼ERP拉取商品列表并保存(单页,保留用于兼容)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('jarvis:erpProduct:pull')")
|
||||
@Log(title = "拉取闲鱼商品", businessType = BusinessType.INSERT)
|
||||
@@ -124,13 +124,31 @@ public class ErpProductController extends BaseController
|
||||
if (productStatus != null) {
|
||||
message += "(筛选条件:状态=" + statusText + ")";
|
||||
}
|
||||
message += "。建议:1.尝试不选择状态拉取全部商品;2.尝试其他状态(下架、已售等)";
|
||||
message += "。建议:使用全量同步功能自动遍历所有页码";
|
||||
return success(message);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
return error("拉取商品列表失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 全量同步商品(自动遍历所有页码,同步更新和删除)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('jarvis:erpProduct:pull')")
|
||||
@Log(title = "全量同步闲鱼商品", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/syncAll")
|
||||
public AjaxResult syncAllProducts(
|
||||
@RequestParam(required = false) String appid,
|
||||
@RequestParam(required = false) Integer productStatus)
|
||||
{
|
||||
try {
|
||||
IErpProductService.SyncResult result = erpProductService.syncAllProducts(appid, productStatus);
|
||||
return success(result.getMessage());
|
||||
} catch (Exception e) {
|
||||
return error("全量同步失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取状态文本(用于提示信息)
|
||||
|
||||
Reference in New Issue
Block a user