From d19900584b8aae9b208bf16bc308b39296c58fec Mon Sep 17 00:00:00 2001 From: kanade Date: Mon, 23 Sep 2024 15:37:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E7=BD=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp/shipment/customsCost.go | 1 + erp/shipment/gift.go | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/erp/shipment/customsCost.go b/erp/shipment/customsCost.go index 9f94bb4..7650367 100644 --- a/erp/shipment/customsCost.go +++ b/erp/shipment/customsCost.go @@ -13,6 +13,7 @@ type customsCost struct { type CustomsCostItem struct { Id int64 `json:"id"` Name string `json:"name"` + Type int64 `json:"type"` Amount decimal.Decimal `json:"amount"` Remarks string `json:"remarks"` CreatedAt *time.Time `json:"createdAt"` diff --git a/erp/shipment/gift.go b/erp/shipment/gift.go index c9c1829..b315a6b 100644 --- a/erp/shipment/gift.go +++ b/erp/shipment/gift.go @@ -83,13 +83,17 @@ func (g *gift) Add(ctx context.Context, args ArgsGiftAdd) (err error) { return xClient.Call(ctx, "Add", args, &reply) } +type ArgsGiftEdit struct { + ShipmentId int64 // 订舱单ID + Gifts []GiftEdit +} type GiftEdit struct { GiftId int64 // 费用ID GiftAdd } // Edit @TITLE 编辑赠品 -func (g *gift) Edit(ctx context.Context, args []GiftEdit) (err error) { +func (g *gift) Edit(ctx context.Context, args ArgsGiftEdit) (err error) { xClient, err := client.GetClient(g) if err != nil { return @@ -98,12 +102,17 @@ func (g *gift) Edit(ctx context.Context, args []GiftEdit) (err error) { return xClient.Call(ctx, "Edit", args, &reply) } +type ArgsGiftDelete struct { + ShipmentId int64 // 订舱单ID + GiftIds []int64 // 赠品id +} + // Delete @TITLE 删除赠品 -func (g *gift) Delete(ctx context.Context, giftIds []int64) (err error) { +func (g *gift) Delete(ctx context.Context, args ArgsGiftDelete) (err error) { xClient, err := client.GetClient(g) if err != nil { return } reply := 0 - return xClient.Call(ctx, "Delete", giftIds, &reply) + return xClient.Call(ctx, "Delete", args, &reply) }