This commit is contained in:
守护自己的云 2024-09-23 15:37:04 +08:00
parent ec7a10f0db
commit d19900584b
2 changed files with 13 additions and 3 deletions

View File

@ -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"`

View File

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