Files
ruoyi-java/scripts/backfill_goods_info.ps1
2026-06-10 17:09:05 +08:00

30 lines
803 B
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 京粉订单 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)