diff --git a/app/services/db_service/db_service.go b/app/services/db_service/db_service.go index b4e4b09..38862fd 100644 --- a/app/services/db_service/db_service.go +++ b/app/services/db_service/db_service.go @@ -16,13 +16,16 @@ import ( func DbList(request *backend.DbListRequest, page int, limit int) (count int64, DbListInfo []crondbmodel.CronDb, err error) { conn := builder.NewCond() if request.DbName != "" { - conn = conn.And(builder.Like{"DbName", request.DbName}) + conn = conn.And(builder.Like{"db_name", request.DbName}) } if request.DbType != "" { - conn = conn.And(builder.Like{"DbType", request.DbType}) + conn = conn.And(builder.Like{"db_type", request.DbType}) + } + if request.DbPermission != 0 { + conn = conn.And(builder.Eq{"db_permission": request.DbPermission}) } if request.Status != 0 { - conn = conn.And(builder.Eq{"Status": request.Status}) + conn = conn.And(builder.Eq{"status": request.Status}) } session := crondbmodel.GetInstance().GetDb().Where(conn) if page != 0 && limit != 0 {