数据源

This commit is contained in:
XM-GO
2023-04-25 17:20:27 +08:00
parent 5dfa341083
commit 3da0dc3936
20 changed files with 1244 additions and 47 deletions

View File

@@ -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
}