Merge remote-tracking branch 'origin/main' into main

This commit is contained in:
renzhiyuan 2024-11-29 20:49:44 +08:00
commit e10a82e1a7
1 changed files with 6 additions and 3 deletions

View File

@ -16,13 +16,16 @@ import (
func DbList(request *backend.DbListRequest, page int, limit int) (count int64, DbListInfo []crondbmodel.CronDb, err error) { func DbList(request *backend.DbListRequest, page int, limit int) (count int64, DbListInfo []crondbmodel.CronDb, err error) {
conn := builder.NewCond() conn := builder.NewCond()
if request.DbName != "" { if request.DbName != "" {
conn = conn.And(builder.Like{"DbName", request.DbName}) conn = conn.And(builder.Like{"db_name", request.DbName})
} }
if request.DbType != "" { 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 { 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) session := crondbmodel.GetInstance().GetDb().Where(conn)
if page != 0 && limit != 0 { if page != 0 && limit != 0 {