Commit 7cbfa8ae authored by hanfeng's avatar hanfeng

修改实名认证

parent ede6a6d5
......@@ -29,7 +29,7 @@ import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("certif")
@Slf4j
public class CertificationController {
public class CertificationController {
......@@ -62,12 +62,10 @@ public class CertificationController {
ObjectRestResponse.createDefaultFail();
}
String token = request.getHeader("Authorization");
log.info("------token======"+token);
if (StringUtils.isEmpty(token)) {
ObjectRestResponse.createFailedResult(ResultCode.RSTOKEN_NULL_CODE,"token为空");
ObjectRestResponse.createFailedResult(ResultCode.RSTOKEN_NULL_CODE,"无法识别,请重新上传");
}
......@@ -77,7 +75,7 @@ public class CertificationController {
if (appUserDTOObjectRestResponse==null||appUserDTOObjectRestResponse.getData()==null||appUserDTOObjectRestResponse.getData().getId()==0) {
return ObjectRestResponse.createFailedResult(ResultCode.GET_APPUSER_FAILED_CODE,"获取用户失败");
return ObjectRestResponse.createFailedResult(ResultCode.GET_APPUSER_FAILED_CODE,"无法识别,请重新上传");
}
AppUserDTO appUserDTO = appUserDTOObjectRestResponse.getData();
......@@ -87,15 +85,17 @@ public class CertificationController {
//获取用户认证信息
ObjectRestResponse orr = userFeign.authentication(idInformation.getUserLonginId(), null,null, 0);
ObjectRestResponse orr = null;
try {
orr = userFeign.authentication(idInformation.getUserLonginId(), null,null, 0);
} catch (Exception e) {
e.printStackTrace();
}
if (orr==null) {
return ObjectRestResponse.createFailedResult(ResultCode.GET_AUTH_INFO_FAILED_CODE,"获取用户认证信息失败");
return ObjectRestResponse.createFailedResult(ResultCode.GET_AUTH_INFO_FAILED_CODE,"无法识别,请重新上传");
}
if (!orr.getRel()){
return orr;
}
Integer type = idInformation.getCertificateType();
log.info("----type========="+type);
......@@ -117,7 +117,7 @@ public class CertificationController {
e.printStackTrace();
}
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE,"错误");
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE,"无法识别,请重新上传");
}
......
......@@ -148,10 +148,10 @@ public class CertificationService {
HashedMap hashMap = new HashedMap();
// 认证状态:true是认证过
//判断是否map是否为null
//判断是否bean是否为null
if (idInformation == null) {
return ObjectRestResponse.createFailedResult(ResultCode.INCOMPLETE_DATA, "请提供资料");
return ObjectRestResponse.createFailedResult(ResultCode.INCOMPLETE_DATA, "无法识别,请重新上传");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment