db 数据库列表
This commit is contained in:
parent
77b7c9c207
commit
7d4cdbcf3d
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue