|
|
|
@@ -29,7 +29,9 @@ type TaskConfigWithLimit struct { |
|
|
|
AwardType string |
|
|
|
AwardAmount int64 |
|
|
|
Creator string |
|
|
|
IsDeleted bool |
|
|
|
CreatedUnix timeutil.TimeStamp |
|
|
|
DeleteAt timeutil.TimeStamp |
|
|
|
Limiters []*LimitConfigVO |
|
|
|
} |
|
|
|
type BatchLimitConfigVO struct { |
|
|
|
@@ -64,8 +66,11 @@ func GetTaskConfigList() ([]*TaskConfig, error) { |
|
|
|
return r, nil |
|
|
|
} |
|
|
|
func GetTaskConfigPageWithDeleted(opt ListOptions) ([]*TaskConfig, error) { |
|
|
|
if opt.Page <= 0 { |
|
|
|
opt.Page = 1 |
|
|
|
} |
|
|
|
r := make([]*TaskConfig, 0) |
|
|
|
err := x.Unscoped().Limit(opt.PageSize, (opt.Page-1)*opt.PageSize).OrderBy("deleted_at asc,id desc").Find(&r) |
|
|
|
err := x.Unscoped().Limit(opt.PageSize, (opt.Page-1)*opt.PageSize).OrderBy("deleted_at desc,id desc").Find(&r) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|
} |
|
|
|
|