Commit 0116ced2 by mushishixian
parents ad1d9bf1 0e8e50ed
...@@ -12,7 +12,7 @@ func GetMouserData(c *gin.Context) { ...@@ -12,7 +12,7 @@ func GetMouserData(c *gin.Context) {
goodsName, _ := c.GetPostForm("goods_name") goodsName, _ := c.GetPostForm("goods_name")
lycon := new(ly.CommonLyService) lycon := new(ly.CommonLyService)
//调外链拿数据 //调外链拿数据
apiData := ly.OutLink(&goodsName,"1") apiData := ly.OutLinkMouser(&goodsName,"1")
//供应商详情 //供应商详情
supplierInfo := model.SUPPLIER_REDIS_INFO_{ supplierInfo := model.SUPPLIER_REDIS_INFO_{
SupplierId:14, SupplierId:14,
......
...@@ -65,7 +65,7 @@ func QuoteIndex(c *gin.Context) { ...@@ -65,7 +65,7 @@ func QuoteIndex(c *gin.Context) {
} }
func mouserOrg(keyword, suppliedId string) (result map[string]interface{}, err error) { func mouserOrg(keyword, suppliedId string) (result map[string]interface{}, err error) {
mouserRes := ly.OutLink(&keyword, "1") mouserRes := ly.OutLinkMouser(&keyword, "1")
redisCon := gredis.Conn("search_r") redisCon := gredis.Conn("search_r")
defer redisCon.Close() defer redisCon.Close()
skuMouser := make(map[string]string) skuMouser := make(map[string]string)
......
...@@ -12,7 +12,7 @@ import ( ...@@ -12,7 +12,7 @@ import (
const Mouser_api_url string = "https://api.mouser.com/api/v1/search/partnumber?apiKey=0a11fa6f-ddcb-4ddf-9947-e42b2f3b4723" const Mouser_api_url string = "https://api.mouser.com/api/v1/search/partnumber?apiKey=0a11fa6f-ddcb-4ddf-9947-e42b2f3b4723"
//mouser请求外链 //mouser请求外链
func OutLink(goodsName *string,flag string) map[string]*model.LyClearGoodsList { func OutLinkMouser(goodsName *string,flag string) map[string]*model.LyClearGoodsList {
var result string; var result string;
if flag == "-1" { //调试 if flag == "-1" { //调试
......
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