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
a3284d42
authored
Dec 09, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
debug
parent
9539e110
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
service/service_price.go
service/service_price.go
View file @
a3284d42
...
@@ -45,16 +45,12 @@ func (ls *LyService) GetActivityPrice(sku model.LySku, suffix string, power Powe
...
@@ -45,16 +45,12 @@ func (ls *LyService) GetActivityPrice(sku model.LySku, suffix string, power Powe
//获取redis里面存储的活动相关信息
//获取redis里面存储的活动相关信息
brandIdArray
:=
gjson
.
Get
(
activityInfo
,
"brand_id"
)
.
Array
()
brandIdArray
:=
gjson
.
Get
(
activityInfo
,
"brand_id"
)
.
Array
()
contentSlice
=
append
(
contentSlice
,
brandIdArray
)
sku
.
Content
=
contentSlice
var
brandIds
[]
string
var
brandIds
[]
string
for
_
,
brandId
:=
range
brandIdArray
{
for
_
,
brandId
:=
range
brandIdArray
{
if
brandId
.
String
()
!=
""
{
if
brandId
.
String
()
!=
""
{
brandIds
=
append
(
brandIds
,
brandId
.
String
())
brandIds
=
append
(
brandIds
,
brandId
.
String
())
}
}
}
}
contentSlice
=
append
(
contentSlice
,
brandIds
)
sku
.
Content
=
contentSlice
goodsNameArray
:=
gjson
.
Get
(
activityInfo
,
"goods_name"
)
.
Array
()
goodsNameArray
:=
gjson
.
Get
(
activityInfo
,
"goods_name"
)
.
Array
()
var
goodsNames
[]
string
var
goodsNames
[]
string
for
_
,
goodsName
:=
range
goodsNameArray
{
for
_
,
goodsName
:=
range
goodsNameArray
{
...
@@ -118,10 +114,14 @@ func (ls *LyService) GetActivityPrice(sku model.LySku, suffix string, power Powe
...
@@ -118,10 +114,14 @@ func (ls *LyService) GetActivityPrice(sku model.LySku, suffix string, power Powe
//除了新客价和折扣价,剩下的价格活动
//除了新客价和折扣价,剩下的价格活动
if
len
(
brandIds
)
>
0
{
if
len
(
brandIds
)
>
0
{
if
!
php2go
.
InArray
(
sku
.
BrandId
,
brandIds
)
{
if
!
php2go
.
InArray
(
sku
.
BrandId
,
brandIds
)
{
contentSlice
=
append
(
contentSlice
,
"活动状态错误"
)
sku
.
Content
=
contentSlice
hasActivity
=
false
hasActivity
=
false
}
}
}
}
if
activityCanal
!=
""
&&
sku
.
GoodsType
==
2
{
if
activityCanal
!=
""
&&
sku
.
GoodsType
==
2
{
contentSlice
=
append
(
contentSlice
,
"活动状态错误2"
)
sku
.
Content
=
contentSlice
canalArr
:=
gjson
.
Parse
(
activityCanal
)
.
Array
()
canalArr
:=
gjson
.
Parse
(
activityCanal
)
.
Array
()
var
canals
[]
string
var
canals
[]
string
for
_
,
canal
:=
range
canalArr
{
for
_
,
canal
:=
range
canalArr
{
...
...
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