From ddedf6096d5c8f385d224ce0e3b17c15885ab659 Mon Sep 17 00:00:00 2001 From: sian Date: Tue, 6 Dec 2022 13:50:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=80=80=E8=B4=A7=E5=9C=B0?= =?UTF-8?q?=E5=9D=80rpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/returnAddress.go | 30 ++++++++++++++++++++++++++++++ supplier/supplier.go | 1 + 2 files changed, 31 insertions(+) create mode 100644 supplier/returnAddress.go diff --git a/supplier/returnAddress.go b/supplier/returnAddress.go new file mode 100644 index 0000000..edc0f09 --- /dev/null +++ b/supplier/returnAddress.go @@ -0,0 +1,30 @@ +package supplier + +import ( + "git.oa00.com/supply-chain/service/client" + "golang.org/x/net/context" +) + +type returnAddress struct { +} + +type ReplyReturnAddressAll struct { + SupplierId uint `json:"supplierId"` + Item []ReturnAddressItem `json:"item"` +} + +type ReturnAddressItem struct { + Id uint `json:"id"` + Address string `json:"name"` +} + +// All @Title 全部退货地址 +func (r *returnAddress) All(ctx context.Context) (reply []ReplyReturnAddressAll, err error) { + xClient, err := client.GetClient(r) + if err != nil { + return nil, err + } + args := 0 + err = xClient.Call(ctx, "All", args, &reply) + return +} diff --git a/supplier/supplier.go b/supplier/supplier.go index 76a8c7e..28ed1c9 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -14,6 +14,7 @@ type Supplier struct { WarnLiaison warnLiaison WalletApply supplierWalletApply LogisticsCompany logisticsCompany + ReturnAddress returnAddress } type supplier struct {