This commit is contained in:
2024-10-11 11:12:44 +08:00
parent 8219a1dd58
commit 8343d54dba
8 changed files with 132 additions and 56 deletions

View File

@@ -10,6 +10,11 @@ import (
type gift struct {
}
type ArgsGiftSearch struct {
ShipmentId int64 // 出舱单
ShipmentGiftIds []int64 // 出舱单赠品id
}
type GiftItem struct {
Id int64 `json:"id"`
Name string `json:"name"`
@@ -32,16 +37,18 @@ type GiftItem struct {
SealNumber string `json:"sealNumber"`
Remark string `json:"remark"`
Sort int64 `json:"sort"`
IsSerial int64 `json:"isSerial"`
IsCustoms int64 `json:"isCustoms"`
CreatedAt *time.Time `json:"createdAt"`
}
// All @TITLE 全部赠品
func (g *gift) All(ctx context.Context, shipmentId int64) (reply []GiftItem, err error) {
func (g *gift) All(ctx context.Context, args ArgsGiftSearch) (reply []GiftItem, err error) {
xClient, err := client.GetClient(g)
if err != nil {
return
}
err = xClient.Call(ctx, "All", shipmentId, &reply)
err = xClient.Call(ctx, "All", args, &reply)
return
}