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
9444bc4b
authored
Jul 21, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调试
parent
45f76ff4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
6 deletions
controller/quote_controller.go
controller/quote_controller.go
View file @
9444bc4b
package
controller
import
(
"fmt"
"github.com/gin-gonic/gin"
"github.com/gomodule/redigo/redis"
"github.com/ichunt2019/logger"
...
...
@@ -117,13 +116,11 @@ func GetDataPur(c *gin.Context) {
if
user
.
Name
==
""
&&
user
.
Email
!=
""
{
userInfoData
[
user
.
UserId
]
=
user
.
Email
}
else
{
fmt
.
Println
(
user
.
UserId
)
userInfoData
[
user
.
UserId
]
=
user
.
Name
}
}
temp2
:=
make
(
map
[
int
]
string
)
for
_
,
code
:=
range
intracode
{
//fmt.Println(userInfoData[code.AdminId])
if
_
,
exist
:=
userInfoData
[
code
.
AdminId
];
exist
{
temp2
[
code
.
CodeId
]
=
userInfoData
[
code
.
AdminId
]
}
else
{
...
...
@@ -135,8 +132,6 @@ func GetDataPur(c *gin.Context) {
defer
redisCon
.
Close
()
for
_
,
supplier
:=
range
supplierData
{
if
value
,
exist
:=
temp2
[
supplier
.
ChannelUid
];
exist
{
fmt
.
Println
(
value
)
fmt
.
Println
(
temp2
[
supplier
.
ChannelUid
])
res
,
err
:=
redis
.
Bool
(
redisCon
.
Do
(
"HSET"
,
"search_supplier_canaltopurchase_test"
,
supplier
.
SupplierCode
,
value
))
if
err
!=
nil
||
!
res
{
c
.
String
(
200
,
"失败"
)
...
...
@@ -152,6 +147,5 @@ func GetDataPur(c *gin.Context) {
func
GetData
(
keyword
,
supplierName
string
)
(
res
interface
{})
{
quoteService
:=
service
.
QuoteService
{}
res
,
_
=
quoteService
.
GetData
(
keyword
,
supplierName
)
fmt
.
Println
(
res
)
return
}
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