标准品牌

parent 658ba30e
Showing with 6 additions and 0 deletions
...@@ -176,6 +176,7 @@ func (qs *OptimumService) GetOptimumAttr(ctx *gin.Context) (results model.LyResp ...@@ -176,6 +176,7 @@ func (qs *OptimumService) GetOptimumAttr(ctx *gin.Context) (results model.LyResp
*/ */
func (qs *OptimumService) GetOptimumAttrInfo(ctx *gin.Context) (results model.LyResponse) { 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 { if gconv.Int64(ctx.Request.FormValue("page"))*gconv.Int64(ctx.Request.FormValue("page_size")) > 10000 {
results.ErrorCode = 0 results.ErrorCode = 0
...@@ -262,6 +263,11 @@ func (qs *OptimumService) GetOptimumAttrInfo(ctx *gin.Context) (results model.Ly ...@@ -262,6 +263,11 @@ 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())
v.StockStr = common.NumberToHtml(v.Stock) v.StockStr = common.NumberToHtml(v.Stock)
v.MoqStr = common.NumberToHtml(v.Moq) v.MoqStr = common.NumberToHtml(v.Moq)
v.MpqStr = common.NumberToHtml(v.Mpq) v.MpqStr = common.NumberToHtml(v.Mpq)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment