修改action和模版,使用log打印日志,修复job删除问题,已经所有删除问题
This commit is contained in:
1 parent
f3e0e4dbc6
commit
8460b3f385
17 files changed
+319
-314
No files matched your search
+12
-11
@@ -1,14 +1,14 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type ObjectById struct {
|
||||
Id int `uri:"id" validate:"required"`
|
||||
Ids []json.Number `json:"ids"`
|
||||
Id int `uri:"id"`
|
||||
Ids []int `json:"ids"`
|
||||
}
|
||||
|
||||
func (s *ObjectById) Bind(ctx *gin.Context) error {
|
||||
@@ -26,13 +26,14 @@ func (s *ObjectById) Bind(ctx *gin.Context) error {
|
||||
|
||||
func (s *ObjectById) GetId() interface{} {
|
||||
if len(s.Ids) > 0 {
|
||||
ids := make([]int64, 0)
|
||||
var i int64
|
||||
for _, id := range s.Ids {
|
||||
i, _ = id.Int64()
|
||||
ids = append(ids, i)
|
||||
}
|
||||
return ids
|
||||
return s.Ids
|
||||
//ids := make([]int64, 0)
|
||||
//var i int64
|
||||
//for _, id := range s.Ids {
|
||||
// i, _ = id.Int64()
|
||||
// ids = append(ids, i)
|
||||
//}
|
||||
//return ids
|
||||
}
|
||||
return s.Id
|
||||
}
|
||||
Reference in new issue
Block a user