diff --git a/internal/logic/admin/lottery/lottery.go b/internal/logic/admin/lottery/lottery.go index db24309..3413605 100644 --- a/internal/logic/admin/lottery/lottery.go +++ b/internal/logic/admin/lottery/lottery.go @@ -518,6 +518,9 @@ func (l *UpdateLotteryPrizeLogic) UpdateLotteryPrize(req *types.UpdateAdminLotte if req.Slot != nil { fields["slot"] = *req.Slot } + if req.Type != "" { + fields["type"] = req.Type + } if req.Name != "" { fields["name"] = req.Name } diff --git a/internal/types/lottery.go b/internal/types/lottery.go index bfec706..2ea88b6 100644 --- a/internal/types/lottery.go +++ b/internal/types/lottery.go @@ -266,6 +266,7 @@ type CreateAdminLotteryPrizeRequest struct { type UpdateAdminLotteryPrizeRequest struct { Id int64 `path:"id" json:"-" validate:"required"` Slot *int `json:"slot,omitempty"` + Type string `json:"type,omitempty"` Name string `json:"name,omitempty"` IconUrl string `json:"icon_url,omitempty"` Config json.RawMessage `json:"config,omitempty"`