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
f39b5e7f
authored
Dec 16, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'ysx-sku服务-20201215'
parents
48312c60
4f24663d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
service/service_ly.go
service/service_ly_common.go
service/service_ly.go
View file @
f39b5e7f
...
@@ -60,7 +60,6 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
...
@@ -60,7 +60,6 @@ func (ls *LyService) LyGoodsDetail(ctx *gin.Context, goodsIds []string, ch chan
sku
:=
model
.
InitSkuData
(
skuStr
)
sku
:=
model
.
InitSkuData
(
skuStr
)
sku
.
GoodsId
=
goodsId
sku
.
GoodsId
=
goodsId
spu
:=
spuList
[
sku
.
SpuId
]
spu
:=
spuList
[
sku
.
SpuId
]
sku
.
Content
=
spu
//读取包装字段的缓存
//读取包装字段的缓存
if
sku
.
SupplierId
==
7
{
if
sku
.
SupplierId
==
7
{
//sku_raw_map哪里写入(成意写的)
//sku_raw_map哪里写入(成意写的)
...
...
service/service_ly_common.go
View file @
f39b5e7f
...
@@ -393,20 +393,15 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) {
...
@@ -393,20 +393,15 @@ func (ls *LyService) GetIsBuy(sku model.LySku) (isBuy int) {
//合并spu的信息
//合并spu的信息
func
(
ls
*
LyService
)
CombineSup
(
sku
model
.
LySku
,
spuStr
string
)
model
.
LySku
{
func
(
ls
*
LyService
)
CombineSup
(
sku
model
.
LySku
,
spuStr
string
)
model
.
LySku
{
var
spu
model
.
Spu
sku
.
UpdateTime
=
gjson
.
Get
(
spuStr
,
"update_time"
)
.
Int
()
err
:=
json
.
Unmarshal
([]
byte
(
spuStr
),
&
spu
)
sku
.
ClassID1
=
int
(
gjson
.
Get
(
spuStr
,
"class_id1"
)
.
Int
())
if
err
!=
nil
{
sku
.
ClassID2
=
int
(
gjson
.
Get
(
spuStr
,
"class_id2"
)
.
Int
())
return
sku
sku
.
SpuName
=
gjson
.
Get
(
spuStr
,
"spu_name"
)
.
String
()
}
sku
.
SpuBrief
=
gjson
.
Get
(
spuStr
,
"spu_brief"
)
.
String
()
sku
.
UpdateTime
=
spu
.
UpdateTime
sku
.
SpuDetail
=
gjson
.
Get
(
spuStr
,
"spu_detail"
)
.
String
()
sku
.
ClassID1
=
spu
.
ClassID1
sku
.
Status
=
int
(
gjson
.
Get
(
spuStr
,
"status"
)
.
Int
())
sku
.
ClassID2
=
spu
.
ClassID2
sku
.
Encap
=
gjson
.
Get
(
spuStr
,
"encap"
)
.
String
()
sku
.
SpuName
=
spu
.
SpuName
sku
.
Content
=
gjson
.
Get
(
spuStr
,
"spu_name"
)
.
String
()
sku
.
SpuBrief
=
spu
.
SpuBrief
sku
.
SpuDetail
=
spu
.
SpuDetail
sku
.
Status
=
spu
.
Status
sku
.
Encap
=
spu
.
Encap
sku
.
Content
=
spuStr
return
sku
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