perf: filter by condition

This commit is contained in:
zchengo
2023-02-03 19:55:45 +08:00
parent 20dd98ec35
commit 54c3653197
7 changed files with 321 additions and 121 deletions
+1
View File
@@ -52,6 +52,7 @@ type ContractQueryParam struct {
Id int64 `form:"id" binding:"omitempty,gt=0"`
Pids []int64 `form:"pids" json:"pids" binding:"-"`
Name string `form:"name" binding:"-"`
Status int `form:"status" binding:"omitempty,oneof=1 2"`
Creator int64 `form:"creator,omitempty" binding:"-"`
Page Page
}
+8 -5
View File
@@ -58,11 +58,14 @@ type CustomerDeleteParam struct {
}
type CustomerQueryParam struct {
Id int64 `form:"id" binding:"omitempty,gt=0"`
Name string `form:"name" binding:"-"`
Phone string `form:"phone" binding:"omitempty,len=11"`
Creator int64 `form:"creator,omitempty" binding:"-"`
Page Page
Id int64 `form:"id" binding:"omitempty,gt=0"`
Name string `form:"name" binding:"omitempty,gt=0"`
Source string `form:"source" binding:"omitempty,gt=0"`
Industry string `form:"industry" binding:"omitempty,gt=0"`
Level string `form:"level" binding:"omitempty,gt=0"`
Status int `form:"status" binding:"omitempty,oneof=1 2"`
Creator int64 `form:"creator,omitempty" binding:"-"`
Page Page
}
type CustomerList struct {