Commit a3284d42 by mushishixian

debug

parent 9539e110
Showing with 4 additions and 4 deletions
......@@ -45,16 +45,12 @@ func (ls *LyService) GetActivityPrice(sku model.LySku, suffix string, power Powe
//获取redis里面存储的活动相关信息
brandIdArray := gjson.Get(activityInfo, "brand_id").Array()
contentSlice = append(contentSlice, brandIdArray)
sku.Content = contentSlice
var brandIds []string
for _, brandId := range brandIdArray {
if brandId.String() != "" {
brandIds = append(brandIds, brandId.String())
}
}
contentSlice = append(contentSlice, brandIds)
sku.Content = contentSlice
goodsNameArray := gjson.Get(activityInfo, "goods_name").Array()
var goodsNames []string
for _, goodsName := range goodsNameArray {
......@@ -118,10 +114,14 @@ func (ls *LyService) GetActivityPrice(sku model.LySku, suffix string, power Powe
//除了新客价和折扣价,剩下的价格活动
if len(brandIds) > 0 {
if !php2go.InArray(sku.BrandId, brandIds) {
contentSlice = append(contentSlice, "活动状态错误")
sku.Content = contentSlice
hasActivity = false
}
}
if activityCanal != "" && sku.GoodsType == 2 {
contentSlice = append(contentSlice, "活动状态错误2")
sku.Content = contentSlice
canalArr := gjson.Parse(activityCanal).Array()
var canals []string
for _, canal := range canalArr {
......
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