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
f300aca5
authored
Dec 16, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
debug
parent
c00ac46b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
96 additions
and
100 deletions
pkg/common/function.go
service/service_ly.go
service/service_ly_common.go
pkg/common/function.go
View file @
f300aca5
This diff is collapsed.
Click to expand it.
service/service_ly.go
View file @
f300aca5
...
...
@@ -60,6 +60,7 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
sku
:=
model
.
InitSkuData
(
skuStr
)
sku
.
GoodsId
=
goodsId
spu
:=
spuList
[
sku
.
SpuId
]
sku
.
Content
=
spu
//读取包装字段的缓存
if
sku
.
SupplierId
==
7
{
//sku_raw_map哪里写入(成意写的)
...
...
@@ -201,8 +202,6 @@ func (ls *LyService) getSpuList(skuArr map[string]string) (spuList map[string]st
spuId
:=
gjson
.
Get
(
skuStr
,
"spu_id"
)
.
String
()
spuIds
=
append
(
spuIds
,
spuId
)
}
redisConn
:=
gredis
.
Conn
(
"default_r"
)
defer
redisConn
.
Close
()
//批量获取spu详情
spuList
=
gredis
.
Hmget
(
"default_r"
,
"spu"
,
spuIds
)
return
...
...
service/service_ly_common.go
View file @
f300aca5
...
...
@@ -406,6 +406,7 @@ func (ls *LyService) CombineSup(sku model.LySku, spuStr string) model.LySku {
sku
.
SpuDetail
=
spu
.
SpuDetail
sku
.
Status
=
spu
.
Status
sku
.
Encap
=
spu
.
Encap
sku
.
Content
=
spuStr
return
sku
}
...
...
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