refactor🎨 : 修改文件操作函数

This commit is contained in:
zhangwenjian committed 2020-12-21 22:02:40 +08:00
1 parent 37a2c585e1
commit 746123c888
12 files changed
+128 -169

No files matched your search

+5 -5
View File
@@ -8,12 +8,12 @@ import (
)
type GeneralDelDto struct {
Id uint `uri:"id" json:"id" validate:"required"`
Ids []uint `json:"ids"`
Id int `uri:"id" json:"id" validate:"required"`
Ids []int `json:"ids"`
}
func (g GeneralDelDto) GetIds() []uint {
ids := make([]uint, 0)
func (g GeneralDelDto) GetIds() []int {
ids := make([]int, 0)
if g.Id != 0 {
ids = append(ids, g.Id)
}
@@ -36,7 +36,7 @@ func (g GeneralDelDto) GetIds() []uint {
}
type GeneralGetDto struct {
Id uint `uri:"id" json:"id" validate:"required"`
Id int `uri:"id" json:"id" validate:"required"`
}
func MakeCondition(q interface{}) func(db *gorm.DB) *gorm.DB {