新增游戏绑定方式,修改任务排行
This commit is contained in:
@ -80,7 +80,7 @@ func (s *sReward) Create(ctx context.Context, in *model.RewardCreateIn) (out *mo
|
||||
StoreId: in.StoreId,
|
||||
Value: in.Value,
|
||||
Status: in.Status,
|
||||
}).InsertAndGetId()
|
||||
}).OmitEmptyData().InsertAndGetId()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -88,7 +88,6 @@ func (s *sReward) Create(ctx context.Context, in *model.RewardCreateIn) (out *mo
|
||||
return &model.RewardCreateOut{Id: id}, nil
|
||||
}
|
||||
|
||||
// Update 更新奖励
|
||||
// Update 更新奖励
|
||||
func (s *sReward) Update(ctx context.Context, in *model.RewardUpdateIn) (out *model.RewardUpdateOut, err error) {
|
||||
// 查询原始记录,确保存在,并获取 source 与 store_id 用于权限校验
|
||||
@ -306,7 +305,7 @@ func (s *sReward) List(ctx context.Context, in *model.RewardListIn) (out *model.
|
||||
dao.Rewards.Table(), dao.Rewards.Columns().RewardTypeId,
|
||||
dao.RewardTypes.Table(), dao.RewardTypes.Columns().Id,
|
||||
),
|
||||
).Fields(fmt.Sprintf("%s.*, %s.%s %s", dao.Rewards.Table(), dao.RewardTypes.Table(), dao.RewardTypes.Columns().Name, "reward_type_name")).Scan(&list)
|
||||
).Fields(fmt.Sprintf("%s.*, %s.%s %s", dao.Rewards.Table(), dao.RewardTypes.Table(), dao.RewardTypes.Columns().Name, "reward_type_name")).OrderDesc(dao.Rewards.Columns().CreatedAt).Scan(&list)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user