|
@@ -30,7 +30,7 @@ func GetSecTaskById(ctx context.Context, secTaskId string) (*gorm_model.Younggee
|
|
|
return &secTaskInfo, nil
|
|
|
}
|
|
|
|
|
|
-func GetSecTaskList(ctx context.Context, selectionId string, taskStatus int, searchValue string, saleNumMin int, saleNumMax int, pageSize, pageNum int64, orderBy []string, orderDesc []int) ([]*http_model.SecTaskInfo, int64, error) {
|
|
|
+func GetSecTaskList(ctx context.Context, selectionId string, taskStatus int, searchValue string, saleNumMin int, saleNumMax int, pageSize, pageNum int64, orderBy []string, orderDesc []string) ([]*http_model.SecTaskInfo, int64, error) {
|
|
|
db := GetReadDB(ctx)
|
|
|
// var taskStages []int
|
|
|
var freeStages []int
|
|
@@ -85,7 +85,7 @@ func GetSecTaskList(ctx context.Context, selectionId string, taskStatus int, sea
|
|
|
if len(orderBy) > 0 && len(orderDesc) > 0 && len(orderBy) == len(orderDesc) {
|
|
|
for i := 0; i < len(orderBy); i++ {
|
|
|
orderField := orderBy[i]
|
|
|
- isDesc := orderDesc[i] == 1 // 1=降序,其他值=升序
|
|
|
+ isDesc := orderDesc[i] == "desc" // 1=降序,其他值=升序
|
|
|
|
|
|
switch orderField {
|
|
|
case "sale_num":
|
|
@@ -124,9 +124,9 @@ func GetSecTaskList(ctx context.Context, selectionId string, taskStatus int, sea
|
|
|
return nil, 0, err
|
|
|
}
|
|
|
|
|
|
- fmt.Printf("secTaskInfoList:%+v", secTaskInfoList)
|
|
|
+ // fmt.Printf("secTaskInfoList:%+v", secTaskInfoList)
|
|
|
newSecTaskInfoList := pack.GormSecTaskListToHttpSecTaskList(secTaskInfoList)
|
|
|
- fmt.Printf("newSecTaskInfoList:%+v", newSecTaskInfoList)
|
|
|
+ // fmt.Printf("newSecTaskInfoList:%+v", newSecTaskInfoList)
|
|
|
|
|
|
//for i, secTask := range newSecTaskInfoList {
|
|
|
// if secTask.RegionCode != 0 {
|