自主授权接口

beta-enc
kane 2 years ago
parent cdef0ea8e1
commit bc7962e6bc
  1. 16
      jianshui-invoice-all/src/main/java/com/jianshui/invoiceall/service/impl/AutonomousSqServiceImpl.java

@ -96,12 +96,14 @@ public class AutonomousSqServiceImpl implements AutonomousSqService {
return AjaxResult.error("未查询到该流水号相关信息,请确认后输入"); return AjaxResult.error("未查询到该流水号相关信息,请确认后输入");
} }
if ("F000".equals(invoiceAllLoginResult.getCode())) { if ("F000".equals(invoiceAllLoginResult.getCode())) {
String substringResult = invoiceAllLoginResult.getMsg().substring(11); String[] splitResult = invoiceAllLoginResult.getMsg().split(":");
return AjaxResult.error(substringResult); return AjaxResult.error(splitResult[1]);
} else if ("SOOO".equals(invoiceAllLoginResult.getCode())) { } else if ("S000".equals(invoiceAllLoginResult.getCode())) {
return AjaxResult.success("10012"); return AjaxResult.success("10012");
} else { } else if ("SMS".equals(invoiceAllLoginResult.getCode())){
return AjaxResult.success("验证码校验失败"); return AjaxResult.success("10011");
}else {
return AjaxResult.success("获取失败");
} }
} }
@ -201,7 +203,9 @@ public class AutonomousSqServiceImpl implements AutonomousSqService {
log.error("【金四服务类】【金财数科】【自主授权提交短信验证码】API请求异常,外部报文返回code非S000。错误信息:{}", e.getMessage()); log.error("【金四服务类】【金财数科】【自主授权提交短信验证码】API请求异常,外部报文返回code非S000。错误信息:{}", e.getMessage());
return AjaxResult.error(ErrorCode.INCOME_ERROR); return AjaxResult.error(ErrorCode.INCOME_ERROR);
} }
} else { }else if ("S000".equals(invoiceAllLoginResult.getCode())){
return AjaxResult.success("10012");
}else {
log.error("自主授权短信提交接口,提交短信失败,失败原因:{}", "登录失败,请重新授权登录"); log.error("自主授权短信提交接口,提交短信失败,失败原因:{}", "登录失败,请重新授权登录");
return AjaxResult.error("登录失败,请重新授权登录"); return AjaxResult.error("登录失败,请重新授权登录");
} }

Loading…
Cancel
Save