feat:update search

This commit is contained in:
zhangwenjian committed 2020-08-28 00:52:16 +08:00
1 parent 1dffcb7199
commit 87edf1099c
6 files changed
+28 -48

No files matched your search

-26
View File
@@ -78,35 +78,9 @@ func (e *SysJob) Get() (SysJob, error) {
func (e *SysJob) GetPage(pageSize int, pageIndex int, v interface{}) ([]SysJob, int, error) {
var doc []SysJob
//table := orm.Eloquent.Select("*").Table(e.TableName())
table := orm.Eloquent.Table(e.TableName())
table = tools.SetQuery(table, v)
//if e.JobId != 0 {
// table = table.Where("job_id = ?", e.JobId)
//}
//
//if e.JobName != "" {
// table = table.Where("job_name like ?", "%"+e.JobName+"%")
//}
//
//if e.JobGroup != "" {
// table = table.Where("job_group = ?", e.JobGroup)
//}
//
//if e.CronExpression != "" {
// table = table.Where("cron_expression = ?", e.CronExpression)
//}
//
//if e.InvokeTarget != "" {
// table = table.Where("invoke_target = ?", e.InvokeTarget)
//}
//
//if e.Status != 0 {
// table = table.Where("status = ?", e.Status)
//}
// 数据权限控制(如果不需要数据权限请将此处去掉)
dataPermission := new(DataPermission)
dataPermission.UserId, _ = tools.StringToInt(e.DataScope)