From 07139c3ecf5fe3b139ed89f98dd11f9e2712ce7e Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 28 Sep 2022 16:07:44 +0800 Subject: [PATCH 1/5] =?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 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/customer/user.go b/customer/user.go index c319df4..432b23e 100644 --- a/customer/user.go +++ b/customer/user.go @@ -150,3 +150,18 @@ func (u *user) ServiceInfo(ctx context.Context, args ArgsUserServiceInfo) (reply err = xClient.Call(ctx, "ServiceInfo", args, &reply) return } + +type UserInfoItem struct { + Id uint `json:"id"` + Name string `json:"name"` +} + +// FindByIds @Title 根据用户Ids查询用户信息 +func (u *user) FindByIds(ctx context.Context, userIds []uint) (reply []UserInfoItem, err error) { + xClient, err := client.GetClient(u) + if err != nil { + return + } + err = xClient.Call(ctx, "FindByIds", userIds, &reply) + return +} From 74831e49b18b912c6144c21685bc9d8a4568dbf6 Mon Sep 17 00:00:00 2001 From: sian Date: Wed, 28 Sep 2022 17:01:12 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8rpc=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/supply/order.go b/supply/order.go index ce5585e..03716a6 100644 --- a/supply/order.go +++ b/supply/order.go @@ -3,6 +3,7 @@ package supply import ( "context" "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" "github.com/shopspring/decimal" ) @@ -97,3 +98,50 @@ func (o *order) Finish(ctx context.Context, args ArgsOrderFinish) (err error) { err = xClient.Call(ctx, "Finish", args, &reply) return } + +type ArgsRetailOrderLists struct { + Search RetailOrderSearch + Page bean.Page +} + +type RetailOrderSearch struct { + OrderSubSn uint64 `label:"订单号"` + SupplierId uint `label:"供应商"` + CustomerId uint `label:"客户"` + WaybillCode string `label:"运单号"` + Status uint `label:"订单状态"` + PayStartDate string `label:"支付开始日期"` + PayEndDate string `label:"支付结束日期"` + FinishStartDate string `label:"完成开始日期"` + FinishEndDate string `label:"完成结束日期"` +} + +type RetailOrderItem struct { + Id uint `json:"id"` + OrderSubSn uint64 `json:"orderSubSn"` + SourceName string `json:"sourceName"` + CustomerName string `json:"customerName"` + OrderStatus uint `json:"orderStatus"` + LogisticsName string `json:"logisticsName"` + WaybillCode string `json:"waybillCode"` + OrderFee decimal.Decimal `json:"orderFee"` + FreightFee decimal.Decimal `json:"freightFee"` + SupplyOrderFee decimal.Decimal `json:"supplyOrderFee"` + PayTime int64 `json:"payTime"` + FinishAt int64 `json:"finishAt"` +} + +type ReplyRetailOrderLists struct { + Lists []RetailOrderItem `json:"lists"` + Total int64 `json:"total"` +} + +// Lists @Title 订单列表 +func (o *order) Lists(ctx context.Context, args ArgsRetailOrderLists) (reply ReplyRetailOrderLists, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + err = xClient.Call(ctx, "Lists", args, &reply) + return +} From f29fd4cfe59308d9ee8ae0783b8cd6a33b0a55f1 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 29 Sep 2022 09:19:17 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E6=BA=90=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/source.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/supply/source.go b/supply/source.go index 96cdc58..0f2ea0f 100644 --- a/supply/source.go +++ b/supply/source.go @@ -1,5 +1,10 @@ package supply +import ( + "context" + "git.oa00.com/supply-chain/service/client" +) + type Source struct { Id uint `gorm:"primaryKey"` Name string // 供货商名称 @@ -7,3 +12,19 @@ type Source struct { SkuName string // sku名称 OrderName string // order名称 } + +type SourceItem struct { + Id uint `json:"id"` + Name string `json:"name"` +} + +// Select @Title 订单列表 +func (s *Source) Select(ctx context.Context) (reply []SourceItem, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + args := 0 + err = xClient.Call(ctx, "Select", args, &reply) + return +} From 84bf68949f411e3ea9f928125bf085f7bb9747f6 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 29 Sep 2022 09:24:39 +0800 Subject: [PATCH 4/5] =?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/supply.go | 1 + 1 file changed, 1 insertion(+) diff --git a/supply/supply.go b/supply/supply.go index 542bcd3..7e24cfb 100644 --- a/supply/supply.go +++ b/supply/supply.go @@ -13,4 +13,5 @@ type Supply struct { Channel channel.Channel Setting setting.Setting Order order + Source Source } From d1f8877bd9959437e9202d2499131ddce3db20dc Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 29 Sep 2022 09:35:57 +0800 Subject: [PATCH 5/5] =?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/source.go | 4 ++-- supply/supply.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/supply/source.go b/supply/source.go index 0f2ea0f..00abed6 100644 --- a/supply/source.go +++ b/supply/source.go @@ -5,7 +5,7 @@ import ( "git.oa00.com/supply-chain/service/client" ) -type Source struct { +type sourceRpc struct { Id uint `gorm:"primaryKey"` Name string // 供货商名称 Base string // rpc服务基础名称 @@ -19,7 +19,7 @@ type SourceItem struct { } // Select @Title 订单列表 -func (s *Source) Select(ctx context.Context) (reply []SourceItem, err error) { +func (s *sourceRpc) Select(ctx context.Context) (reply []SourceItem, err error) { xClient, err := client.GetClient(s) if err != nil { return diff --git a/supply/supply.go b/supply/supply.go index 7e24cfb..94da827 100644 --- a/supply/supply.go +++ b/supply/supply.go @@ -13,5 +13,5 @@ type Supply struct { Channel channel.Channel Setting setting.Setting Order order - Source Source + Source sourceRpc }