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
bcdd29f4
authored
Mar 15, 2023
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
售价系数判断问题
parent
77e2a838
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
service/service_activity.go
service/service_ly_common.go
service/service_activity.go
View file @
bcdd29f4
...
...
@@ -162,7 +162,6 @@ func (as *ActivityService) GetPriceActivity(checkData model.ActivityCheckData, a
}
}
}
else
{
fmt
.
Println
(
activity
)
//判断是否是搞活动的品牌
if
as
.
CheckStandardBrand
(
checkData
.
StandardBrandId
,
activity
)
{
hasActivity
=
true
...
...
service/service_ly_common.go
View file @
bcdd29f4
...
...
@@ -333,21 +333,28 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
}
//判断是否有符合的商品名称
goodsNames
:=
gjson
.
Get
(
priceRatioCache
,
"goods_name."
+
sortString
)
.
String
()
if
goodsNames
!=
""
{
goodsNameList
:=
strings
.
Split
(
goodsNames
,
"€"
)
//找到有对应的商品名称,那么优先级肯定是最高的了
if
php2go
.
InArray
(
sku
.
GoodsName
,
goodsNameList
)
{
break
}
}
//判断是否有符合的标准品牌ID
brandIds
:=
gjson
.
Get
(
priceRatioCache
,
"brand"
+
sortString
)
.
String
()
if
brandIds
!=
""
{
standardBrandIdList
:=
strings
.
Split
(
brandIds
,
"€"
)
standardBrandId
:=
strconv
.
Itoa
(
sku
.
StandardBrand
.
StandardBrandId
)
//找到有对应的品牌,那么优先级肯定是最高的了
if
php2go
.
InArray
(
standardBrandId
,
standardBrandIdList
)
{
break
}
}
//判断是否有符合的eccn
eccns
:=
gjson
.
Get
(
priceRatioCache
,
"eccn"
+
sortString
)
.
String
()
if
eccns
!=
""
{
eccnList
:=
strings
.
Split
(
eccns
,
"€"
)
//找到有对应的eccn,那么优先级肯定是最高的了
for
_
,
eccn
:=
range
eccnList
{
...
...
@@ -355,12 +362,11 @@ func (ls *LyService) GetCoefficientAndPrice(sku model.LySku) model.LySku {
break
}
}
}
//如果没有设置品牌和商品,那么这个优先级高的就会覆盖下面的了,不需要再去判断品牌和型号了
if
len
(
goodsNameList
)
==
0
&&
len
(
standardBrandIdList
)
==
0
&&
len
(
eccnList
)
==
0
{
break
}
}
}
sku
.
PriceRatio
=
priceRatioList
sku
.
PriceRatioSort
=
priceRatioSort
fmt
.
Println
(
"售价组系数 : "
,
priceRatioList
)
...
...
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