记得上下班打卡 | 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
52aedda9
Commit
52aedda9
authored
Sep 22, 2021
by
anjiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交chime社交相关
parent
777f441b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
RedisDataUtil.java
...java/com/liquidnet/service/chime/utils/RedisDataUtil.java
+4
-4
TestRedisUtils.java
...java/com/liquidnet/service/chime/test/TestRedisUtils.java
+34
-0
No files found.
liquidnet-bus-service/liquidnet-service-chime/liquidnet-service-chime-impl/src/main/java/com/liquidnet/service/chime/utils/RedisDataUtil.java
View file @
52aedda9
...
...
@@ -37,7 +37,7 @@ public class RedisDataUtil {
log
.
info
(
"isPassedByPerformanceId allowPerIds:{}"
,
allowPerIds
);
if
(
StringUtil
.
isNotNull
(
allowPerIds
)){
String
perIds
=
(
String
)
allowPerIds
;
List
<
String
>
perIdsList
=
Arrays
.
asList
(
perIds
.
split
(
"
|
"
));
List
<
String
>
perIdsList
=
Arrays
.
asList
(
perIds
.
split
(
"
,
"
));
if
(
perIdsList
.
contains
(
performanceId
)){
isPass
=
true
;
}
...
...
@@ -51,7 +51,7 @@ public class RedisDataUtil {
log
.
info
(
"isPassedByPerformanceId notAllowPerIds:{}"
,
notAllowPerIds
);
if
(
StringUtil
.
isNotNull
(
notAllowPerIds
)){
String
notPerIds
=
(
String
)
notAllowPerIds
;
List
<
String
>
notPerIdsList
=
Arrays
.
asList
(
notPerIds
.
split
(
"
|
"
));
List
<
String
>
notPerIdsList
=
Arrays
.
asList
(
notPerIds
.
split
(
"
,
"
));
if
(
notPerIdsList
.
contains
(
performanceId
)){
isPass
=
false
;
}
...
...
@@ -71,7 +71,7 @@ public class RedisDataUtil {
log
.
info
(
"isPassedByCityName allowCityNameIds:{}"
,
allowCityNameIds
);
if
(
StringUtil
.
isNotNull
(
allowCityNameIds
)){
String
perIds
=
(
String
)
allowCityNameIds
;
List
<
String
>
perIdsList
=
Arrays
.
asList
(
perIds
.
split
(
"
|
"
));
List
<
String
>
perIdsList
=
Arrays
.
asList
(
perIds
.
split
(
"
,
"
));
if
(
perIdsList
.
contains
(
cityName
)){
isPass
=
true
;
}
...
...
@@ -85,7 +85,7 @@ public class RedisDataUtil {
log
.
info
(
"isPassedByCityName notAllowCityNameIds:{}"
,
notAllowCityNameIds
);
if
(
StringUtil
.
isNotNull
(
notAllowCityNameIds
)){
String
notPerIds
=
(
String
)
notAllowCityNameIds
;
List
<
String
>
notPerIdsList
=
Arrays
.
asList
(
notPerIds
.
split
(
"
|
"
));
List
<
String
>
notPerIdsList
=
Arrays
.
asList
(
notPerIds
.
split
(
"
,
"
));
if
(
notPerIdsList
.
contains
(
cityName
)){
isPass
=
false
;
}
...
...
liquidnet-bus-service/liquidnet-service-chime/liquidnet-service-chime-impl/src/test/java/com/liquidnet/service/chime/test/TestRedisUtils.java
0 → 100644
View file @
52aedda9
package
com
.
liquidnet
.
service
.
chime
.
test
;
import
com.liquidnet.service.chime.utils.RedisDataUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
/**
* @author AnJiabin <anjiabin@zhengzai.tv>
* @version V1.0
* @Description: TODO
* @class: TestRedisUtils
* @Package com.liquidnet.service.chime.test
* @Copyright: LightNet @ Copyright (c) 2021
* @date 2021/9/22 15:44
*/
@Slf4j
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@SpringBootTest
public
class
TestRedisUtils
{
@Autowired
private
RedisDataUtil
redisDataUtil
;
@Test
public
void
test
(){
boolean
isAllow
=
redisDataUtil
.
isPassedByPerformanceId
(
"123"
);
log
.
info
(
"isAllow:{}"
,
isAllow
);
boolean
isCityAllow
=
redisDataUtil
.
isPassedByCityName
(
"123"
);
log
.
info
(
"isCityAllow:{}"
,
isCityAllow
);
}
}
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