Commit 2e4c79f2 by mushishixian

Merge branch 'ysx-魔方活动判断优化-20220808' into dev

parents b95c98e1 b6fc36a2
......@@ -155,8 +155,12 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a
}
}
} else if checkData.SupplierId == 10000 {
//自营活动特殊判断
//判断活动指定的渠道编码,品牌,分类id,如果都为空,那么这个活动可以理解为整个供应商了,上面的排除已经会提前去判断了
if len(activity.BrandIdList) == 0 && len(activity.ClassIdList) == 0 {
fmt.Println(activity.BrandIds)
fmt.Println(activity.ClassIds)
if activity.BrandIds == "" && activity.ClassIds == "" {
hasActivity = true
goto INFO
}
if as.CheckClass(checkData.ClassId, activity) {
......
package service
import (
"go_sku_server/model"
"go_sku_server/pkg/common"
"github.com/gin-gonic/gin"
"github.com/gomodule/redigo/redis"
"github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"go_sku_server/model"
"go_sku_server/pkg/common"
)
//自营公共函数类
......@@ -52,6 +53,7 @@ func (qs *ZiyingService) GetActivity(skuInfo string) (priceActivity model.PriceA
checkData := model.ActivityCheckData{
SupplierId: 10000,
BrandId: int(gjson.Get(skuInfo, "brand_id").Int()),
GoodsId: gjson.Get(skuInfo, "goods_id").String(),
ClassId: int(gjson.Get(skuInfo, "class_id2").Int()),
}
var activityService ActivityService
......
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