diff --git a/app/services/cron_func_logs_service.go b/app/services/cron_func_logs_service.go index af7c045..23b4095 100644 --- a/app/services/cron_func_logs_service.go +++ b/app/services/cron_func_logs_service.go @@ -9,14 +9,14 @@ import ( func CronFuncLogsList(request *backend.CronFuncLogsListRequest, page int, limit int) (count int64, listInfo []cronfunclogsmodel.CronFuncLogs, err error) { conn := builder.NewCond() if request.CmdId != 0 { - conn = conn.And(builder.Eq{"CmdId": request.CmdId}) + conn = conn.And(builder.Eq{"cmd_id": request.CmdId}) } if request.Status != 0 { - conn = conn.And(builder.Eq{"Status": request.Status}) + conn = conn.And(builder.Eq{"status": request.Status}) } session := cronfunclogsmodel.GetInstance().GetDb().Where(conn) if page != 0 && limit != 0 { - session = session.OrderBy("create_time desc").Limit(limit, (page-1)*limit) + session = session.OrderBy("log_id desc").Limit(limit, (page-1)*limit) } count, err = session.FindAndCount(&listInfo) if err != nil {