Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
go_sku_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
59aa7627
authored
Sep 08, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
自营活动判断问题
parent
56c2b210
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
service/service_activity.go
service/service_activity.go
View file @
59aa7627
...
...
@@ -163,12 +163,23 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a
}
else
if
checkData
.
SupplierId
==
10000
{
//自营活动特殊判断
//判断活动指定的渠道编码,品牌,分类id,如果都为空,那么这个活动可以理解为整个供应商了,上面的排除已经会提前去判断了
if
activity
.
StandardBrandIds
==
""
&&
activity
.
ClassIds
==
""
{
hasActivity
=
true
goto
INFO
//fmt.Println(activity.ClassIds)
//fmt.Println(activity.UseType)
if
activity
.
ClassIds
!=
""
{
if
!
as
.
CheckClass
(
checkData
.
ClassId
,
activity
)
{
continue
}
}
if
as
.
CheckClass
(
checkData
.
ClassId
,
activity
)
{
if
activity
.
UseType
==
2
{
//判断商品名称是否在redis
redisKey
:=
"lie_activity_and_coupon_sku_"
+
strconv
.
Itoa
(
activity
.
ActivityId
)
exists
,
_
:=
redis
.
Bool
(
redisConn
.
Do
(
"hexists"
,
redisKey
,
checkData
.
GoodsName
))
if
exists
{
hasActivity
=
true
goto
INFO
}
}
else
{
//不等于2都是根据品牌来,因为老数据以前也只有品牌,0和1都是品牌
//品牌不为空,还要去判断品牌,是同时满足的关系
if
activity
.
StandardBrandIds
!=
""
{
//判断是否是搞活动的品牌
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment