From ef961453c3bf5a591b3ffc5bc9a8816da3017e2b Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 14 Jun 2024 15:24:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supply/order.go | 11 +++++++++++ supply/source.go | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/supply/order.go b/supply/order.go index 490e24d..db128e6 100644 --- a/supply/order.go +++ b/supply/order.go @@ -4,6 +4,7 @@ import ( "context" "git.oa00.com/supply-chain/service/client" "git.oa00.com/supply-chain/service/lib/bean" + _interface "git.oa00.com/supply-chain/service/supply/interface" "github.com/shopspring/decimal" ) @@ -265,3 +266,13 @@ func (o *order) InfoByOrderId(ctx context.Context, orderId uint) (reply InfoByOr err = xClient.Call(ctx, "InfoByOrderId", orderId, &reply) return } + +// SubmitData @Title 订单下单数据 +func (o *order) SubmitData(ctx context.Context, orderId int64) (reply _interface.ReplySubmitData, err error) { + xClient, err := client.GetClient(o) + if err != nil { + return + } + err = xClient.Call(ctx, "SubmitData", orderId, &reply) + return +} diff --git a/supply/source.go b/supply/source.go index 00abed6..84c6b6d 100644 --- a/supply/source.go +++ b/supply/source.go @@ -28,3 +28,22 @@ func (s *sourceRpc) Select(ctx context.Context) (reply []SourceItem, err error) err = xClient.Call(ctx, "Select", args, &reply) return } + +type SourceInfo struct { + Id uint `json:"id"` + Name string `json:"name"` + Base string `json:"base"` + SkuName string `json:"skuName"` + OrderName string `json:"orderName"` + AfterService string `json:"afterService"` +} + +// Info @Title 获取供货商 +func (s *sourceRpc) Info(ctx context.Context, sourceId uint) (reply SourceInfo, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return + } + err = xClient.Call(ctx, "Info", sourceId, &reply) + return +}