统一发货口径并保护结果数据

This commit is contained in:
yml2213
2026-07-31 17:45:20 +08:00
parent 4ae9ef53ff
commit 4aa5258c2d
17 changed files with 120 additions and 73 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"github.com/gin-gonic/gin"
)
// OpenHandler 皮肤源头开放接口(上游 SourceOpen),基于 FulfillmentOrder 履约模型。
// OpenHandler 皮肤源头开放接口(上游 SourceOpen),基于 FulfillmentOrder 发货模型。
type OpenHandler struct {
fulfillmentSvc *service.FulfillmentService
}
+6 -6
View File
@@ -255,13 +255,13 @@ func (h *OpenV1Handler) SubmitDeliveryOrder(c *gin.Context) {
}
func buildOpenOrderResponse(order *model.FulfillmentOrder) gin.H {
canFulfill, reason := service.CanFulfill(order)
canShip, reason := service.CanFulfill(order)
data := gin.H{
"order_no": order.OrderNo,
"client_order_no": order.ClientOrderNo,
"order_status": order.OrderStatus,
"can_fulfill": canFulfill,
"cannot_fulfill_reason": reason,
"order_no": order.OrderNo,
"client_order_no": order.ClientOrderNo,
"order_status": order.OrderStatus,
"can_ship": canShip,
"cannot_ship_reason": reason,
"product": gin.H{
"sku": order.ProductSKU,
"name": order.ProductName,