|
@@ -68,6 +68,8 @@ public class ChannelServiceImpl implements ChannelService {
|
|
|
private String idCardValidityUrl;
|
|
|
@Value("${supplier.aesDecryptKey}")
|
|
|
private String aesDecryptKey;
|
|
|
+ @Value("${supplier.sensitive}")
|
|
|
+ private String[] sensitive;
|
|
|
|
|
|
@Autowired
|
|
|
StringRedisTemplate stringRedisTemplate;
|
|
@@ -592,11 +594,35 @@ public class ChannelServiceImpl implements ChannelService {
|
|
|
ret.setResultBody(Constant.JK_IDCODE_FORMAT_ERROR);
|
|
|
}
|
|
|
return false;
|
|
|
+ } else if(existSensitiveInfo(requestObject.getName(),requestObject.getIdCode())){
|
|
|
+ if (Constant.CUSTOMER_RETURN_ZW.equals(returnType)) {
|
|
|
+ ret.setResultCode(Constant.OTHER_ERROR_CODE);
|
|
|
+ ret.setResultDesc(Constant.OTHER_ERROR);
|
|
|
+ ret.setResultBody(Constant.OTHER_ERROR);
|
|
|
+ } else {
|
|
|
+ ret.setResultCode(Constant.JK_RETURN_CODE_OTHER_ERROR);
|
|
|
+ ret.setResultDesc(Constant.OTHER_ERROR);
|
|
|
+ ret.setResultBody(Constant.OTHER_ERROR);
|
|
|
+ }
|
|
|
+ return false;
|
|
|
} else {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //过滤敏感信息
|
|
|
+ private boolean existSensitiveInfo(String name,String idCode){
|
|
|
+ if(sensitive == null || sensitive.length == 0){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ for (int i = 0; i < sensitive.length; i++) {
|
|
|
+ if (sensitive[i].equals(name) || sensitive[i].equals(idCode)){
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
private boolean validateParamNullValue(Object jsonResolveObject) {
|
|
|
ValidatorFactory vf = Validation.buildDefaultValidatorFactory();
|
|
|
Validator validator = vf.getValidator();
|