修改action和模版,使用log打印日志,修复job删除问题,已经所有删除问题
This commit is contained in:
1 parent
f3e0e4dbc6
commit
8460b3f385
17 files changed
+319
-314
No files matched your search
@@ -5,7 +5,8 @@ import (
|
||||
|
||||
"go-admin/app/admin/models"
|
||||
"go-admin/common/dto"
|
||||
models2 "go-admin/common/models"
|
||||
"go-admin/common/log"
|
||||
common "go-admin/common/models"
|
||||
)
|
||||
|
||||
type SysJobSearch struct {
|
||||
@@ -23,7 +24,11 @@ func (m *SysJobSearch) GetNeedSearch() interface{} {
|
||||
}
|
||||
|
||||
func (m *SysJobSearch) Bind(ctx *gin.Context) error {
|
||||
return ctx.Bind(m)
|
||||
err := ctx.Bind(m)
|
||||
if err != nil {
|
||||
log.Errorf("MsgID[%s] Bind error: %#v", err)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *SysJobSearch) Generate() dto.Index {
|
||||
@@ -31,14 +36,6 @@ func (m *SysJobSearch) Generate() dto.Index {
|
||||
return &o
|
||||
}
|
||||
|
||||
func (m *SysJobSearch) GetPageIndex() int {
|
||||
return m.PageIndex
|
||||
}
|
||||
|
||||
func (m *SysJobSearch) GetPageSize() int {
|
||||
return m.PageSize
|
||||
}
|
||||
|
||||
type SysJobControl struct {
|
||||
JobId int `json:"jobId"`
|
||||
JobName string `json:"jobName" validate:"required"` // 名称
|
||||
@@ -62,7 +59,7 @@ func (s *SysJobControl) Generate() dto.Control {
|
||||
return &cp
|
||||
}
|
||||
|
||||
func (s *SysJobControl) GenerateM() (models2.ActiveRecord, error) {
|
||||
func (s *SysJobControl) GenerateM() (common.ActiveRecord, error) {
|
||||
return &models.SysJob{
|
||||
JobId: s.JobId,
|
||||
JobName: s.JobName,
|
||||
@@ -91,6 +88,6 @@ func (s *SysJobById) Generate() dto.Control {
|
||||
return &cp
|
||||
}
|
||||
|
||||
func (s *SysJobById) GenerateM() (models2.ActiveRecord, error) {
|
||||
func (s *SysJobById) GenerateM() (common.ActiveRecord, error) {
|
||||
return &models.SysJob{}, nil
|
||||
}
|
||||
Reference in new issue
Block a user