|
@@ -166,9 +166,13 @@ public class AlipayOpenApiServiceImpl extends BaseService implements AlipayOpenA
|
|
|
AlipayUserStateOpenApiRequest userStateRequest = new AlipayUserStateOpenApiRequest();
|
|
|
userStateRequest.setIsvPid(openApiRequest.getIsvPid());
|
|
|
userStateRequest.setOrgOutId(openApiRequest.getOrgOutId());
|
|
|
- userStateRequest.setVid(vid);
|
|
|
userStateRequest.setAppId(openApiRequest.getAppId());
|
|
|
+ userStateRequest.setVid(vid);
|
|
|
Boolean existed = queryUserState(userStateRequest);
|
|
|
+ openApiRequest.setIsvPid(Preconditions.isNotBlank(openApiRequest.getIsvPid()) ? openApiRequest.getIsvPid() : userStateRequest.getAppId());
|
|
|
+ openApiRequest.setOrgOutId(Preconditions.isNotBlank(openApiRequest.getOrgOutId()) ? openApiRequest.getOrgOutId() : userStateRequest.getOrgOutId());
|
|
|
+ openApiRequest.setComponentOutId(Preconditions.isNotBlank(openApiRequest.getComponentOutId()) ? openApiRequest.getComponentOutId() : getComponentOutId("common"));
|
|
|
+ openApiRequest.setAppId(Preconditions.isNotBlank(openApiRequest.getAppId()) ? openApiRequest.getAppId() : userStateRequest.getAppId());
|
|
|
AlipayOpenIotvspUserwithimageResponse userwithimageResponse = new AlipayOpenIotvspUserwithimageResponse();
|
|
|
if (existed != null && existed) {
|
|
|
log.error("--->用户{}信息已入库vid:{}", openApiRequest.getCertName(), vid);
|
|
@@ -217,7 +221,7 @@ public class AlipayOpenApiServiceImpl extends BaseService implements AlipayOpenA
|
|
|
public RestResult createOperateRecordWithverified(AlipayOpenIotvspUserwithimageRequest openApiRequest) {
|
|
|
log.info("--->自定义vid设备端实名入库入参:{}", JSONObject.toJSONString(openApiRequest));
|
|
|
//查询用户是否在库
|
|
|
- if (openApiRequest == null || openApiRequest.getCertNo() == null || openApiRequest.getAppId() == null) {
|
|
|
+ if (openApiRequest == null || openApiRequest.getCertNo() == null) {
|
|
|
log.error("--->自定义vid设备端实名入库参数错误");
|
|
|
return RestResponse.error("参数错误");
|
|
|
}
|
|
@@ -226,6 +230,7 @@ public class AlipayOpenApiServiceImpl extends BaseService implements AlipayOpenA
|
|
|
openApiRequest.setComponentOutId(Preconditions.isNotBlank(openApiRequest.getComponentOutId()) ? openApiRequest.getComponentOutId() : getComponentOutId("verified"));
|
|
|
openApiRequest.setIsvPid(Preconditions.isNotBlank(openApiRequest.getIsvPid()) ? openApiRequest.getIsvPid() : isvInfo.getIsvPid());
|
|
|
openApiRequest.setOrgOutId(Preconditions.isNotBlank(openApiRequest.getOrgOutId()) ? openApiRequest.getOrgOutId() : isvInfo.getOrgOutId());
|
|
|
+ openApiRequest.setAppId(Preconditions.isNotBlank(openApiRequest.getAppId()) ? openApiRequest.getAppId() : isvInfo.getAppId());
|
|
|
return createOperateRecordWithoutImage(openApiRequest);
|
|
|
}
|
|
|
|
|
@@ -251,7 +256,7 @@ public class AlipayOpenApiServiceImpl extends BaseService implements AlipayOpenA
|
|
|
public RestResult createOperateRecordWithverifiedcommon(AlipayOpenIotvspUserwithimageRequest openApiRequest) {
|
|
|
log.info("--->自定义vid接口实名入库入参:{}", JSONObject.toJSONString(openApiRequest));
|
|
|
//查询用户是否在库
|
|
|
- if (openApiRequest == null || openApiRequest.getCertNo() == null || openApiRequest.getAppId() == null) {
|
|
|
+ if (openApiRequest == null || openApiRequest.getCertNo() == null) {
|
|
|
log.error("--->自定义vid接口实名入库参数错误");
|
|
|
return RestResponse.error("参数错误");
|
|
|
}
|
|
@@ -260,6 +265,7 @@ public class AlipayOpenApiServiceImpl extends BaseService implements AlipayOpenA
|
|
|
openApiRequest.setComponentOutId(Preconditions.isNotBlank(openApiRequest.getComponentOutId()) ? openApiRequest.getComponentOutId() : getComponentOutId("common"));
|
|
|
openApiRequest.setIsvPid(Preconditions.isNotBlank(openApiRequest.getIsvPid()) ? openApiRequest.getIsvPid() : isvInfo.getIsvPid());
|
|
|
openApiRequest.setOrgOutId(Preconditions.isNotBlank(openApiRequest.getOrgOutId()) ? openApiRequest.getOrgOutId() : isvInfo.getOrgOutId());
|
|
|
+ openApiRequest.setAppId(Preconditions.isNotBlank(openApiRequest.getAppId()) ? openApiRequest.getAppId() : isvInfo.getAppId());
|
|
|
return createOperateRecordWithoutImage(openApiRequest);
|
|
|
}
|
|
|
|
|
@@ -551,7 +557,7 @@ public class AlipayOpenApiServiceImpl extends BaseService implements AlipayOpenA
|
|
|
IsvInfo isvInfo = getIsvInfo(openApiRequest.getAppId());
|
|
|
openApiRequest.setIsvPid(Preconditions.isNotBlank(openApiRequest.getIsvPid()) ? openApiRequest.getIsvPid() : isvInfo.getIsvPid());
|
|
|
openApiRequest.setOrgOutId(Preconditions.isNotBlank(openApiRequest.getOrgOutId()) ? openApiRequest.getOrgOutId() : isvInfo.getOrgOutId());
|
|
|
-
|
|
|
+ openApiRequest.setAppId(Preconditions.isNotBlank(openApiRequest.getAppId()) ? openApiRequest.getAppId() : isvInfo.getAppId());
|
|
|
List<String> vids = openApiRequest.getVidList().stream().distinct().collect(Collectors.toList());
|
|
|
for (String vid : vids) {
|
|
|
AlipayOpenIotvspUserDeleteRequest request = new AlipayOpenIotvspUserDeleteRequest();
|
|
@@ -591,7 +597,7 @@ public class AlipayOpenApiServiceImpl extends BaseService implements AlipayOpenA
|
|
|
IsvInfo isvInfo = getIsvInfo(openApiRequest.getAppId());
|
|
|
openApiRequest.setIsvPid(isvInfo.getIsvPid());
|
|
|
openApiRequest.setOrgOutId(isvInfo.getOrgOutId());
|
|
|
-
|
|
|
+ openApiRequest.setAppId(isvInfo.getAppId());
|
|
|
AlipayOpenIotvspUserstateQueryRequest request = new AlipayOpenIotvspUserstateQueryRequest();
|
|
|
request.setBizContent(JSON.toJSONString(openApiRequest));
|
|
|
try {
|