Skip to content

Commit

Permalink
222
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq committed Sep 29, 2024
1 parent 42323a3 commit 713f37c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,7 @@ func (c *MachineResourceGetterInputParam) queryBs(db *gorm.DB) (err error) {
if len(c.SubZoneIds) > 0 {
db.Where(" sub_zone_id in (?) ", c.SubZoneIds)
}

if c.ForBiz > 0 {
// 如果参数[0],表示选择没有任何业务标签的资源
db.Where("dedicated_biz = ?", c.ForBiz)
}
db.Where("dedicated_biz = ?", c.ForBiz)
if cmutil.IsNotEmpty(c.OsType) {
db.Where("os_type = ?", c.OsType)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ func (r ResourDistributionParam) dbFilter(db *gorm.DB) (err error) {
if len(r.SubZoneIds) > 0 {
db.Where("sub_zone_id in (?)", r.SubZoneIds)
}
if lo.IsNotEmpty(r.ForBiz) {
db.Where("dedicated_biz = ? ", r.ForBiz)
}
db.Where("dedicated_biz = ? ", r.ForBiz)
if lo.IsNotEmpty(r.SpecParam.DbType) {
db.Where("rs_type = ?", r.SpecParam.DbType)
}
Expand Down

0 comments on commit 713f37c

Please sign in to comment.