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
53346117
authored
Jun 22, 2022
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
切换获取分类到新版分类
parent
6616cd53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
service/service_ly_common.go
service/service_ly_common.go
View file @
53346117
...
...
@@ -2,17 +2,18 @@ package service
import
(
"encoding/json"
"github.com/gomodule/redigo/redis"
_
"github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
"go_sku_server/model"
"go_sku_server/pkg/common"
"go_sku_server/pkg/gredis"
"go_sku_server/pkg/logger"
_
"go_sku_server/pkg/mongo"
_
"gopkg.in/mgo.v2/bson"
"strings"
"github.com/gomodule/redigo/redis"
_
"github.com/iancoleman/orderedmap"
"github.com/syyongx/php2go"
"github.com/tidwall/gjson"
_
"gopkg.in/mgo.v2/bson"
)
//获取图片信息
...
...
@@ -79,20 +80,21 @@ func (ls *LyService) GetPoolSupplierName(supplierId int64) (supplierName string)
func
(
ls
*
LyService
)
GetCacheClass
(
classId
int64
)
string
{
redisCon
:=
gredis
.
Conn
(
"default_r"
)
defer
redisCon
.
Close
()
className
,
_
:=
redis
.
String
(
redisCon
.
Do
(
"HGET"
,
"class"
,
classId
))
classStr
,
_
:=
redis
.
String
(
redisCon
.
Do
(
"HGET"
,
"pool_class_info"
,
classId
))
className
:=
gjson
.
Get
(
classStr
,
"class_name"
)
.
String
()
return
className
}
type
SpuAttr
struct
{
SpuId
string
`bson:"spu_id"`
SpuId
string
`bson:"spu_id"`
AttrsExtend
[]
AttrsExtend
`bson:"attrs_extend"`
Attrs
string
`bson:"attrs"`
Attrs
string
`bson:"attrs"`
}
type
AttrsExtend
struct
{
AttrName
string
`bson:"attr_name" json:"attr_name"`
AttrName
string
`bson:"attr_name" json:"attr_name"`
AttrValue
string
`bson:"attr_value" json:"attr_value"`
AttrUnit
string
`bson:"attr_unit" json:"attr_unit,omitempty"`
AttrUnit
string
`bson:"attr_unit" json:"attr_unit,omitempty"`
}
//H获取供应链标准品牌
...
...
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