Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
search_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
b2f147a5
authored
Feb 02, 2023
by
SUDPTDUBLXEROFX\Administrator
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
标准品牌
parent
c6b75300
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
model/goods.go
service/goods_service.go
service/optimum_service.go
model/goods.go
View file @
b2f147a5
...
...
@@ -14,6 +14,7 @@ type ApiGoods struct {
Mpq
int
`json:"-"`
MpqStr
interface
{}
`json:"mpq"`
Mpl
int
`json:"-"`
StandardBrand
string
`json:"standard_brand"`
StandardBrandName
string
`json:"standard_brand_name"`
StandardBrandUrl
string
`json:"standard_brand_url"`
MplStr
interface
{}
`json:"mpl,omitempty"`
...
...
service/goods_service.go
View file @
b2f147a5
...
...
@@ -115,6 +115,7 @@ func CurlGoodsInfo(ctx *gin.Context, goodsIdsStr string, params req.Param) (good
goods
.
GoodsUnit
=
data
.
Get
(
"goods_unit"
)
.
String
()
goods
.
GoodsImages
=
data
.
Get
(
"goods_images"
)
.
String
()
goods
.
GoodsBrief
=
data
.
Get
(
"goods_brief"
)
.
String
()
goods
.
StandardBrand
=
data
.
Get
(
"standard_brand"
)
.
String
()
goods
.
Mpl
=
int
(
data
.
Get
(
"mpl"
)
.
Int
())
goods
.
MplStr
=
int
(
data
.
Get
(
"mpl"
)
.
Int
())
goods
.
Status
=
int
(
data
.
Get
(
"status"
)
.
Int
())
...
...
service/optimum_service.go
View file @
b2f147a5
...
...
@@ -176,7 +176,6 @@ func (qs *OptimumService) GetOptimumAttr(ctx *gin.Context) (results model.LyResp
*/
func
(
qs
*
OptimumService
)
GetOptimumAttrInfo
(
ctx
*
gin
.
Context
)
(
results
model
.
LyResponse
)
{
redisConn
:=
gredis
.
Conn
(
"search_r"
)
//修复分页数据
if
gconv
.
Int64
(
ctx
.
Request
.
FormValue
(
"page"
))
*
gconv
.
Int64
(
ctx
.
Request
.
FormValue
(
"page_size"
))
>
10000
{
results
.
ErrorCode
=
0
...
...
@@ -264,9 +263,9 @@ func (qs *OptimumService) GetOptimumAttrInfo(ctx *gin.Context) (results model.Ly
}
//todo 标准品牌
brand_name_json
,
_
:=
redis
.
String
(
redisConn
.
Do
(
"Hget"
,
"standard_brand"
,
v
.
BrandId
)
)
v
.
BrandName
=
gjson
.
Get
(
brand_name_json
,
"brand_name"
)
.
String
()
v
.
BrandId
=
gconv
.
Int
(
gjson
.
Get
(
brand_name_json
,
"brand_id"
)
.
String
())
//fmt.Print(v.StandardBrand
)
v
.
BrandName
=
gjson
.
Get
(
v
.
StandardBrand
,
"brand_name"
)
.
String
()
v
.
BrandId
=
gconv
.
Int
(
gjson
.
Get
(
v
.
StandardBrand
,
"brand_id"
)
.
String
())
v
.
StockStr
=
common
.
NumberToHtml
(
v
.
Stock
)
v
.
MoqStr
=
common
.
NumberToHtml
(
v
.
Moq
)
...
...
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