Skip to content

Instantly share code, notes, and snippets.

@eagleon
Created November 8, 2017 09:33
Show Gist options
  • Save eagleon/5bd04ca0e2ed1babe07d9bd740e1d9a4 to your computer and use it in GitHub Desktop.
Save eagleon/5bd04ca0e2ed1babe07d9bd740e1d9a4 to your computer and use it in GitHub Desktop.
risk system interface
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