Commit 17642664 by mushishixian

活动判断优化

parent 8d333109
Showing with 8 additions and 3 deletions
...@@ -3,13 +3,14 @@ package service ...@@ -3,13 +3,14 @@ package service
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/gogf/gf/util/gconv"
"github.com/gomodule/redigo/redis"
"github.com/syyongx/php2go"
"go_sku_server/model" "go_sku_server/model"
"go_sku_server/pkg/gredis" "go_sku_server/pkg/gredis"
"strings" "strings"
"time" "time"
"github.com/gogf/gf/util/gconv"
"github.com/gomodule/redigo/redis"
"github.com/syyongx/php2go"
) )
type ActivityService struct { type ActivityService struct {
...@@ -154,6 +155,10 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a ...@@ -154,6 +155,10 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a
} }
} }
} else if checkData.SupplierId == 10000 { } else if checkData.SupplierId == 10000 {
//判断活动指定的渠道编码,品牌,分类id,如果都为空,那么这个活动可以理解为整个供应商了,上面的排除已经会提前去判断了
if len(activity.BrandIdList) == 0 && len(activity.ClassIdList) == 0 {
goto INFO
}
if as.CheckClass(checkData.ClassId, activity) { if as.CheckClass(checkData.ClassId, activity) {
//品牌不为空,还要去判断品牌,是同时满足的关系 //品牌不为空,还要去判断品牌,是同时满足的关系
if activity.BrandIds != "" { if activity.BrandIds != "" {
......
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