mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
【fix】更换用户组织查询失败问题
This commit is contained in:
@@ -85,9 +85,6 @@ func (m *deviceModelImpl) FindListPage(page, pageSize int, data entity.Device) (
|
||||
if data.Name != "" {
|
||||
db = db.Where("name like ?", "%"+data.Name+"%")
|
||||
}
|
||||
if data.Owner != "" {
|
||||
db = db.Where("owner = ?", data.Owner)
|
||||
}
|
||||
if data.Status != "" {
|
||||
db = db.Where("status = ?", data.Status)
|
||||
}
|
||||
@@ -122,9 +119,6 @@ func (m *deviceModelImpl) FindList(data entity.Device) *[]entity.DeviceRes {
|
||||
if data.Name != "" {
|
||||
db = db.Where("name like ?", "%"+data.Name+"%")
|
||||
}
|
||||
if data.Owner != "" {
|
||||
db = db.Where("owner = ?", data.Owner)
|
||||
}
|
||||
if data.DeviceType != "" {
|
||||
db = db.Where("device_type = ?", data.DeviceType)
|
||||
}
|
||||
|
||||
@@ -65,9 +65,6 @@ func (m *productModelImpl) FindListPage(page, pageSize int, data entity.Product)
|
||||
if data.ProductCategoryId != "" {
|
||||
db = db.Where("product_category_id = ?", data.ProductCategoryId)
|
||||
}
|
||||
if data.Owner != "" {
|
||||
db = db.Where("owner = ?", data.Owner)
|
||||
}
|
||||
if data.ProtocolName != "" {
|
||||
db = db.Where("protocol_name like ?", "%"+data.ProtocolName+"%")
|
||||
}
|
||||
@@ -96,9 +93,6 @@ func (m *productModelImpl) FindList(data entity.Product) *[]entity.ProductRes {
|
||||
if data.ProductCategoryId != "" {
|
||||
db = db.Where("product_category_id = ?", data.ProductCategoryId)
|
||||
}
|
||||
if data.Owner != "" {
|
||||
db = db.Where("owner = ?", data.Owner)
|
||||
}
|
||||
if data.ProtocolName != "" {
|
||||
db = db.Where("protocol_name like ?", "%"+data.ProtocolName+"%")
|
||||
}
|
||||
|
||||
@@ -70,9 +70,6 @@ func (m *ruleChainModelImpl) FindListPage(page, pageSize int, data entity.RuleCh
|
||||
offset := pageSize * (page - 1)
|
||||
db := global.Db.Table(m.table)
|
||||
// 此处填写 where参数判断
|
||||
if data.Owner != "" {
|
||||
db = db.Where("owner = ?", data.Owner)
|
||||
}
|
||||
if data.RuleName != "" {
|
||||
db = db.Where("rule_name like ?", "%"+data.RuleName+"%")
|
||||
}
|
||||
@@ -91,9 +88,6 @@ func (m *ruleChainModelImpl) FindList(data entity.RuleChain) *[]entity.RuleChain
|
||||
list := make([]entity.RuleChain, 0)
|
||||
db := global.Db.Table(m.table)
|
||||
// 此处填写 where参数判断
|
||||
if data.Owner != "" {
|
||||
db = db.Where("owner = ?", data.Owner)
|
||||
}
|
||||
if data.RuleName != "" {
|
||||
db = db.Where("rule_name like ?", "%"+data.RuleName+"%")
|
||||
}
|
||||
@@ -110,9 +104,6 @@ func (m *ruleChainModelImpl) FindListBaseLabel(data entity.RuleChain) *[]entity.
|
||||
list := make([]entity.RuleChainBaseLabel, 0)
|
||||
db := global.Db.Table(m.table)
|
||||
// 此处填写 where参数判断
|
||||
if data.Owner != "" {
|
||||
db = db.Where("owner = ?", data.Owner)
|
||||
}
|
||||
if data.RuleName != "" {
|
||||
db = db.Where("rule_name like ?", "%"+data.RuleName+"%")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user