修改获取门店网费奖励信息列表

This commit is contained in:
chy
2025-07-05 17:08:58 +08:00
parent e71bbc6587
commit ffbc905ad9
2 changed files with 6 additions and 6 deletions

View File

@ -1226,7 +1226,7 @@ func (s *sReward) GetNetfeeList(ctx context.Context, in *model.NetfeeListIn) (ou
return nil, ecode.Fail.Sub("查询奖励类型id为空") return nil, ecode.Fail.Sub("查询奖励类型id为空")
} }
var data []model.NetfeeRewards var data model.NetfeeRewards
var total int var total int
m := dao.Rewards.Ctx(ctx) m := dao.Rewards.Ctx(ctx)
if in.StartTime != nil && in.EndTime != nil { if in.StartTime != nil && in.EndTime != nil {
@ -1238,7 +1238,7 @@ func (s *sReward) GetNetfeeList(ctx context.Context, in *model.NetfeeListIn) (ou
} }
return &model.NetfeeListOut{ return &model.NetfeeListOut{
List: data, List: data.NetfeeUserTaskRewards,
Total: total, Total: len(data.NetfeeUserTaskRewards),
}, nil }, nil
} }

View File

@ -36,9 +36,9 @@ type Reward struct {
type NetfeeRewards struct { type NetfeeRewards struct {
g.Meta `orm:"table:rewards"` g.Meta `orm:"table:rewards"`
Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID
RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID关联 reward_types 表"` // 奖励类型ID关联 reward_types 表 RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID关联 reward_types 表"` // 奖励类型ID关联 reward_types 表
NetfeeUserTaskRewards NetfeeUserTaskRewards `json:"netfeeUserTaskRewards,omitempty" orm:"with:reward_id=id"` NetfeeUserTaskRewards []NetfeeUserTaskRewards `json:"netfeeUserTaskRewards,omitempty" orm:"with:reward_id=id"`
} }
type NetfeeUserTaskRewards struct { type NetfeeUserTaskRewards struct {