dengbiao vor 3 Monaten
Ursprung
Commit
09c7e51371
2 geänderte Dateien mit 8 neuen und 8 gelöschten Zeilen
  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 Datei anzeigen

@@ -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 Datei anzeigen

@@ -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())


Laden…
Abbrechen
Speichern