parent
acecd3bef4
commit
c592310fa9
|
|
@ -21,7 +21,7 @@ export class SyncTmsJob implements IJob {
|
||||||
shipmentModel: Repository<Shipment>
|
shipmentModel: Repository<Shipment>
|
||||||
|
|
||||||
async onTick() {
|
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(
|
const results = await Promise.all(
|
||||||
shipments.map(async shipment => {
|
shipments.map(async shipment => {
|
||||||
return await this.logisticsService.updateFreightwavesShipmentState(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()
|
@Provide()
|
||||||
export class FreightwavesService {
|
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,
|
headers,
|
||||||
data
|
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错误
|
// 发送请求 - 临时禁用SSL证书验证以解决UNABLE_TO_VERIFY_LEAF_SIGNATURE错误
|
||||||
const response = await axios.post<FreightwavesResponse<T>>(
|
const response = await axios.post<FreightwavesResponse<T>>(
|
||||||
`${this.config.apiBaseUrl}${url}`,
|
`${this.config.apiBaseUrl}${url}`,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue