Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
go_sku_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
2cebb28a
authored
Nov 18, 2020
by
huangchengyi
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1.0
parent
12e1b401
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
conf/dev/redis.ini
pkg/gredis/redis.go
conf/dev/redis.ini
View file @
2cebb28a
...
...
@@ -2,15 +2,15 @@
[default_redis_read]
host
=
192.168.1.235:6379
password
=
icDb29mLy2s
max_idle
=
5
000
max_active
=
5
000
max_idle
=
20
000
max_active
=
20
000
idle_timeout
=
20
[default_redis_write]
host
=
192.168.1.235:6379
password
=
icDb29mLy2s
max_idle
=
5
000
max_active
=
5
000
max_idle
=
20
000
max_active
=
20
000
idle_timeout
=
20
;存放redis所有键
...
...
pkg/gredis/redis.go
View file @
2cebb28a
...
...
@@ -83,9 +83,12 @@ func Hmget(redisCon string, hkey string, targetIds []string) map[string]string {
param
=
append
(
param
,
goods_id
)
}
res1
,
err
:=
redisConn
.
Do
(
"hmget"
,
param
...
)
reply
,
err
:=
redis
.
Strings
(
res1
,
err
)
//fmt.Println(reply)
res1
,
err1
:=
redisConn
.
Do
(
"hmget"
,
param
...
)
reply
,
_
:=
redis
.
Strings
(
res1
,
err1
)
if
err1
!=
nil
{
fmt
.
Println
(
err1
)
}
for
k
,
goodsInfo
:=
range
reply
{
skuArr
[
targetIds
[
k
]]
=
goodsInfo
...
...
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