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
404a6d24
authored
Sep 10, 2024
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
英文pdf
parent
5985620d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
1 deletions
model/ly_sku.go
service/service_ly.go
model/ly_sku.go
View file @
404a6d24
...
...
@@ -150,6 +150,7 @@ type SpuExtra struct {
}
`bson:"image_list" json:"image_list"`
SpuDetail
string
`bson:"spu_detail" json:"spu_detail"`
SpuId
string
`bson:"spu_id" json:"spu_id"`
EnPdfUrl
string
`bson:"en_pdf_url" json:"en_pdf_url"`
}
// 为什么不直接映射到结构,而要用gjson,因为redis存的数据结构不一定正常,可能类型不一致
...
...
service/service_ly.go
View file @
404a6d24
...
...
@@ -285,7 +285,6 @@ func (ls *LyService) GetSpuExtra(spuId string) (spuExtra model.SpuExtra) {
defer
func
()
{
mongodb
.
Close
()
}()
err
:=
mongodb
.
DB
(
"ichunt"
)
.
C
(
"spu_extra"
)
.
Find
(
bson
.
M
{
"spu_id"
:
spuId
})
.
One
(
&
spuExtra
)
if
err
!=
nil
&&
err
!=
mgo
.
ErrNotFound
{
logger
.
Select
(
"sku_query"
)
.
Error
(
err
.
Error
())
...
...
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