fix: 9610预报下游网关地址改为取自 api_center 配置
All checks were successful
Build and Deploy / deploy (push) Successful in 58s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zzh 2026-09-28 14:33:52 +08:00
parent 6c8f7cb781
commit 8226542ffd

View File

@ -242,7 +242,7 @@ public class Customs9610OrderService : ApplicationService
} }
/// <summary> /// <summary>
/// 预报下游(写死 create9610Order / BH 网关地址)。 /// 预报下游(create9610Order / BH;网关地址取自其他配置 api_center)。
/// </summary> /// </summary>
[HttpPost("/order/customs-9610/fetch-declaration-form-batch")] [HttpPost("/order/customs-9610/fetch-declaration-form-batch")]
public async Task<Customs9610DeclareBatchOutput> FetchDeclarationFormBatchAsync([FromBody] Customs9610IdsInput input) public async Task<Customs9610DeclareBatchOutput> FetchDeclarationFormBatchAsync([FromBody] Customs9610IdsInput input)
@ -274,10 +274,10 @@ public class Customs9610OrderService : ApplicationService
} }
/// <summary> /// <summary>
/// 写死的 9610 预报下游地址:create9610Order + supplierCode=BH。 /// 9610 预报下游标准码 / 供应商码(网关根地址由 api_center.BaseUrl 拼装)。
/// </summary> /// </summary>
private const string Create9610OrderForwardUrl = private const string Create9610OrderStandardCode = "create9610Order";
"https://api.ideship.com/itfx/InterfaceForward/ForwardWithSubscribe?standardCode=create9610Order&supplierCode=BH"; private const string Create9610OrderSupplierCode = "BH";
private async Task<Customs9610DeclareResult> DownstreamForwardOneAsync(int id) private async Task<Customs9610DeclareResult> DownstreamForwardOneAsync(int id)
{ {
@ -303,8 +303,10 @@ public class Customs9610OrderService : ApplicationService
ItfxForwardResult forward; ItfxForwardResult forward;
try try
{ {
forward = await ItfxForwardClient.ForwardToAbsoluteUrlAsync( // BaseUrl 来自其他配置 api_center(ItfxForwardClient 内部解析)
Create9610OrderForwardUrl, forward = await ItfxForwardClient.ForwardWithSubscribeAsync(
Create9610OrderStandardCode,
Create9610OrderSupplierCode,
creds.AppKey, creds.AppKey,
creds.AppSecret, creds.AppSecret,
body); body);
@ -322,7 +324,6 @@ public class Customs9610OrderService : ApplicationService
Status = header.Status, Status = header.Status,
ServiceNo = header.ServiceNo, ServiceNo = header.ServiceNo,
ClientNo = header.ClientNo, ClientNo = header.ClientNo,
Url = Create9610OrderForwardUrl,
}; };
} }