Created
November 8, 2017 09:33
-
-
Save eagleon/5bd04ca0e2ed1babe07d9bd740e1d9a4 to your computer and use it in GitHub Desktop.
risk system interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RiskRequest request = new RiskRequest(); | |
request.pin = pin; | |
request.ip = ip; | |
request.time = new Date(); | |
request.sysName = sysName; | |
request.riskLevel = RISK_LEVEL; | |
request.useType = useType; | |
private static final String RISK_VALUE = "risk"; | |
private static final String RISK_NONE_VALUE = "none"; | |
RiskRespons response = riskInterface.risk(request); | |
LOGGER.info("调用风控返回结果数据:{}", JSON.toJSONString(response)); | |
if (response != null & StringUtils.isNotEmpty(response.getStrategy())) { | |
if (response.getStrategy().equals(RISK_VALUE)) { | |
return false; | |
} else if (response.getStrategy().equals(RISK_NONE_VALUE)) { | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment