记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
c6368e27
Commit
c6368e27
authored
Oct 18, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
redis
parent
d2c358c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
SweetConstant.java
...a/com/liquidnet/service/sweet/constant/SweetConstant.java
+3
-3
RedisDataUtils.java
...ava/com/liquidnet/service/sweet/utils/RedisDataUtils.java
+12
-6
No files found.
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/constant/SweetConstant.java
View file @
c6368e27
...
...
@@ -24,11 +24,11 @@ public class SweetConstant {
public
final
static
String
REDIS_KEY_SWEET_WECHAT_USER_INFO_STR
=
"sweet:wechatUser:unionIdStr:"
;
public
final
static
String
REDIS_KEY_SWEET_WECHAT_USER_UNIONID
=
"sweet:wechatUser:openId:"
;
public
final
static
String
REDIS_KEY_SWEET_ANSWER_PHONE
=
"sweet:answer:phone:"
;
public
final
static
String
REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST
=
"
sweet:cityVote
:StatList"
;
public
final
static
String
REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE
=
"
sweet:cityVote
:cityCode:"
;
public
final
static
String
REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST
=
":StatList"
;
public
final
static
String
REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE
=
":cityCode:"
;
public
final
static
String
REDIS_KEY_SWEET_CITY_VOTE
=
"sweet:cityVote"
;
public
final
static
String
REDIS_KEY_SWEET_CITY_VOTE_USER
=
":user:"
;
public
final
static
String
REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME
=
"
sweet:cityVote
:updateTime"
;
public
final
static
String
REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME
=
":updateTime"
;
public
final
static
String
REDIS_KEY_SWEET_WECHAT_USER_INFO_MODERNSKY
=
"sweet:wechatUser:modernsky:unionId:"
;
public
final
static
String
REDIS_KEY_SWEET_WECHAT_USER_INFO_STR_MODERNSKY
=
"sweet:wechatUser:modernsky:unionIdStr:"
;
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/utils/RedisDataUtils.java
View file @
c6368e27
...
...
@@ -493,11 +493,13 @@ public class RedisDataUtils {
// 投票
public
void
setSweetCityVoteStatList
(
List
<
SweetCItyVoteStatVo
>
sweetCItyVoteStatVo
,
Integer
type
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST
.
concat
(
String
.
valueOf
(
type
));
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE
.
concat
(
String
.
valueOf
(
type
))
.
concat
(
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST
);
redisUtil
.
set
(
redisKey
,
sweetCItyVoteStatVo
);
}
public
List
<
SweetCItyVoteStatVo
>
getSweetCityVoteStatList
(
Integer
type
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST
.
concat
(
String
.
valueOf
(
type
));
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE
.
concat
(
String
.
valueOf
(
type
))
.
concat
(
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_STAT_LIST
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
List
<
SweetCItyVoteStatVo
>
sweetCityVoteStatList
=
ObjectUtil
.
getSweetCItyVoteStatVoList
();
if
(
null
!=
obj
)
{
...
...
@@ -506,11 +508,13 @@ public class RedisDataUtils {
return
sweetCityVoteStatList
;
}
public
void
incrSweetCityVote
(
String
cityCode
,
Integer
type
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE
.
concat
(
String
.
valueOf
(
type
)).
concat
(
cityCode
);
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE
.
concat
(
String
.
valueOf
(
type
))
.
concat
(
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE
).
concat
(
cityCode
);
redisUtil
.
incr
(
redisKey
,
1
);
}
public
Integer
getSweetCityVote
(
String
cityCode
,
Integer
type
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE
.
concat
(
String
.
valueOf
(
type
)).
concat
(
cityCode
);
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE
.
concat
(
String
.
valueOf
(
type
))
.
concat
(
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_CITY_CODE
).
concat
(
cityCode
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
null
==
obj
)
{
return
0
;
...
...
@@ -534,11 +538,13 @@ public class RedisDataUtils {
}
}
public
void
setSweetCityVoteStatUpdateTime
(
Integer
type
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME
.
concat
(
String
.
valueOf
(
type
));
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE
.
concat
(
String
.
valueOf
(
type
))
.
concat
(
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME
);
redisUtil
.
set
(
redisKey
,
DateUtil
.
getNowTime
());
}
public
String
getSweetCityVoteStatUpdateTime
(
Integer
type
)
{
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME
.
concat
(
String
.
valueOf
(
type
));
String
redisKey
=
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE
.
concat
(
String
.
valueOf
(
type
))
.
concat
(
SweetConstant
.
REDIS_KEY_SWEET_CITY_VOTE_STAT_UPDATE_TIME
);
Object
obj
=
redisUtil
.
get
(
redisKey
);
if
(
null
==
obj
)
{
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