style: 清理 gofmt 偏差
纯对齐与行尾空行调整,无逻辑变更。gofmt -l 现输出为空, 配合 make fmt 可将格式检查直接纳入 CI。
This commit is contained in:
@@ -152,4 +152,3 @@ func (h *PlatformLewanHandler) BatchSyncLewanProducts(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
response.OK(c, gin.H{"synced_count": count})
|
response.OK(c, gin.H{"synced_count": count})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -273,4 +273,3 @@ func NewGormLogger(mode string) logger.Interface {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -58,19 +58,19 @@ type ResponseEnvelope struct {
|
|||||||
|
|
||||||
// Product 代表乐玩平台商品
|
// Product 代表乐玩平台商品
|
||||||
type Product struct {
|
type Product struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
CategoryId string `json:"categoryId"`
|
CategoryId string `json:"categoryId"`
|
||||||
CategoryName string `json:"categoryName"`
|
CategoryName string `json:"categoryName"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Summary string `json:"summary"`
|
Summary string `json:"summary"`
|
||||||
ThumbnailUrl string `json:"thumbnailUrl"`
|
ThumbnailUrl string `json:"thumbnailUrl"`
|
||||||
Stock int64 `json:"stock"`
|
Stock int64 `json:"stock"`
|
||||||
RoleDeliveryLimit *int `json:"roleDeliveryLimit"`
|
RoleDeliveryLimit *int `json:"roleDeliveryLimit"`
|
||||||
DeliveryType string `json:"deliveryType"` // LINK_BINDING, EMAIL_BINDING
|
DeliveryType string `json:"deliveryType"` // LINK_BINDING, EMAIL_BINDING
|
||||||
EffectiveUnitPrice string `json:"effectiveUnitPrice"`
|
EffectiveUnitPrice string `json:"effectiveUnitPrice"`
|
||||||
AccessMode string `json:"accessMode"` // PURCHASE, VIEW
|
AccessMode string `json:"accessMode"` // PURCHASE, VIEW
|
||||||
UpdatedAt string `json:"updatedAt"`
|
UpdatedAt string `json:"updatedAt"`
|
||||||
ProductVersion string `json:"productVersion"`
|
ProductVersion string `json:"productVersion"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProductListResult struct {
|
type ProductListResult struct {
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ type Handlers struct {
|
|||||||
OpenAPIKey string
|
OpenAPIKey string
|
||||||
OpenAPISecret string
|
OpenAPISecret string
|
||||||
OpenSignSkew int64
|
OpenSignSkew int64
|
||||||
OpenAPIDebug bool
|
OpenAPIDebug bool
|
||||||
UploadDir string
|
UploadDir string
|
||||||
// CORSAllowedOrigins 跨域来源白名单;为空时使用本地开发默认来源。
|
// CORSAllowedOrigins 跨域来源白名单;为空时使用本地开发默认来源。
|
||||||
CORSAllowedOrigins []string
|
CORSAllowedOrigins []string
|
||||||
|
|
||||||
|
|||||||
@@ -465,9 +465,9 @@ func TestFulfillmentCancelRejectedWhenSubmittedUpstream(t *testing.T) {
|
|||||||
// 已提交上游(provider_order_no 非空)的失败订单禁止取消,避免退款后上游仍发货。
|
// 已提交上游(provider_order_no 非空)的失败订单禁止取消,避免退款后上游仍发货。
|
||||||
submitted := create("client-cancel-submitted")
|
submitted := create("client-cancel-submitted")
|
||||||
if err := db.Model(&model.FulfillmentOrder{}).Where("id = ?", submitted.ID).Updates(map[string]interface{}{
|
if err := db.Model(&model.FulfillmentOrder{}).Where("id = ?", submitted.ID).Updates(map[string]interface{}{
|
||||||
"order_status": model.OrderStatusShipFailed,
|
"order_status": model.OrderStatusShipFailed,
|
||||||
"provider_order_no": "PROV-UPSTREAM-001",
|
"provider_order_no": "PROV-UPSTREAM-001",
|
||||||
"failure_reason": "上游角色校验失败",
|
"failure_reason": "上游角色校验失败",
|
||||||
}).Error; err != nil {
|
}).Error; err != nil {
|
||||||
t.Fatalf("seed submitted failed order: %v", err)
|
t.Fatalf("seed submitted failed order: %v", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -507,4 +507,3 @@ func (s *MerchantService) BatchSyncLewanProductsToCatalog(items []SyncLewanProdu
|
|||||||
}
|
}
|
||||||
return count, nil
|
return count, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user