Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asset-distribution
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-spider
asset-distribution
Commits
f52ba6cc
Commit
f52ba6cc
authored
Dec 27, 2019
by
liwenbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加条件类型缓存刷新接口
parent
0c5d8d94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
RedisFlushController.java
...p/asset/distribution/controller/RedisFlushController.java
+11
-2
No files found.
src/main/java/com/quantgroup/asset/distribution/controller/RedisFlushController.java
View file @
f52ba6cc
...
@@ -5,6 +5,7 @@ import com.quantgroup.asset.distribution.model.response.GlobalResponse;
...
@@ -5,6 +5,7 @@ import com.quantgroup.asset.distribution.model.response.GlobalResponse;
import
com.quantgroup.asset.distribution.service.asset.IAssetAttributeExtendConfigService
;
import
com.quantgroup.asset.distribution.service.asset.IAssetAttributeExtendConfigService
;
import
com.quantgroup.asset.distribution.service.authority.IAuthorityService
;
import
com.quantgroup.asset.distribution.service.authority.IAuthorityService
;
import
com.quantgroup.asset.distribution.service.distribute.IAssetDistributeRuleConfigService
;
import
com.quantgroup.asset.distribution.service.distribute.IAssetDistributeRuleConfigService
;
import
com.quantgroup.asset.distribution.service.funding.IFundModuleLimitTypeService
;
import
com.quantgroup.asset.distribution.service.redis.IRedisService
;
import
com.quantgroup.asset.distribution.service.redis.IRedisService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -22,7 +23,7 @@ public class RedisFlushController {
...
@@ -22,7 +23,7 @@ public class RedisFlushController {
private
static
String
authKey
=
"3ruhhdf9924hrodnfjkasdhf8209"
;
private
final
static
String
authKey
=
"3ruhhdf9924hrodnfjkasdhf8209"
;
@Autowired
@Autowired
...
@@ -33,6 +34,8 @@ public class RedisFlushController {
...
@@ -33,6 +34,8 @@ public class RedisFlushController {
private
IAuthorityService
authorityService
;
private
IAuthorityService
authorityService
;
@Autowired
@Autowired
private
IAssetDistributeRuleConfigService
assetDistributeRuleConfigService
;
private
IAssetDistributeRuleConfigService
assetDistributeRuleConfigService
;
@Autowired
private
IFundModuleLimitTypeService
limitTypeService
;
/**
/**
* 助贷资金池刷新
* 助贷资金池刷新
...
@@ -54,7 +57,7 @@ public class RedisFlushController {
...
@@ -54,7 +57,7 @@ public class RedisFlushController {
@RequestMapping
(
"/authority_flush"
)
@RequestMapping
(
"/authority_flush"
)
public
GlobalResponse
authorityFlush
(
String
key
,
String
authKey
,
String
authPass
)
{
public
GlobalResponse
authorityFlush
(
String
key
,
String
authKey
,
String
authPass
)
{
if
(
authKey
.
equals
(
key
))
{
authorityService
.
clearCacheByAuthKeyAndAuthPass
(
authKey
,
authPass
);
}
if
(
this
.
authKey
.
equals
(
key
))
{
authorityService
.
clearCacheByAuthKeyAndAuthPass
(
authKey
,
authPass
);
}
return
GlobalResponse
.
success
();
return
GlobalResponse
.
success
();
}
}
...
@@ -63,4 +66,10 @@ public class RedisFlushController {
...
@@ -63,4 +66,10 @@ public class RedisFlushController {
if
(
authKey
.
equals
(
key
))
{
assetDistributeRuleConfigService
.
clearRuleConfigCache
();
}
if
(
authKey
.
equals
(
key
))
{
assetDistributeRuleConfigService
.
clearRuleConfigCache
();
}
return
GlobalResponse
.
success
();
return
GlobalResponse
.
success
();
}
}
@RequestMapping
(
"/limit_type_flush"
)
public
GlobalResponse
limitTypeFlush
(
String
key
)
{
if
(
authKey
.
equals
(
key
))
{
limitTypeService
.
clearCache
();
}
return
GlobalResponse
.
success
();
}
}
}
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