This commit is contained in:
van
2026-06-10 17:09:05 +08:00
parent 1f6625f296
commit e890039dea
3 changed files with 88 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
# 京粉订单 goodsInfo 回填脚本(需先部署 Jarvis_java + ruoyi-java并已登录获取 token
# 用法示例见下方 $body
param(
[string]$BaseUrl = "https://jarvis.van333.cn/jarvis-api",
[string]$Token = "",
[string]$OrderIds = "",
[switch]$Missing,
[int]$Limit = 100
)
$body = @{}
if ($Missing) {
$body.missing = $true
$body.limit = $Limit
} elseif ($OrderIds) {
$body.orderIds = $OrderIds
} else {
Write-Host "请指定 -OrderIds '订单号1,订单号2' 或 -Missing"
exit 1
}
$headers = @{ "Content-Type" = "application/json" }
if ($Token) {
$headers.Authorization = "Bearer $Token"
}
$uri = "$BaseUrl/system/jdorder/orderRows/backfillGoodsInfo"
Invoke-RestMethod -Method Post -Uri $uri -Headers $headers -Body ($body | ConvertTo-Json)