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
0116ced2
authored
Jul 21, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'dev' of
ssh://119.23.72.7:22611/mushishixian/search_server
into dev
parents
ad1d9bf1
0e8e50ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
controller/mouser_controller.go
controller/quote_controller.go
service/ly/mouser.go
controller/mouser_controller.go
View file @
0116ced2
...
@@ -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
.
OutLink
Mouser
(
&
goodsName
,
"1"
)
//供应商详情
//供应商详情
supplierInfo
:=
model
.
SUPPLIER_REDIS_INFO_
{
supplierInfo
:=
model
.
SUPPLIER_REDIS_INFO_
{
SupplierId
:
14
,
SupplierId
:
14
,
...
...
controller/quote_controller.go
View file @
0116ced2
...
@@ -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
.
OutLink
Mouser
(
&
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
)
...
...
service/ly/mouser.go
View file @
0116ced2
...
@@ -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
OutLink
Mouser
(
goodsName
*
string
,
flag
string
)
map
[
string
]
*
model
.
LyClearGoodsList
{
var
result
string
;
var
result
string
;
if
flag
==
"-1"
{
//调试
if
flag
==
"-1"
{
//调试
...
...
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