From 99a60f89e7547db89dc933ad7c2e9e5aa302f431 Mon Sep 17 00:00:00 2001 From: sian Date: Sun, 18 Sep 2022 11:01:41 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- customer/sku/item.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customer/sku/item.go b/customer/sku/item.go index 4f20a39..8171e24 100644 --- a/customer/sku/item.go +++ b/customer/sku/item.go @@ -20,7 +20,7 @@ type ArgsSkuItemAdd struct { } // Add @Title 添加商品 -func (i *item) Add(ctx context.Context, args []ArgsSkuItemAdd) (reply []ReplySkuItemHandle, err error) { +func (i *item) Add(ctx context.Context, args ArgsSkuItemAdd) (reply []ReplySkuItemHandle, err error) { xClient, err := client.GetClient(i) if err != nil { return nil, err From 08e30dc077cb2986ec9c2c871c569f2ec4e28a96 Mon Sep 17 00:00:00 2001 From: sian Date: Sun, 18 Sep 2022 11:30:18 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A0=B9=E6=8D=AEids?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2sku=E4=BF=A1=E6=81=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/sku.go | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/supply/sku.go b/supply/sku.go index 3869e0b..0f63d78 100644 --- a/supply/sku.go +++ b/supply/sku.go @@ -308,3 +308,37 @@ func (s *sku) ChangeData(ctx context.Context, args ArgsSkuChangeData) (err error err = xClient.Call(ctx, "ChangeData", args, &reply) return } + +type ByIdsSkuItem struct { + Id uint `json:"id"` + Name string `json:"name"` // 名称 + BrandName string `json:"brandName"` // 品牌名称 + FirstCategoryId uint `json:"firstCategoryId"` // 一级分类id + SecondCategoryId uint `json:"secondCategoryId"` // 二级分类id + ThirdCategoryId uint `json:"thirdCategoryId"` // 三级分类id + SupplyPrice decimal.Decimal `json:"supplyPrice"` // 采购价 + GuidePrice decimal.Decimal `json:"guidePrice"` // 指导价 + ImgUrl string `json:"imgUrl"` // 商品主图 + PlatformStatus uint `json:"platformStatus"` // 平台状态 1=上架 2=下架 + SourceName string `json:"sourceName"` // 供应商名称 + SourceSkuId string `json:"sourceSkuId"` // 源skuId + SourceStatus uint `json:"sourceStatus"` // 供应商状态 1=上架 2=下架 + CustomerPrice decimal.Decimal `json:"customerPrice"` // 供货最高价 + CustomerProfitRate decimal.Decimal `json:"customerProfitRate"` // 供货利润率 供货利润/供货最高价% + AdjustType uint `json:"adjustType"` // 加价类型 + AdjustPrice decimal.Decimal `json:"adjustPrice"` // 加价金额 + AfterAdjustType uint `json:"afterAdjustType"` // 改价后加价类型 + AfterAdjustPrice decimal.Decimal `json:"afterAdjustPrice"` // 改价后加价金额 + Handle uint `json:"handle"` // 1=未处理 2=已处理 + Reason string `json:"reason"` // 驳回原因 +} + +// FindByIds @Title 根据Ids查询sku信息 +func (s *sku) FindByIds(ctx context.Context, ids []uint) (reply []ByIdsSkuItem, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "FindByIds", ids, &reply) + return +} From 883827475c3d7c49e48180966c69a08f59a3b949 Mon Sep 17 00:00:00 2001 From: sian Date: Sun, 18 Sep 2022 11:53:46 +0800 Subject: [PATCH 3/4] - --- customer/sku/type.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customer/sku/type.go b/customer/sku/type.go index 09835cd..9ad61ed 100644 --- a/customer/sku/type.go +++ b/customer/sku/type.go @@ -40,7 +40,7 @@ func (s *skuType) Del(ctx context.Context, id uint) error { return err } reply := 0 - return xClient.Call(ctx, "Add", id, &reply) + return xClient.Call(ctx, "Del", id, &reply) } type TypeItem struct { From 3228d36ab5de4f6fee02b521f974a9878d545ab7 Mon Sep 17 00:00:00 2001 From: kanade Date: Sun, 18 Sep 2022 17:14:53 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=A9=E6=B5=81?= =?UTF-8?q?=E8=BD=A8=E8=BF=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/interface/order.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/supply/interface/order.go b/supply/interface/order.go index e4f0bd1..8c81bdf 100644 --- a/supply/interface/order.go +++ b/supply/interface/order.go @@ -16,6 +16,8 @@ type OrderInterface interface { Close(ctx context.Context, orderSn string, reply *int) error // Cancel @Title 取消订单 Cancel(ctx context.Context, orderSn string, reply *int) error + // Trajectory @Title 物流轨迹 + Trajectory(ctx context.Context, orderSn string, reply *[]ReplyTrajectory) error } type ArgsOrderFreightFee struct { Skus []OrderFreightFeeSkuItem // 商品信息 @@ -47,3 +49,14 @@ type OrderReceiver struct { Email string // 邮件 ZipCode string // 邮编 } + +type ReplyTrajectory struct { + LogisticsName string `json:"logisticsName"` + WaybillCode string `json:"waybillCode"` + Steps []PackageStep `json:"steps"` +} +type PackageStep struct { + State string `json:"state"` + Content string `json:"content"` + OperatorAt int64 `json:"operatorAt"` +}