Skip to content

Commit

Permalink
fix(dbm-services): 处理资源池rename的字段 TencentBlueKing#7287
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq authored and iSecloud committed Oct 11, 2024
1 parent 8287e5d commit e703777
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ func (m MachineResourceHandler) SpecSum(r *gin.Context) {
if input.ForbizId > 0 {
db.Where("dedicated_biz = ? ", input.ForbizId)
}
if cmutil.IsEmpty(input.ResourceType) {
db.Where("JSON_LENGTH(rs_types) <= 0")
} else {
db.Where("( ? or JSON_LENGTH(rs_types) <= 0 )", model.JSONQuery("rs_types").Contains([]string{input.ResourceType}))
if cmutil.IsNotEmpty(input.ResourceType) {
db.Where("rs_type = ? ", input.ResourceType)
}
s.MatchStorage(db)
s.MatchSpec(db)
Expand Down

0 comments on commit e703777

Please sign in to comment.