forked from yoone/API
parent
acecd3bef4
commit
c592310fa9
|
|
@ -21,7 +21,7 @@ export class SyncTmsJob implements IJob {
|
|||
shipmentModel: Repository<Shipment>
|
||||
|
||||
async onTick() {
|
||||
const shipments:Shipment[] = await this.shipmentModel.findBy({ tracking_provider: 'freightwaves',finished: false });
|
||||
const shipments: Shipment[] = await this.shipmentModel.findBy({ tracking_provider: 'freightwaves', finished: false });
|
||||
const results = await Promise.all(
|
||||
shipments.map(async shipment => {
|
||||
return await this.logisticsService.updateFreightwavesShipmentState(shipment);
|
||||
|
|
|
|||
|
|
@ -140,10 +140,10 @@ interface QueryOrderResponseData {
|
|||
}
|
||||
|
||||
// 修改订单响应数据接口
|
||||
interface ModifyOrderResponseData extends CreateOrderResponseData {}
|
||||
interface ModifyOrderResponseData extends CreateOrderResponseData { }
|
||||
|
||||
// 订单退款响应数据接口
|
||||
interface RefundOrderResponseData {}
|
||||
interface RefundOrderResponseData { }
|
||||
|
||||
@Provide()
|
||||
export class FreightwavesService {
|
||||
|
|
@ -180,11 +180,11 @@ export class FreightwavesService {
|
|||
};
|
||||
|
||||
// 记录请求前的详细信息
|
||||
console.log(`Sending request to: ${this.config.apiBaseUrl}${url}`,JSON.stringify({
|
||||
console.log(`Sending request to: ${this.config.apiBaseUrl}${url}`, JSON.stringify({
|
||||
headers,
|
||||
data
|
||||
}))
|
||||
console.log('Request data:', `${this.config.apiBaseUrl}${url}`, data,headers);
|
||||
console.log('Request data:', `${this.config.apiBaseUrl}${url}`, data, headers);
|
||||
// 发送请求 - 临时禁用SSL证书验证以解决UNABLE_TO_VERIFY_LEAF_SIGNATURE错误
|
||||
const response = await axios.post<FreightwavesResponse<T>>(
|
||||
`${this.config.apiBaseUrl}${url}`,
|
||||
|
|
|
|||
Loading…
Reference in New Issue