mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-26 05:18:34 +08:00
数据源
This commit is contained in:
@@ -55,9 +55,6 @@ func (m *datasourceModelImpl) FindListPage(page, pageSize int, data entity.Visua
|
||||
db = db.Where("source_id = ?", data.SourceId)
|
||||
}
|
||||
db.Where("delete_time IS NULL")
|
||||
if data.SourceComment != "" {
|
||||
db = db.Where("source_comment = ?", data.SourceComment)
|
||||
}
|
||||
if data.SourceType != "" {
|
||||
db = db.Where("source_type = ?", data.SourceType)
|
||||
}
|
||||
@@ -67,9 +64,6 @@ func (m *datasourceModelImpl) FindListPage(page, pageSize int, data entity.Visua
|
||||
if data.Status != "" {
|
||||
db = db.Where("status = ?", data.Status)
|
||||
}
|
||||
if data.Configuration != "" {
|
||||
db = db.Where("configuration = ?", data.Configuration)
|
||||
}
|
||||
err := db.Count(&total).Error
|
||||
err = db.Order("create_time").Limit(pageSize).Offset(offset).Find(&list).Error
|
||||
biz.ErrIsNil(err, "查询数据源分页列表失败")
|
||||
@@ -84,9 +78,6 @@ func (m *datasourceModelImpl) FindList(data entity.VisualDataSource) *[]entity.V
|
||||
db = db.Where("source_id = ?", data.SourceId)
|
||||
}
|
||||
db.Where("delete_time IS NULL")
|
||||
if data.SourceComment != "" {
|
||||
db = db.Where("source_comment = ?", data.SourceComment)
|
||||
}
|
||||
if data.SourceType != "" {
|
||||
db = db.Where("source_type = ?", data.SourceType)
|
||||
}
|
||||
@@ -96,9 +87,6 @@ func (m *datasourceModelImpl) FindList(data entity.VisualDataSource) *[]entity.V
|
||||
if data.Status != "" {
|
||||
db = db.Where("status = ?", data.Status)
|
||||
}
|
||||
if data.Configuration != "" {
|
||||
db = db.Where("configuration = ?", data.Configuration)
|
||||
}
|
||||
biz.ErrIsNil(db.Order("create_time").Find(&list).Error, "查询数据源列表失败")
|
||||
return &list
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user