main #61

Merged
longbot merged 12 commits from zhuotianyuan/API:main into main 2026-01-23 09:13:11 +00:00
Collaborator
No description provided.
zhuotianyuan added 7 commits 2026-01-22 09:12:42 +00:00
86fd31ac12 feat(webhook): 添加对shoppy平台webhook的支持
- 在site.entity.ts中添加webhookUrl字段
- 在auth.middleware.ts中添加/shoppy路由到白名单
- 在webhook.controller.ts中实现shoppy平台webhook处理逻辑

fix(webhook): 更新webhook控制器中的密钥值

refactor(entity): 将可选字段明确标记为可选类型

feat(adapter): 公开映射方法以支持统一接口调用

将各适配器中的私有映射方法改为公开,并在接口中定义统一方法签名
修改webhook控制器以使用适配器映射方法处理订单数据

feat: 添加订单支付日期字段并支持国家筛选

- 在ShopyyOrder接口中添加date_paid字段
- 在OrderStatisticsParams中添加country数组字段用于国家筛选
- 修改统计服务以支持按国家筛选订单数据
- 更新数据库配置和同步设置
- 优化订单服务中的类型定义和查询条件

refactor(webhook): 移除未使用的shoppy webhook处理逻辑

fix(订单服务): 修复订单内容括号处理并添加同步日志

添加订单同步过程的调试日志
修复订单内容中括号内容的处理逻辑
修正控制器方法名拼写错误
0ea834218d fix(shopyy): 修复订单查询参数映射问题并添加时间范围支持
修正shopyy服务中获取所有订单的参数映射逻辑,添加支付时间范围支持
统一处理日期格式转换,确保参数正确传递
同时清理合并冲突标记和冗余代码
52fa7d651e feat: 添加产品图片URL字段并优化订单处理逻辑
添加产品实体中的图片URL字段
更新订单服务以支持更多查询参数和分页
修改数据库连接配置为生产环境
调整运费服务API基础URL
优化订单适配器中的字段映射逻辑
86aa5f5790 fix: 修复测试方法调用和订单内容格式
修复测试文件中错误的方法调用,从testQueryOrder改为testCreateOrder
调整订单内容格式,移除SKU显示并简化格式
修正电话号码字段的类型断言问题
修复日期格式错误,从mm改为MM
更新API基础URL和端点路径
移除不必要的日志对象调用,改用console.log
bff03de8b0 feat(logistics): 添加freightwaves物流平台支持
新增freightwaves物流平台集成,包括运单创建、状态查询和费用试算功能
添加sync_tms.job定时任务用于同步freightwaves运单状态
扩展ShipmentBookDTO和ShipmentFeeBookDTO以支持多物流平台
重构物流服务以支持uniuni和freightwaves双平台
1eacee307d refactor(订单服务): 优化产品详情查询逻辑
使用 productService 的 getComponentDetailFromSiteSku 方法替代直接查询,简化代码并增加数量检查
66a70f6209 fix(config): 更新本地数据库配置为远程服务器地址
将数据库连接配置从本地localhost改为远程服务器地址13.212.62.127,并调整端口为3306
同时启用数据库日志记录功能
zhuotianyuan added 1 commit 2026-01-22 09:20:12 +00:00
926e531d4f refactor(dto): 移除重复的ShopyyGetAllOrdersParams类和冗余字段
删除api.dto.ts中重复定义的ShopyyGetAllOrdersParams类
移除shopyy.dto.ts中冗余的date_paid字段
zhuotianyuan added 1 commit 2026-01-22 11:36:19 +00:00
2f57dc0d8c fix(logistics): 修复shopyy订单发货逻辑并优化freightwaves集成
修复shopyy平台订单发货时fulfillment接口调用问题,调整请求数据结构
优化freightwaves服务集成,添加订单查询功能
移除冗余代码,清理注释
longbot requested changes 2026-01-22 12:01:25 +00:00
@ -186,2 +186,2 @@
});
}))
console.log('Request data:', `${this.config.apiBaseUrl}${url}`, data, headers);
Collaborator

删除这些调试时候的日志

删除这些调试时候的日志
zhuotianyuan marked this conversation as resolved
@ -353,3 +367,3 @@
// 记录物流信息,并将订单状态转到完成
if (resShipmentOrder.status === 'SUCCESS') {
if (resShipmentOrder.status === 'SUCCESS' || resShipmentOrder.code === '00000200') {
Collaborator

备注一下success是uniuni,00000200是tms

备注一下success是uniuni,00000200是tms
zhuotianyuan marked this conversation as resolved
@ -719,2 +737,2 @@
if (!productDetail || !productDetail.quantity) return;
if (!productDetail || !productDetail.quantity) return;
Collaborator

缩进!

缩进!
zhuotianyuan marked this conversation as resolved
zhuotianyuan added 1 commit 2026-01-23 08:31:03 +00:00
22a13ce0b8 feat(logistics): 完善freightwaves运费试算接口实现
重构convertToFreightwavesRateTry方法,添加地址查询逻辑
移除freightwaves服务中无用的测试方法
修复订单同步日志格式和注释
zhuotianyuan added 1 commit 2026-01-23 08:33:22 +00:00
longbot requested changes 2026-01-23 08:49:20 +00:00
@ -753,3 +771,3 @@
return orderSale
}).filter(v => v !== null)
console.log("orderSales",orderSales)
console.log("orderSales", orderSales)
Collaborator

调试日志去掉

调试日志去掉
zhuotianyuan added 1 commit 2026-01-23 09:02:47 +00:00
e8424afd91 refactor(订单服务): 替换console.log为logger并移除重复日志
移除重复的console.log调用,统一使用logger进行日志记录
清理调试日志并优化日志级别使用
longbot merged commit e8424afd91 into main 2026-01-23 09:13:11 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: yoone/API#61
No description provided.