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
2778a809
authored
Jul 21, 2020
by
huangchengyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.0
parent
4ece115c
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 @
2778a809
...
...
@@ -12,7 +12,7 @@ func GetMouserData(c *gin.Context) {
goodsName
,
_
:=
c
.
GetPostForm
(
"goods_name"
)
lycon
:=
new
(
ly
.
CommonLyService
)
//调外链拿数据
apiData
:=
ly
.
OutLink
(
&
goodsName
,
"1"
)
apiData
:=
ly
.
OutLink
Mouser
(
&
goodsName
,
"1"
)
//供应商详情
supplierInfo
:=
model
.
SUPPLIER_REDIS_INFO_
{
SupplierId
:
14
,
...
...
controller/quote_controller.go
View file @
2778a809
...
...
@@ -66,7 +66,7 @@ func QuoteIndex(c *gin.Context) {
}
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"
)
defer
redisCon
.
Close
()
skuMouser
:=
make
(
map
[
string
]
string
)
...
...
service/ly/mouser.go
View file @
2778a809
...
...
@@ -12,7 +12,7 @@ import (
const
Mouser_api_url
string
=
"https://api.mouser.com/api/v1/search/partnumber?apiKey=0a11fa6f-ddcb-4ddf-9947-e42b2f3b4723"
//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
;
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