zksu
/
API
forked from yoone/API
1
0
Fork 0

fix(shopyy): 修复订单查询参数映射问题并添加时间范围支持

修正shopyy服务中获取所有订单的参数映射逻辑,添加支付时间范围支持
统一处理日期格式转换,确保参数正确传递
同时清理合并冲突标记和冗余代码
This commit is contained in:
zhuotianyuan 2026-01-13 19:25:13 +08:00
parent 86fd31ac12
commit 0ea834218d
3 changed files with 20 additions and 3 deletions

View File

@ -574,8 +574,8 @@ export class ShopyyAdapter implements ISiteAdapter {
}
mapGetAllOrdersParams(params: UnifiedSearchParamsDTO) :ShopyyGetAllOrdersParams{
const pay_at_min = dayjs(params.after || '').unix().toString();
const pay_at_max = dayjs(params.before || '').unix().toString();
const pay_at_min = dayjs(params.after || '').valueOf().toString();
const pay_at_max = dayjs(params.before || '').valueOf().toString();
return {
per_page: params.per_page || 100,

View File

@ -76,6 +76,23 @@ export class ShopyyGetAllOrdersParams {
order_field?: string;//排序字段默认id id=订单ID updated_at=最后更新时间 pay_at=支付时间
}
/**
* Shopyy获取所有订单参数DTO
*/
export class ShopyyGetAllOrdersParams {
@ApiProperty({ description: '页码', example: 1, required: false })
page?: number;
@ApiProperty({ description: '每页数量', example: 20, required: false })
per_page?: number;
@ApiProperty({ description: '支付时间范围开始', example: '2023-01-01T00:00:00Z', required: false })
pay_at_min?: string;
@ApiProperty({ description: '支付时间范围结束', example: '2023-01-01T23:59:59Z', required: false })
pay_at_max?: string;
}
/**
*
*/

View File

@ -423,7 +423,7 @@ export class FreightwavesService {
// 设置必要的配置
this.setConfig({
appSecret: 'gELCHguGmdTLo!zfihfM91hae8G@9Sz23Mh6pHrt',
apiBaseUrl: 'https://tms.freightwaves.ca',
apiBaseUrl: 'https://console-mock.apipost.cn/mock/0',
partner: '25072621035200000060'
});