Commit 2e8f77e7 by mushishixian

排除品牌方法

parent 260a37e3
Showing with 27 additions and 0 deletions
package model
import (
"search_server/pkg/config"
)
//获取需要排除的品牌id
//branType = 1 : 联营 2 : 自营
func GetExcludeBrandIds(brandType int) (excludeBrandIds []int) {
isNoTi := config.Get("brand.is_not_ti").String()
//如果关闭,直接返回空数据
if isNoTi == "1" {
return
}
//返回联营的brand_id切片
if brandType == 1 {
tiLyBrandIds := config.Get("brand.ti_ly_brand_ids").Ints(",")
excludeBrandIds = tiLyBrandIds
//获取的是字符串
return
}
//返回自营的ti的brand_id切片
tiZyBrandId := config.Get("brand.ti_zy_brand_ids").Ints(",")
excludeBrandIds = tiZyBrandId
return
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment