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) }