From 564199bc049074b0e316edd2ccb3703e748857f3 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 20 Dec 2022 14:06:42 +0800 Subject: [PATCH 01/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/sku.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wholesale/sku.go b/wholesale/sku.go index 0b7b8dc..a5fc287 100644 --- a/wholesale/sku.go +++ b/wholesale/sku.go @@ -396,6 +396,7 @@ type ArgsSkuChangeData struct { UpcCode string // 商品条码 Source source // 商品来源 Specifications []SkuSpecification // 商品参数信息 + Imgs []string // 商品图片 Length decimal.Decimal // 长 Width decimal.Decimal // 宽 Height decimal.Decimal // 高 From ebbd5504b3727896863dbcef1665f7e1a9d33dc9 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 20 Dec 2022 15:29:18 +0800 Subject: [PATCH 02/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/batch/goods.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/supplier/batch/goods.go b/supplier/batch/goods.go index febf014..9c38df0 100644 --- a/supplier/batch/goods.go +++ b/supplier/batch/goods.go @@ -198,3 +198,17 @@ func (g *goods) FindBySkuIds(ctx context.Context, skuIds []uint) (reply []ReplyB err = xClient.Call(ctx, "FindBySkuIds", skuIds, &reply) return } + +type ArgsBatchGoodsChange struct { + GoodsIds []uint // 商品id +} + +// Change @Title 商品信息变动 +func (g *goods) Change(ctx context.Context, args ArgsBatchGoodsChange) (err error) { + xClient, err := client.GetClient(g) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Change", args, &reply) +} From 0678d12dd62e5f3f466e5eb42b5276c08c72351e Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 21 Dec 2022 11:00:42 +0800 Subject: [PATCH 03/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index 7dd6328..356f70a 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -3,6 +3,7 @@ package channel import ( "context" "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" "github.com/shopspring/decimal" "github.com/smallnest/rpcx/share" ) @@ -108,3 +109,58 @@ func (o *order) Cancel(ctx context.Context, channelId string, args ArgsOrderChan } return xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Cancel", args, &reply) } + +type ArgsOrderLists struct { + Search OrderSearch + Page bean.Page +} + +type OrderSearch struct { + Status []uint // 订单状态 + CancelStatus uint // 取消状态 + OrderSubSn string // 订单号 + CreatedStartDate string // 创建开始日期 + CreatedEndDate string // 创建结束日期 + PayStartDate string // 支付开始日期 + PayEndDate string // 支付结束日期 +} + +type ReplyOrderLists struct { + Lists []OrderItem `json:"lists"` + Total int64 `json:"total"` +} + +type OrderItem struct { + Id uint `json:"id"` + OrderSubSn string `json:"orderSubSn"` + FreightFee decimal.Decimal `json:"freightFee"` + OrderFee decimal.Decimal `json:"orderFee"` + Status uint `json:"status"` + CancelStatus uint `json:"cancelStatus"` + CreatedAt int64 `json:"createdAt"` + PayTime int64 `json:"payTime"` + FinishAt int64 `json:"finishAt"` + StockOutAt int64 `json:"stockOutAt"` + CloseAt int64 `json:"closeAt"` + Skus []OrderSkuItem `json:"skus"` +} + +type OrderSkuItem struct { + SkuName string `json:"skuName"` + SkuId uint `json:"skuId"` + Size string `json:"size"` + Color string `json:"color"` + PackingRate uint `json:"packingRate"` + SupplyPrice decimal.Decimal `json:"supplyPrice"` + Quantity uint `json:"quantity"` +} + +// Lists @Title 订单列表 +func (o *order) Lists(ctx context.Context, channelId string, args ArgsOrderLists) (reply ReplyOrderLists, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return ReplyOrderLists{}, err + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Lists", args, &reply) + return +} From 205e54619ab55c278304a0e55fc54fab3388d371 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 21 Dec 2022 11:07:10 +0800 Subject: [PATCH 04/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index 356f70a..6728b73 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -146,6 +146,7 @@ type OrderItem struct { } type OrderSkuItem struct { + Img string `json:"img"` SkuName string `json:"skuName"` SkuId uint `json:"skuId"` Size string `json:"size"` From 1ef64ad6b5b9935f6eaa63c8c9aea402629d64dd Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 21 Dec 2022 11:18:53 +0800 Subject: [PATCH 05/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index 6728b73..3061fca 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -131,18 +131,20 @@ type ReplyOrderLists struct { } type OrderItem struct { - Id uint `json:"id"` - OrderSubSn string `json:"orderSubSn"` - FreightFee decimal.Decimal `json:"freightFee"` - OrderFee decimal.Decimal `json:"orderFee"` - Status uint `json:"status"` - CancelStatus uint `json:"cancelStatus"` - CreatedAt int64 `json:"createdAt"` - PayTime int64 `json:"payTime"` - FinishAt int64 `json:"finishAt"` - StockOutAt int64 `json:"stockOutAt"` - CloseAt int64 `json:"closeAt"` - Skus []OrderSkuItem `json:"skus"` + Id uint `json:"id"` + ReceiverName string `json:"receiverName"` + ReceiverMobile string `json:"receiverMobile"` + OrderSubSn string `json:"orderSubSn"` + FreightFee decimal.Decimal `json:"freightFee"` + OrderFee decimal.Decimal `json:"orderFee"` + Status uint `json:"status"` + CancelStatus uint `json:"cancelStatus"` + CreatedAt int64 `json:"createdAt"` + PayTime int64 `json:"payTime"` + FinishAt int64 `json:"finishAt"` + StockOutAt int64 `json:"stockOutAt"` + CloseAt int64 `json:"closeAt"` + Skus []OrderSkuItem `json:"skus"` } type OrderSkuItem struct { From 6589995c1f672cab14aaba3fe07edd21bb55304a Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 21 Dec 2022 13:53:28 +0800 Subject: [PATCH 06/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/sku.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wholesale/channel/sku.go b/wholesale/channel/sku.go index 6241268..e8dc048 100644 --- a/wholesale/channel/sku.go +++ b/wholesale/channel/sku.go @@ -87,7 +87,15 @@ type SkuEsSearch struct { MinDiscount decimal.Decimal // 最低折扣 MaxDiscount decimal.Decimal // 最高折扣 Expand []map[string]interface{} // 拓展查询 + CustomerSearch CustomerSearch // 客户筛选条件 } + +type CustomerSearch struct { + SkuName string + SkuId uint + BrandName string +} + type ArgsSkuListsEs struct { Search SkuEsSearch Page bean.Page From 24a34758a8d837ccd7a7e3fdfddc77ea481706e2 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 21 Dec 2022 16:37:42 +0800 Subject: [PATCH 07/28] =?UTF-8?q?=E6=89=B9=E5=8F=91=E5=95=86=E5=9F=8E?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- customer/batchSku/banner.go | 67 ++++++++++++++++++++++ customer/batchSku/batchSku.go | 8 +++ customer/batchSku/item.go | 96 ++++++++++++++++++++++++++++++++ customer/batchSku/sale.go | 102 ++++++++++++++++++++++++++++++++++ customer/batchSku/type.go | 60 ++++++++++++++++++++ customer/customer.go | 8 ++- 6 files changed, 338 insertions(+), 3 deletions(-) create mode 100644 customer/batchSku/banner.go create mode 100644 customer/batchSku/batchSku.go create mode 100644 customer/batchSku/item.go create mode 100644 customer/batchSku/sale.go create mode 100644 customer/batchSku/type.go diff --git a/customer/batchSku/banner.go b/customer/batchSku/banner.go new file mode 100644 index 0000000..afb79ef --- /dev/null +++ b/customer/batchSku/banner.go @@ -0,0 +1,67 @@ +package batchSku + +import ( + "context" + "git.oa00.com/supply-chain/service/client" +) + +type banner struct { +} + +type BannerItem struct { + Id uint `json:"id"` + Img string `json:"img"` + SkuId uint `json:"skuId"` +} + +// All @Title 全部轮播图 +func (b *banner) All(ctx context.Context) (reply []BannerItem, err error) { + xClient, err := client.GetClient(b) + if err != nil { + return + } + args := 0 + err = xClient.Call(ctx, "All", args, &reply) + return +} + +type ArgsSkuBannerEdit struct { + Id uint + SkuId uint + Img string +} + +// Edit @Title 编辑轮播图 +func (b *banner) Edit(ctx context.Context, args ArgsSkuBannerEdit) (err error) { + xClient, err := client.GetClient(b) + if err != nil { + return + } + reply := 0 + return xClient.Call(ctx, "Edit", args, &reply) +} + +// Del @Title 删除轮播图 +func (b *banner) Del(ctx context.Context, id uint) (err error) { + xClient, err := client.GetClient(b) + if err != nil { + return + } + reply := 0 + return xClient.Call(ctx, "Del", id, &reply) +} + +type ArgsSkuBannerAdd struct { + SkuId uint + Img string +} + +// Add @Title 添加轮播图 +func (b *banner) Add(ctx context.Context, args ArgsSkuBannerAdd) error { + xClient, err := client.GetClient(b) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Add", args, &reply) +} diff --git a/customer/batchSku/batchSku.go b/customer/batchSku/batchSku.go new file mode 100644 index 0000000..d4eea51 --- /dev/null +++ b/customer/batchSku/batchSku.go @@ -0,0 +1,8 @@ +package batchSku + +type BatchSku struct { + Banner banner + Type skuType + Sale sale + Item item +} diff --git a/customer/batchSku/item.go b/customer/batchSku/item.go new file mode 100644 index 0000000..49f3798 --- /dev/null +++ b/customer/batchSku/item.go @@ -0,0 +1,96 @@ +package batchSku + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" +) + +type item struct { +} + +type ReplySkuItemHandle struct { + SkuId uint `json:"skuId"` + Error string `json:"error"` +} + +type ArgsSkuItemAdd struct { + SkuTypeId uint + SkuIds []uint +} + +// Add @Title 添加商品 +func (i *item) Add(ctx context.Context, args ArgsSkuItemAdd) (reply []ReplySkuItemHandle, err error) { + xClient, err := client.GetClient(i) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "Add", args, &reply) + return +} + +type ArgsSkuItemDel struct { + SkuTypeId uint + SkuIds []uint +} + +// Del @Title 删除商品 +func (i *item) Del(ctx context.Context, args ArgsSkuItemDel) error { + xClient, err := client.GetClient(i) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Del", args, &reply) +} + +type ArgsSkuItemLists struct { + SkuTypeId uint + SkuId uint + Page bean.Page +} + +type ReplySkuItemLists struct { + Total int64 `json:"total"` + Lists []SkuItem `json:"lists"` +} + +type SkuItem struct { + Id uint `json:"id"` + SkuId uint `json:"skuId"` +} + +// Lists @Title 商品列表 +func (i *item) Lists(ctx context.Context, args ArgsSkuItemLists) (reply ReplySkuItemLists, err error) { + xClient, err := client.GetClient(i) + if err != nil { + return ReplySkuItemLists{}, err + } + err = xClient.Call(ctx, "Lists", args, &reply) + return +} + +// DelAll @Title 删除全部商品 +func (i *item) DelAll(ctx context.Context, skuTypeId uint) error { + xClient, err := client.GetClient(i) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "DelAll", skuTypeId, &reply) +} + +type ArgsBySkuIds struct { + SkuIds []uint + SkuTypeId uint +} + +// FindBySkuIds @Title 根据SkuId查询数据 +func (i *item) FindBySkuIds(ctx context.Context, args ArgsBySkuIds) (reply []SkuItem, err error) { + xClient, err := client.GetClient(i) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "FindBySkuIds", args, &reply) + return +} diff --git a/customer/batchSku/sale.go b/customer/batchSku/sale.go new file mode 100644 index 0000000..c39f007 --- /dev/null +++ b/customer/batchSku/sale.go @@ -0,0 +1,102 @@ +package batchSku + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" +) + +type sale struct { +} + +type SaleHandleItem struct { + SkuId uint `json:"skuId"` + Error string `json:"error"` +} + +// Add @Title 添加 +func (s *sale) Add(ctx context.Context, skuIds []uint) (reply []SaleHandleItem, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "Add", skuIds, &reply) + return +} + +type ArgsSaleLists struct { + SkuId uint + Page bean.Page +} + +// Lists @Title 商品列表 +func (s *sale) Lists(ctx context.Context, args ArgsSaleLists) (reply ReplySaleSkuItemLists, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return ReplySaleSkuItemLists{}, err + } + err = xClient.Call(ctx, "Lists", args, &reply) + return +} + +type ReplySaleSkuItemLists struct { + Total int64 `json:"total"` + Lists []SaleSkuItem `json:"lists"` +} + +type SaleSkuItem struct { + Id uint `json:"id"` + SkuId uint `json:"skuId"` +} + +// Del @Title 删除商品 +func (s *sale) Del(ctx context.Context, ids []uint) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Del", ids, &reply) +} + +// SetImg @Title 设置区域导图 +func (s *sale) SetImg(ctx context.Context, path string) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "SetImg", path, &reply) +} + +// GetImg @Title 获取区域导图 +func (s *sale) GetImg(ctx context.Context) (reply string, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return "", err + } + args := 0 + err = xClient.Call(ctx, "GetImg", args, &reply) + return +} + +// DelAll @Title 删除全部商品 +func (s *sale) DelAll(ctx context.Context) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + args := 0 + reply := 0 + return xClient.Call(ctx, "DelAll", args, &reply) +} + +// FindBySkuIds @Title 根据SkuId查询数据 +func (s *sale) FindBySkuIds(ctx context.Context, skuIds []uint) (reply []SaleSkuItem, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return nil, err + } + err = xClient.Call(ctx, "FindBySkuIds", skuIds, &reply) + return +} diff --git a/customer/batchSku/type.go b/customer/batchSku/type.go new file mode 100644 index 0000000..1fd5b70 --- /dev/null +++ b/customer/batchSku/type.go @@ -0,0 +1,60 @@ +package batchSku + +import ( + "context" + "git.oa00.com/supply-chain/service/client" +) + +type skuType struct { +} + +type ArgsSkuTypeEdit struct { + Id uint + Name string +} + +// Edit @Title 编辑分类 +func (s *skuType) Edit(ctx context.Context, args ArgsSkuTypeEdit) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Edit", args, &reply) +} + +// Add @Title 添加分类 +func (s *skuType) Add(ctx context.Context, name string) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Add", name, &reply) +} + +// Del @Title 删除分类 +func (s *skuType) Del(ctx context.Context, id uint) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Del", id, &reply) +} + +type TypeItem struct { + Id uint `json:"id"` + Name string `json:"name"` +} + +// All @Title 全部分类 +func (s *skuType) All(ctx context.Context) (reply []TypeItem, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return nil, err + } + args := 0 + err = xClient.Call(ctx, "All", args, &reply) + return +} diff --git a/customer/customer.go b/customer/customer.go index 5b89f2a..ad1f7b7 100644 --- a/customer/customer.go +++ b/customer/customer.go @@ -1,12 +1,14 @@ package customer import ( + "git.oa00.com/supply-chain/service/customer/batchSku" "git.oa00.com/supply-chain/service/customer/service" "git.oa00.com/supply-chain/service/customer/sku" ) type Customer struct { - User user - Service service.Service - Sku sku.Sku + User user + Service service.Service + Sku sku.Sku + BatchSku batchSku.BatchSku } From c16783e77d8ae1ebe7a3a7887e9ac010ca8667a6 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 22 Dec 2022 11:26:10 +0800 Subject: [PATCH 08/28] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=9F=E6=9C=9B?= =?UTF-8?q?=E5=8F=91=E8=B4=A7=E6=97=A5=E6=9C=9F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index 3061fca..246d5c5 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -54,10 +54,11 @@ type ArgsOrderSubmit struct { } type Receiver struct { - Name string // 姓名 - Mobile string // 手机号 - Email string // 邮箱 - ZipCode string // 邮编 + Name string // 姓名 + Mobile string // 手机号 + HopeStockOutDate string // 期望发货日期 + Email string // 邮箱 + ZipCode string // 邮编 } type ReplyOrderSubmit struct { From e7ad4b1478f6469ba91925db589018319e205500 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 22 Dec 2022 13:05:04 +0800 Subject: [PATCH 09/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index 246d5c5..e7b6fcb 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -145,10 +145,16 @@ type OrderItem struct { FinishAt int64 `json:"finishAt"` StockOutAt int64 `json:"stockOutAt"` CloseAt int64 `json:"closeAt"` - Skus []OrderSkuItem `json:"skus"` + Skus []OrderSku `json:"skus"` + Packages []OrderPackage `json:"packages"` } -type OrderSkuItem struct { +type OrderPackage struct { + LogisticsName string `json:"logisticsName"` + WaybillCode string `json:"waybillCode"` +} + +type OrderSku struct { Img string `json:"img"` SkuName string `json:"skuName"` SkuId uint `json:"skuId"` @@ -168,3 +174,13 @@ func (o *order) Lists(ctx context.Context, channelId string, args ArgsOrderLists err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Lists", args, &reply) return } + +// SubDetail @Title 子订单详情 +func (o *order) SubDetail(ctx context.Context, channelId, orderSn string) (reply OrderItem, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "SubDetail", orderSn, &reply) + return +} From 8b9d19b65589bd85927f318b4d04d5f252231bf3 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 22 Dec 2022 13:16:32 +0800 Subject: [PATCH 10/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index e7b6fcb..e05cde9 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -135,6 +135,7 @@ type OrderItem struct { Id uint `json:"id"` ReceiverName string `json:"receiverName"` ReceiverMobile string `json:"receiverMobile"` + Address string `json:"address"` OrderSubSn string `json:"orderSubSn"` FreightFee decimal.Decimal `json:"freightFee"` OrderFee decimal.Decimal `json:"orderFee"` From 39068492d13a5ceb86b233871cfad45c7fbeeaf1 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 23 Dec 2022 09:24:12 +0800 Subject: [PATCH 11/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index e05cde9..03c9719 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -148,6 +148,7 @@ type OrderItem struct { CloseAt int64 `json:"closeAt"` Skus []OrderSku `json:"skus"` Packages []OrderPackage `json:"packages"` + ExpireAt int64 `json:"expireAt"` } type OrderPackage struct { From 13d782d7955c41145963c7d497e8a44e1bd7ffa4 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 23 Dec 2022 15:29:27 +0800 Subject: [PATCH 12/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/channel/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supply/channel/order.go b/supply/channel/order.go index e07a39d..7efae3d 100644 --- a/supply/channel/order.go +++ b/supply/channel/order.go @@ -270,7 +270,7 @@ type OrderReceiver struct { } // Detail @Title 订单详情 -func (o *order) Detail(ctx context.Context, channelId string, orderSn string) (reply OrderItem, err error) { +func (o *order) Detail(ctx context.Context, channelId string, orderSn string) (reply ReplyOrderDetail, err error) { xClient, err := client.GetClient(o) if err != nil { return From 352ec9461d1f1be36453a4daba30598d04b4d2f5 Mon Sep 17 00:00:00 2001 From: sian Date: Sat, 24 Dec 2022 22:15:19 +0800 Subject: [PATCH 13/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/order.go | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/wholesale/order.go b/wholesale/order.go index 3ba69f9..a95d460 100644 --- a/wholesale/order.go +++ b/wholesale/order.go @@ -3,6 +3,7 @@ package wholesale import ( "context" "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" "github.com/shopspring/decimal" ) @@ -117,3 +118,45 @@ func (o *order) Finish(ctx context.Context, args ArgsOrderFinish) (err error) { err = xClient.Call(ctx, "Finish", args, &reply) return } + +type ArgsOrderLists struct { + Search OrderSearch + Page bean.Page +} + +type OrderSearch struct { + OrderSubSn string + Status uint + CancelStatus uint + CreatedStartDate string + CreatedEndDate string + PayStartDate string + PayEndDate string +} + +type ReplyOrderLists struct { + Lists []OrderItem + Total int64 +} + +type OrderItem struct { + OrderSubSn string + Status uint + CancelStatus uint + OrderFee decimal.Decimal + FreightFee decimal.Decimal + CreatedAt int64 + PayAt int64 + CloseAt int64 + FinishAt int64 +} + +// Lists @Title 订单列表 +func (o *order) Lists(ctx context.Context, args ArgsOrderLists) (reply ReplyOrderLists, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return ReplyOrderLists{}, err + } + err = xClient.Call(ctx, "Lists", args, &reply) + return +} From 1722e135100e57db5a0dda95ceb849ee54fc4dc5 Mon Sep 17 00:00:00 2001 From: sian Date: Sat, 24 Dec 2022 22:27:01 +0800 Subject: [PATCH 14/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wholesale/order.go b/wholesale/order.go index a95d460..f159b87 100644 --- a/wholesale/order.go +++ b/wholesale/order.go @@ -126,7 +126,7 @@ type ArgsOrderLists struct { type OrderSearch struct { OrderSubSn string - Status uint + Status []uint CancelStatus uint CreatedStartDate string CreatedEndDate string From b8f4236e46e6d958f621f6d1d93c095c6016b44f Mon Sep 17 00:00:00 2001 From: sian Date: Sun, 25 Dec 2022 13:59:11 +0800 Subject: [PATCH 15/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E2=80=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 11 +++++++ wholesale/order.go | 63 ++++++++++++++++++++++++++++++++------ 2 files changed, 65 insertions(+), 9 deletions(-) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index 03c9719..2323bee 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -186,3 +186,14 @@ func (o *order) SubDetail(ctx context.Context, channelId, orderSn string) (reply err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "SubDetail", orderSn, &reply) return } + +// Finish @Title 确认收货 +func (o *order) Finish(ctx context.Context, channelId, orderSn string) error { + xClient, err := client.GetClient(o) + if err != nil { + return err + } + reply := 0 + err = xClient.Call(context.WithValue(ctx, share.ReqMetaDataKey, map[string]string{"channelId": channelId}), "Finish", orderSn, &reply) + return err +} diff --git a/wholesale/order.go b/wholesale/order.go index f159b87..e5cb6b3 100644 --- a/wholesale/order.go +++ b/wholesale/order.go @@ -140,15 +140,17 @@ type ReplyOrderLists struct { } type OrderItem struct { - OrderSubSn string - Status uint - CancelStatus uint - OrderFee decimal.Decimal - FreightFee decimal.Decimal - CreatedAt int64 - PayAt int64 - CloseAt int64 - FinishAt int64 + Id uint + OrderSubSn string + SourceOrderSn string + Status uint + CancelStatus uint + OrderFee decimal.Decimal + FreightFee decimal.Decimal + CreatedAt int64 + PayAt int64 + CloseAt int64 + FinishAt int64 } // Lists @Title 订单列表 @@ -160,3 +162,46 @@ func (o *order) Lists(ctx context.Context, args ArgsOrderLists) (reply ReplyOrde err = xClient.Call(ctx, "Lists", args, &reply) return } + +type ReplyOrderInfo struct { + Id uint + Status uint + CancelStatus uint + OrderSunSu string + SourceOrderSn string + CreatedAt int64 + PayAt int64 + CloseAt int64 + FinishAt int64 + OrderFee decimal.Decimal + FreightFee decimal.Decimal + Skus []OrderSkuItem + Customer Customer + ReceiverName string + ReceiverMobile string + Address string +} + +type Customer struct { + Name string + Phone string + HopeStockOutAt int64 // 期望发货时间 +} + +type OrderSkuItem struct { + Img string + Name string + SkuId uint + Price decimal.Decimal + Quantity uint +} + +// Info @Title 订单列表 +func (o *order) Info(ctx context.Context, orderSubSn uint64) (reply ReplyOrderInfo, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return ReplyOrderInfo{}, err + } + err = xClient.Call(ctx, "Info", orderSubSn, &reply) + return +} From 5c66a9a8fffd9a77e5e0841da6cd7900d384e201 Mon Sep 17 00:00:00 2001 From: sian Date: Sun, 25 Dec 2022 15:59:42 +0800 Subject: [PATCH 16/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/order.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/wholesale/order.go b/wholesale/order.go index e5cb6b3..74fe0e7 100644 --- a/wholesale/order.go +++ b/wholesale/order.go @@ -49,6 +49,7 @@ type ArgsOrderFreightFee struct { type OrderFreightFee struct { SourceOrderSn string // 供应商订单号 FreightFee decimal.Decimal // 运费 + FreightFile string // 附件 } // FreightFee @Title 运费处理 @@ -176,18 +177,13 @@ type ReplyOrderInfo struct { OrderFee decimal.Decimal FreightFee decimal.Decimal Skus []OrderSkuItem - Customer Customer + HopeStockOutAt int64 + ChannelId uint ReceiverName string ReceiverMobile string Address string } -type Customer struct { - Name string - Phone string - HopeStockOutAt int64 // 期望发货时间 -} - type OrderSkuItem struct { Img string Name string From 027b334b8841c8c22fa6f205b915f13dcbf22822 Mon Sep 17 00:00:00 2001 From: sian Date: Sun, 25 Dec 2022 16:06:55 +0800 Subject: [PATCH 17/28] =?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/user.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/customer/user.go b/customer/user.go index 4bfdabc..f45d721 100644 --- a/customer/user.go +++ b/customer/user.go @@ -153,8 +153,9 @@ func (u *user) ServiceInfo(ctx context.Context, args ArgsUserServiceInfo) (reply } type UserInfoItem struct { - Id uint `json:"id"` - Name string `json:"name"` + Id uint `json:"id"` + Name string `json:"name"` + Phone string `json:"phone"` } // FindByIds @Title 根据用户Ids查询用户信息 From ee91c89efec24127535eb361c594a2212df34120 Mon Sep 17 00:00:00 2001 From: sian Date: Sun, 25 Dec 2022 16:34:08 +0800 Subject: [PATCH 18/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index 2323bee..16a32a0 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -137,6 +137,7 @@ type OrderItem struct { ReceiverMobile string `json:"receiverMobile"` Address string `json:"address"` OrderSubSn string `json:"orderSubSn"` + SourceOrderSn string `json:"sourceOrderSn"` FreightFee decimal.Decimal `json:"freightFee"` OrderFee decimal.Decimal `json:"orderFee"` Status uint `json:"status"` From ddcaccfbbb21959c703a8b7b1699d95249f3ecf4 Mon Sep 17 00:00:00 2001 From: sian Date: Sun, 25 Dec 2022 16:43:06 +0800 Subject: [PATCH 19/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index 16a32a0..fa0e5e3 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -138,6 +138,7 @@ type OrderItem struct { Address string `json:"address"` OrderSubSn string `json:"orderSubSn"` SourceOrderSn string `json:"sourceOrderSn"` + OrderSn string `json:"orderSn"` FreightFee decimal.Decimal `json:"freightFee"` OrderFee decimal.Decimal `json:"orderFee"` Status uint `json:"status"` From 730b57c72c2e332b74b3ecd4625ace98671263fd Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 26 Dec 2022 09:31:24 +0800 Subject: [PATCH 20/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/order.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wholesale/order.go b/wholesale/order.go index 74fe0e7..7bee8a3 100644 --- a/wholesale/order.go +++ b/wholesale/order.go @@ -185,11 +185,12 @@ type ReplyOrderInfo struct { } type OrderSkuItem struct { - Img string - Name string - SkuId uint - Price decimal.Decimal - Quantity uint + Img string + Name string + SkuId uint + Price decimal.Decimal + Quantity uint + PackageRate uint } // Info @Title 订单列表 From 55c64b85ca329cc3efa181bfb3c4e7faed1609a5 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 26 Dec 2022 10:58:04 +0800 Subject: [PATCH 21/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index fa0e5e3..04714e9 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -151,6 +151,7 @@ type OrderItem struct { Skus []OrderSku `json:"skus"` Packages []OrderPackage `json:"packages"` ExpireAt int64 `json:"expireAt"` + PackagesType uint `json:"packagesType"` } type OrderPackage struct { From 603012c49ac75eab549aa4c39fcdd0c8b8186803 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 26 Dec 2022 11:09:42 +0800 Subject: [PATCH 22/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 1 + wholesale/order.go | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index 04714e9..3d6a46b 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -156,6 +156,7 @@ type OrderItem struct { type OrderPackage struct { LogisticsName string `json:"logisticsName"` + LogisticsCode string `json:"logisticsCode"` WaybillCode string `json:"waybillCode"` } diff --git a/wholesale/order.go b/wholesale/order.go index 7bee8a3..adfa2c8 100644 --- a/wholesale/order.go +++ b/wholesale/order.go @@ -182,6 +182,8 @@ type ReplyOrderInfo struct { ReceiverName string ReceiverMobile string Address string + PackagesType uint + Packages []Packages } type OrderSkuItem struct { @@ -193,6 +195,13 @@ type OrderSkuItem struct { PackageRate uint } +type Packages struct { + Id uint + WaybillCode string + LogisticsName string + LogisticsCode string +} + // Info @Title 订单列表 func (o *order) Info(ctx context.Context, orderSubSn uint64) (reply ReplyOrderInfo, err error) { xClient, err := client.GetClient(o) From d9c21b7cbc6994d4bc38408a4f2cba63ec4c0ad9 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 26 Dec 2022 13:05:20 +0800 Subject: [PATCH 23/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/order.go | 1 + 1 file changed, 1 insertion(+) diff --git a/wholesale/order.go b/wholesale/order.go index adfa2c8..87ebacf 100644 --- a/wholesale/order.go +++ b/wholesale/order.go @@ -66,6 +66,7 @@ type ArgsOrderCancel struct { Source source // 商品来源 SourceOrderSn string // 供应商订单号 Status uint // 订单取消 + CancelFile string // 取消订单附件 } // Cancel @Title 订单取消 From 796a89af1efb7cdeed01d4af0c610b6fbd087445 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 26 Dec 2022 13:14:25 +0800 Subject: [PATCH 24/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/order.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wholesale/order.go b/wholesale/order.go index 87ebacf..4b16447 100644 --- a/wholesale/order.go +++ b/wholesale/order.go @@ -197,10 +197,11 @@ type OrderSkuItem struct { } type Packages struct { - Id uint - WaybillCode string - LogisticsName string - LogisticsCode string + Id uint + WaybillCode string + LogisticsName string + LogisticsCode string + LogisticsPhone string } // Info @Title 订单列表 From 9d2376ab7109de6f5dfa3167dfe491bfeea3c9ce Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 26 Dec 2022 13:29:36 +0800 Subject: [PATCH 25/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wholesale/order.go b/wholesale/order.go index 4b16447..f511bcd 100644 --- a/wholesale/order.go +++ b/wholesale/order.go @@ -45,11 +45,11 @@ func (o *order) Split(ctx context.Context, args ArgsOrderSplit) (err error) { type ArgsOrderFreightFee struct { Source source OrderFreightFees []OrderFreightFee + FreightFile string // 附件 } type OrderFreightFee struct { SourceOrderSn string // 供应商订单号 FreightFee decimal.Decimal // 运费 - FreightFile string // 附件 } // FreightFee @Title 运费处理 From 4cdcde203e580f6cc4458357008886b10aa25404 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 26 Dec 2022 13:46:59 +0800 Subject: [PATCH 26/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wholesale/channel/order.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wholesale/channel/order.go b/wholesale/channel/order.go index 3d6a46b..242a246 100644 --- a/wholesale/channel/order.go +++ b/wholesale/channel/order.go @@ -155,9 +155,10 @@ type OrderItem struct { } type OrderPackage struct { - LogisticsName string `json:"logisticsName"` - LogisticsCode string `json:"logisticsCode"` - WaybillCode string `json:"waybillCode"` + LogisticsName string `json:"logisticsName"` + LogisticsCode string `json:"logisticsCode"` + LogisticsPhone string `json:"logisticsPhone"` + WaybillCode string `json:"waybillCode"` } type OrderSku struct { From 51c533534fda894367470b67a38629d1025fe558 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 27 Dec 2022 10:31:47 +0800 Subject: [PATCH 27/28] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/supply/order.go b/supply/order.go index 0deaee1..4ba27a5 100644 --- a/supply/order.go +++ b/supply/order.go @@ -83,6 +83,27 @@ func (o *order) StockOut(ctx context.Context, args ArgsOrderStockOut) (err error return } +// +//type ArgsChangeWaybill struct { +// Id uint +// Source source // 商品来源 +// SourceOrderSn string +// WaybillCode string +// LogisticsName string +// LogisticsCode string +//} +// +//// ChangeWaybill @Title 修改运单信息 +//func (o *order) ChangeWaybill(ctx context.Context, args ArgsChangeWaybill) (err error) { +// xClient, err := client.GetClient(o) +// if err != nil { +// return +// } +// reply := 0 +// err = xClient.Call(ctx, "ChangeWaybill", args, &reply) +// return +//} + type ArgsOrderFinish struct { Source source // 商品来源 SourceOrderSn string // 供应商订单号 From 23935d7eb7d5119429f41354a3cbdcb97c916d01 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 27 Dec 2022 17:14:54 +0800 Subject: [PATCH 28/28] =?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/user.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/customer/user.go b/customer/user.go index f45d721..e43c20f 100644 --- a/customer/user.go +++ b/customer/user.go @@ -153,9 +153,10 @@ func (u *user) ServiceInfo(ctx context.Context, args ArgsUserServiceInfo) (reply } type UserInfoItem struct { - Id uint `json:"id"` - Name string `json:"name"` - Phone string `json:"phone"` + Id uint `json:"id"` + Name string `json:"name"` + Phone string `json:"phone"` + Liaison string `json:"liaison"` } // FindByIds @Title 根据用户Ids查询用户信息