test
This commit is contained in:
1 parent
677cdb7821
commit
bc648c3f2f
60 files changed
+2319
-550
No files matched your search
@@ -27,13 +27,6 @@ func (s *ObjectById) Bind(ctx *gin.Context) error {
|
||||
func (s *ObjectById) GetId() interface{} {
|
||||
if len(s.Ids) > 0 {
|
||||
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
|
||||
}
|
||||
@@ -8,12 +8,12 @@ import (
|
||||
)
|
||||
|
||||
type GeneralDelDto struct {
|
||||
Id int `uri:"id" json:"id" validate:"required"`
|
||||
Ids []int `json:"ids"`
|
||||
Id uint `uri:"id" json:"id" validate:"required"`
|
||||
Ids []uint `json:"ids"`
|
||||
}
|
||||
|
||||
func (g GeneralDelDto) GetIds() []int {
|
||||
ids := make([]int, 0)
|
||||
func (g GeneralDelDto) GetIds() []uint {
|
||||
ids := make([]uint, 0)
|
||||
if g.Id != 0 {
|
||||
ids = append(ids, g.Id)
|
||||
}
|
||||
@@ -36,7 +36,7 @@ func (g GeneralDelDto) GetIds() []int {
|
||||
}
|
||||
|
||||
type GeneralGetDto struct {
|
||||
Id int `uri:"id" json:"id" validate:"required"`
|
||||
Id uint `uri:"id" json:"id" validate:"required"`
|
||||
}
|
||||
|
||||
func MakeCondition(q interface{}) func(db *gorm.DB) *gorm.DB {
|
||||
|
||||
Reference in new issue
Block a user