From 52fa7d651ebb6b6e3ef8f0b962caa269bd37c5c3 Mon Sep 17 00:00:00 2001 From: zhuotianyuan Date: Wed, 14 Jan 2026 20:07:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=A7=E5=93=81?= =?UTF-8?q?=E5=9B=BE=E7=89=87URL=E5=AD=97=E6=AE=B5=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=AE=A2=E5=8D=95=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加产品实体中的图片URL字段 更新订单服务以支持更多查询参数和分页 修改数据库连接配置为生产环境 调整运费服务API基础URL 优化订单适配器中的字段映射逻辑 --- src/adapter/shopyy.adapter.ts | 4 ++-- src/config/config.local.ts | 7 +++---- src/dto/api.dto.ts | 8 ++++---- src/service/freightwaves.service.ts | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/adapter/shopyy.adapter.ts b/src/adapter/shopyy.adapter.ts index aa515f8..1e1af3b 100644 --- a/src/adapter/shopyy.adapter.ts +++ b/src/adapter/shopyy.adapter.ts @@ -574,8 +574,8 @@ export class ShopyyAdapter implements ISiteAdapter { } mapGetAllOrdersParams(params: UnifiedSearchParamsDTO) :ShopyyGetAllOrdersParams{ - const pay_at_min = dayjs(params.after || '').valueOf().toString(); - const pay_at_max = dayjs(params.before || '').valueOf().toString(); + const pay_at_min = dayjs(params.after || '').unix().toString(); + const pay_at_max = dayjs(params.before || '').unix().toString(); return { per_page: params.per_page || 100, diff --git a/src/config/config.local.ts b/src/config/config.local.ts index bd64204..1b92d9c 100644 --- a/src/config/config.local.ts +++ b/src/config/config.local.ts @@ -19,13 +19,12 @@ export default { typeorm: { dataSource: { default: { - host: '13.212.62.127', - port: "3306", + host: 'localhost', + port: "23306", username: 'root', password: 'Yoone!@.2025', database: 'inventory_v2', - synchronize: true, - logging: true, + synchronize: true }, }, }, diff --git a/src/dto/api.dto.ts b/src/dto/api.dto.ts index 93de5f8..a10f6c2 100644 --- a/src/dto/api.dto.ts +++ b/src/dto/api.dto.ts @@ -80,10 +80,7 @@ export class ShopyyGetAllOrdersParams { * Shopyy获取所有订单参数DTO */ export class ShopyyGetAllOrdersParams { - @ApiProperty({ description: '页码', example: 1, required: false }) - page?: number; - - @ApiProperty({ description: '每页数量', example: 20, required: false }) + @ApiProperty({ description: '每页数量', example: 100, required: false }) per_page?: number; @ApiProperty({ description: '支付时间范围开始', example: '2023-01-01T00:00:00Z', required: false }) @@ -91,6 +88,9 @@ export class ShopyyGetAllOrdersParams { @ApiProperty({ description: '支付时间范围结束', example: '2023-01-01T23:59:59Z', required: false }) pay_at_max?: string; + + @ApiProperty({ description: '排序字段', example: 'id', required: false }) + order_field?: string;//排序字段(默认id) id=订单ID updated_at=最后更新时间 pay_at=支付时间 } /** diff --git a/src/service/freightwaves.service.ts b/src/service/freightwaves.service.ts index bcd6ca5..10900ef 100644 --- a/src/service/freightwaves.service.ts +++ b/src/service/freightwaves.service.ts @@ -423,7 +423,7 @@ export class FreightwavesService { // 设置必要的配置 this.setConfig({ appSecret: 'gELCHguGmdTLo!zfihfM91hae8G@9Sz23Mh6pHrt', - apiBaseUrl: 'https://console-mock.apipost.cn/mock/0', + apiBaseUrl: 'https://tms.freightwaves.ca', partner: '25072621035200000060' });