diff --git a/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go b/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go index c4d2e29..5227d31 100644 --- a/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go +++ b/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go @@ -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()) diff --git a/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go b/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go index 08076cf..7d49790 100644 --- a/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go +++ b/app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go @@ -624,9 +624,9 @@ func SelfSupportForSchoolClassList(c *gin.Context) { } type SelfSupportForSchoolClassSortArgs 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 SelfSupportForSchoolClassSort(c *gin.Context) { @@ -643,7 +643,7 @@ func SelfSupportForSchoolClassSort(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())