From f29fd4cfe59308d9ee8ae0783b8cd6a33b0a55f1 Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 29 Sep 2022 09:19:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=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 +}