|
@@ -46,10 +46,10 @@ func (service *ResourceManageService) FindAccountBalance(in *resourcesCenter.Res
|
|
|
var err error
|
|
|
if producMap[in.ResourceType] != nil {
|
|
|
err = orm.Table("account_resources").Select("ANY_VALUE(id) as id,ANY_VALUE(name) as name,resourceType,ANY_VALUE(spec)").
|
|
|
- Where("accountId = ? and endTime =? and vipTime>?", in.AccountId, endTime, time.Now().Unix()).GroupBy("resourceType").Find(&accountBalanceArr)
|
|
|
+ Where("accountId = ? and endTime =? and vipTime>? and resourceType=? ", in.AccountId, endTime, time.Now().Unix(), in.ResourceType).GroupBy("resourceType").Find(&accountBalanceArr)
|
|
|
} else {
|
|
|
err = orm.Table("account_resources").Select("ANY_VALUE(id) as id,ANY_VALUE(name) as name,resourceType,ANY_VALUE(spec)").
|
|
|
- Where("accountId = ? and endTime >= ?", in.AccountId, now).GroupBy("resourceType").Find(&accountBalanceArr)
|
|
|
+ Where("accountId = ? and endTime >= ? and resourceType like ?", in.AccountId, now, "%字段包%").GroupBy("resourceType").Find(&accountBalanceArr)
|
|
|
}
|
|
|
|
|
|
if err != nil {
|