dengbiao пре 3 месеци
родитељ
комит
09c7e51371
2 измењених фајлова са 8 додато и 8 уклоњено
  1. +4
    -4
      app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go
  2. +4
    -4
      app/admin/hdl/enterprise_manage/hdl_self_support_for_school.go

+ 4
- 4
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())


+ 4
- 4
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())


Loading…
Откажи
Сачувај