记得上下班打卡 | 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
bcbfdc3b
Commit
bcbfdc3b
authored
Nov 22, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cityVote
parent
ab55ded1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
21 deletions
+18
-21
RedisDataController.java
...rvice/sweet/controller/syncRedis/RedisDataController.java
+6
-6
RedisDataServiceImpl.java
...ce/sweet/service/impl/syncRedis/RedisDataServiceImpl.java
+12
-15
No files found.
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/syncRedis/RedisDataController.java
View file @
bcbfdc3b
...
...
@@ -29,7 +29,7 @@ public class RedisDataController {
* basicServices
* @return
*/
@PostMapping
(
"basicServices/versions"
)
/*
@PostMapping("basicServices/versions")
@ApiOperation("basicServices版本控制数据迁移-可以通过后台编辑")
public ResponseDto<Boolean> basicServicesVersions() {
Boolean result = redisDataService.basicServicesVersions();
...
...
@@ -43,10 +43,10 @@ public class RedisDataController {
return ResponseDto.success(result);
}
/**
*/
/**
* kylin
* @return
*/
*/
/*
@PostMapping("kylin/banner")
@ApiOperation("kylin-banner数据迁移-可以通过后台编辑")
public ResponseDto<Boolean> kylinBanner() {
...
...
@@ -54,10 +54,10 @@ public class RedisDataController {
return ResponseDto.success(result);
}
/**
*/
/**
* sweet
* @return
*/
*/
/*
@PostMapping("sweet/accessToken")
@ApiOperation("sweet-AccessToken数据迁移-可不迁可自动生成")
public ResponseDto<Boolean> sweetAccessToken() {
...
...
@@ -91,7 +91,7 @@ public class RedisDataController {
public ResponseDto<Boolean> sweetUnionIdStr() {
Boolean result = redisDataService.sweetUnionIdStr();
return ResponseDto.success(result);
}
}
*/
@PostMapping
(
"sweet/cityVote3"
)
@ApiOperation
(
"sweet-cityVote3数据迁移"
)
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/syncRedis/RedisDataServiceImpl.java
View file @
bcbfdc3b
...
...
@@ -12,6 +12,7 @@ import com.liquidnet.service.kylin.constant.KylinRedisConst;
import
com.liquidnet.service.kylin.dto.vo.admin.ZhengzaiAppVersionsVo
;
import
com.liquidnet.service.kylin.entity.KylinBanners
;
import
com.liquidnet.service.sweet.entity.SweetWechatUser
;
import
com.liquidnet.service.sweet.param.SweetCityVoteParam
;
import
com.liquidnet.service.sweet.vo.SweetAnswerVo
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -31,7 +32,7 @@ public class RedisDataServiceImpl {
@Autowired
private
RedisUtil
redisUtil
;
private
static
final
JedisPool
jedisPool
;
/*
private static final JedisPool jedisPool;
private static final ObjectMapper toObjMapper;
static {
...
...
@@ -49,7 +50,7 @@ public class RedisDataServiceImpl {
private Jedis getRedis() {
Jedis resource = jedisPool.getResource();
resource
.
auth
(
"
NBs$%6hW
"
);
// 线上
resource.auth("
java:1ICjLqCyMPk7
"); // 线上
// resource.auth("PO@B!Iud32"); // test
resource.select(15);
return resource;
...
...
@@ -212,24 +213,22 @@ public class RedisDataServiceImpl {
log.error("kylinBannerError", e);
return false;
}
}
}
*/
public
Boolean
cityVote3
()
{
try
{
Jedis
redis
=
getRedis
();
String
redisKey
=
"sweet:cityVote3:cityCode*"
;
Set
<
String
>
keys
=
redis
.
keys
(
redisKey
);
Set
<
String
>
keys
=
redis
Util
.
getRedisTemplateByDb
(
15
)
.
keys
(
redisKey
);
for
(
String
key
:
keys
)
{
String
value
=
redis
.
g
et
(
key
);
Integer
value
=
(
Integer
)
redisUtil
.
getDB15RedisG
et
(
key
);
redisUtil
.
set
(
key
,
value
);
}
String
redisKey2
=
"sweet:cityVote3:user*"
;
Set
<
String
>
keys2
=
redis
.
keys
(
redisKey2
);
Set
<
String
>
keys2
=
redis
Util
.
getRedisTemplateByDb
(
15
)
.
keys
(
redisKey2
);
for
(
String
key
:
keys2
)
{
S
tring
value
=
redis
.
g
et
(
key
);
S
weetCityVoteParam
value
=
(
SweetCityVoteParam
)
redisUtil
.
getDB15RedisG
et
(
key
);
redisUtil
.
set
(
key
,
value
);
}
...
...
@@ -242,20 +241,18 @@ public class RedisDataServiceImpl {
public
Boolean
cityVote4
()
{
try
{
Jedis
redis
=
getRedis
();
String
redisKey
=
"sweet:cityVote4:cityCode*"
;
Set
<
String
>
keys
=
redis
.
keys
(
redisKey
);
Set
<
String
>
keys
=
redis
Util
.
getRedisTemplateByDb
(
15
)
.
keys
(
redisKey
);
for
(
String
key
:
keys
)
{
String
value
=
redis
.
g
et
(
key
);
Integer
value
=
(
Integer
)
redisUtil
.
getDB15RedisG
et
(
key
);
redisUtil
.
set
(
key
,
value
);
}
String
redisKey2
=
"sweet:cityVote4:user*"
;
Set
<
String
>
keys2
=
redis
.
keys
(
redisKey2
);
Set
<
String
>
keys2
=
redis
Util
.
getRedisTemplateByDb
(
15
)
.
keys
(
redisKey2
);
for
(
String
key
:
keys2
)
{
S
tring
value
=
redis
.
g
et
(
key
);
S
weetCityVoteParam
value
=
(
SweetCityVoteParam
)
redisUtil
.
getDB15RedisG
et
(
key
);
redisUtil
.
set
(
key
,
value
);
}
...
...
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