...
|
...
|
@@ -11,6 +11,7 @@ import com.alipay.api.response.AlipaySystemOauthTokenResponse; |
|
|
import com.alipay.api.response.AlipayUserInfoShareResponse;
|
|
|
import com.alipay.api.response.ZhimaCustomerCertificationQueryResponse;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yoho.service.model.reviewed.request.ImageBO;
|
|
|
import com.yoho.service.model.reviewed.request.ImageReviewedReq;
|
...
|
...
|
@@ -74,36 +75,22 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService { |
|
|
@Autowired
|
|
|
private HttpClient httpClient;
|
|
|
|
|
|
@Value("${file.saveDir}")
|
|
|
private String saveDir;
|
|
|
|
|
|
@Value("${web.context}")
|
|
|
private String contextPath;
|
|
|
|
|
|
@Autowired
|
|
|
private IQNUploadService iqnUploadService;
|
|
|
|
|
|
@Value("${zhimacert.switch:true}")
|
|
|
private boolean zhiMaCertSwitch;
|
|
|
/* @Autowired
|
|
|
private GraphVerifyService graphVerifyService;*/
|
|
|
|
|
|
/* @Resource(name="authorizeBankRestTemplate")
|
|
|
private RestTemplate restTemplate;*/
|
|
|
|
|
|
/* @Resource(name = "core-config-reader")
|
|
|
private ConfigReader configReader;*/
|
|
|
// 需要放到zk上
|
|
|
private Integer maxPhotoCheckCount = 10;
|
|
|
|
|
|
/* @Autowired
|
|
|
private IUserAuthorizeHistoryDao userAuthorizeHistoryDao;*/
|
|
|
//private final static DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
|
|
|
//@Value("${file.saveDir}")
|
|
|
private String saveDir="D:/pic";
|
|
|
|
|
|
//请求实名认证银联接口url 测试环境
|
|
|
//private final String requestUrl="http://58.247.0.18:29015/v1/datacenter/smartverification/bankcard/verify";
|
|
|
//请求实名认证银联接口url 生产环境
|
|
|
//private final String requestUrl="https://api-mop.chinaums.com/v1/datacenter/smartverification/bankcard/verify";
|
|
|
//@Autowired
|
|
|
private IQNUploadService iqnUploadService;
|
|
|
|
|
|
//ExecutorService executeService = Executors.newFixedThreadPool(10);
|
|
|
|
|
|
|
|
|
public UserAuthorizeInfo getValidAuthorizeInfo(int uid){
|
...
|
...
|
@@ -387,6 +374,19 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService { |
|
|
throw new GatewayException(400, "请上传身份证正反面!");
|
|
|
}
|
|
|
|
|
|
//每天:记录一个累加的次数 ,超过一定的数量不允许继续调
|
|
|
Date currentTime = new Date();
|
|
|
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
|
|
|
String dayStr = formatter.format(currentTime);
|
|
|
Long count = cacheService.getPhotoCheckCount(dayStr,reqVO.getUid());
|
|
|
logger.info("zhiMaCertUploadPhotoAndCheck getPhotoCheckCount count {},reqVO {} ",count,reqVO);
|
|
|
if(count!=null&&count>=maxPhotoCheckCount){
|
|
|
throw new GatewayException(400, "超过当日最大调用次数!");
|
|
|
}
|
|
|
|
|
|
//次数加1
|
|
|
cacheService.incrementPhotoCheckCount(dayStr,reqVO.getUid());
|
|
|
|
|
|
//循环获取file数组中得文件
|
|
|
ImageBO frontUploadModel=null;
|
|
|
ImageBO backUploadModel=null;
|
...
|
...
|
|