Commit 0b90376f by mushishixian

temp

parent 46efb559
...@@ -3,7 +3,6 @@ package main ...@@ -3,7 +3,6 @@ package main
import ( import (
"flag" "flag"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
logger "github.com/ichunt2019/log"
"github.com/micro/go-micro/v2/web" "github.com/micro/go-micro/v2/web"
"go_sku_server/boot" "go_sku_server/boot"
"go_sku_server/pkg/config" "go_sku_server/pkg/config"
......
...@@ -13,7 +13,7 @@ import ( ...@@ -13,7 +13,7 @@ import (
"time" "time"
) )
const goods_slice_count = 10 //每多少个型号id开启一个协程 const goodsSliceCount = 10 //每多少个型号id开启一个协程
/* /*
查询商品详情(自营或者联营) 查询商品详情(自营或者联营)
...@@ -34,7 +34,6 @@ const goods_slice_count = 10 //每多少个型号id开启一个协程 ...@@ -34,7 +34,6 @@ const goods_slice_count = 10 //每多少个型号id开启一个协程
func CommonController(ctx *gin.Context) map[string]interface{} { func CommonController(ctx *gin.Context) map[string]interface{} {
common.PrintDebugHeader(ctx) //开启debug调试 common.PrintDebugHeader(ctx) //开启debug调试
zyService := service.ZiyingService{} //实例化自营查询 zyService := service.ZiyingService{} //实例化自营查询
lyService := service.LyService{} //实例化自营查询 lyService := service.LyService{} //实例化自营查询
var goodsIdArr []string var goodsIdArr []string
...@@ -64,7 +63,7 @@ func CommonController(ctx *gin.Context) map[string]interface{} { ...@@ -64,7 +63,7 @@ func CommonController(ctx *gin.Context) map[string]interface{} {
} }
if len(goodsId) < 19 { //自营 if len(goodsId) < 19 { //自营
zyGoodsId = append(zyGoodsId, goodsId) zyGoodsId = append(zyGoodsId, goodsId)
if len(zyGoodsId) >= goods_slice_count { if len(zyGoodsId) >= goodsSliceCount {
common.PrintDebugHtml(ctx, "zy增加协程1001:") common.PrintDebugHtml(ctx, "zy增加协程1001:")
common.PrintDebugHtml(ctx, zyGoodsId) common.PrintDebugHtml(ctx, zyGoodsId)
//wg.Add(1) //协程计数一 //wg.Add(1) //协程计数一
...@@ -74,7 +73,7 @@ func CommonController(ctx *gin.Context) map[string]interface{} { ...@@ -74,7 +73,7 @@ func CommonController(ctx *gin.Context) map[string]interface{} {
} }
} else { //联营 } else { //联营
lyGoodsId = append(lyGoodsId, goodsId) lyGoodsId = append(lyGoodsId, goodsId)
if len(lyGoodsId) >= goods_slice_count { if len(lyGoodsId) >= goodsSliceCount {
common.PrintDebugHtml(ctx, "ly增加协程1002:") common.PrintDebugHtml(ctx, "ly增加协程1002:")
common.PrintDebugHtml(ctx, lyGoodsId) common.PrintDebugHtml(ctx, lyGoodsId)
//wg.Add(1) //wg.Add(1)
......
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/gogf/gf/util/gconv" "github.com/gogf/gf/util/gconv"
"github.com/gomodule/redigo/redis" "github.com/gomodule/redigo/redis"
logger "github.com/ichunt2019/log"
"github.com/syyongx/php2go" "github.com/syyongx/php2go"
"github.com/tidwall/gjson" "github.com/tidwall/gjson"
"go_sku_server/model" "go_sku_server/model"
......
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