使用action代替api单个操作

改写job
This commit is contained in:
linwenxiang committed 2020-08-29 22:22:52 +08:00
1 parent 78417c2d33
commit 562e61cf4f
15 files changed
+332 -6

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
package dto
type Pagination struct {
PageIndex int `form:"pageIndex"`
PageSize int `form:"pageSize"`
}
+22
View File
@@ -1,6 +1,7 @@
package dto
type SysJobSearch struct {
Pagination `search:"-"`
JobId int `form:"jobId" search:"type:exact;column:job_id;table:sys_job"`
JobName string `form:"jobName" search:"type:icontains;column:job_name;table:sys_job"`
JobGroup string `form:"jobGroup" search:"type:exact;column:job_group;table:sys_job"`
@@ -8,3 +9,24 @@ type SysJobSearch struct {
InvokeTarget string `form:"invokeTarget" search:"type:exact;column:invoke_target;table:sys_job"`
Status int `form:"status" search:"type:exact;column:status;table:sys_job"`
}
func (m *SysJobSearch) GetNeedSearch() interface{} {
return *m
}
func (m *SysJobSearch) Validate() error {
return nil
}
func (m *SysJobSearch) Generate() Dtor {
o := *m
return &o
}
func (m *SysJobSearch) GetPageIndex() int {
return m.PageIndex
}
func (m *SysJobSearch) GetPageSize() int {
return m.PageSize
}
+9
View File
@@ -0,0 +1,9 @@
package dto
type Dtor interface {
Validate() error
Generate() Dtor
GetPageIndex() int
GetPageSize() int
GetNeedSearch() interface{}
}