|
|
@@ -1762,9 +1762,9 @@ func CentralKitchenForSchoolClassList(c *gin.Context) { |
|
|
|
} |
|
|
|
|
|
|
|
type CentralKitchenForSchoolClassSortArgs struct { |
|
|
|
Ids []string `json:"ids" binding:"required"` |
|
|
|
Page int `json:"page" binding:"required"` |
|
|
|
Limit int `json:"limit" binding:"required"` |
|
|
|
Ids []int `json:"ids" binding:"required"` |
|
|
|
Page int `json:"page" binding:"required"` |
|
|
|
Limit int `json:"limit" binding:"required"` |
|
|
|
} |
|
|
|
|
|
|
|
func CentralKitchenForSchoolClassSort(c *gin.Context) { |
|
|
@@ -1781,7 +1781,7 @@ func CentralKitchenForSchoolClassSort(c *gin.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
for k, v := range *class { |
|
|
|
v.Sort = (ClassSortArgs.Page-1)*ClassSortArgs.Limit + k |
|
|
|
v.Sort = (ClassSortArgs.Page-1)*ClassSortArgs.Limit + (1000 - k) |
|
|
|
_, err1 := classDb.ClassUpdate(&v, "sort") |
|
|
|
if err1 != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err1.Error()) |
|
|
|