diff --git a/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceFrontController.java b/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceFrontController.java index e6e1afd..aab88fb 100644 --- a/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceFrontController.java +++ b/jianshui-admin/src/main/java/com/jianshui/api/controller/http/invoice/v1/InvoiceFrontController.java @@ -35,19 +35,19 @@ public class InvoiceFrontController { @ApiImplicitParam(name = "secret", value = "身份认证Key", dataType = "java.lang.String", example = "LTEO+oOgWMsuQAOUglqXuQ==", required = true), @ApiImplicitParam(name = "params", value = "请求体", dataType = "java.lang.String", required = true) }) - @PostMapping("/rpaLogin/{identity}/{secret}") - public Object rpaLogin(@RequestBody Map params,@PathVariable("identity") String identity, @PathVariable("secret") String secret) { + @PostMapping("/rpaLogin") + public Object rpaLogin(@RequestBody Map params) { JSONObject paramJson = new JSONObject(params); - log.debug("rpaLogin param{} identity:{} secret:{}", paramJson.toJSONString(), identity, secret); + log.debug("rpaLogin param{}", paramJson.toJSONString()); //参数校验 - if (StringUtils.isBlank(identity)){ + if (StringUtils.isBlank(paramJson.getString("identity"))){ return AjaxResult.error("公司ID不能为空"); } - if (StringUtils.isBlank(secret)){ + if (StringUtils.isBlank(paramJson.getString("secret"))){ return AjaxResult.error("公司Key不能为空"); } @@ -83,8 +83,8 @@ public class InvoiceFrontController { paramJson.put("ffm","sms_login"); } - Companyservice companyservice = iCompanyserviceService.selectCompanyserviceByIdentity(identity); - if (companyservice == null || !secret.equals(companyservice.getSecret())) { + Companyservice companyservice = iCompanyserviceService.selectCompanyserviceByIdentity(paramJson.getString("identity")); + if (companyservice == null || !paramJson.getString("secret").equals(companyservice.getSecret())) { return AjaxResult.error(ErrorCode.COMPANY_NOT_FOUND); } @@ -100,9 +100,13 @@ public class InvoiceFrontController { @ApiImplicitParam(name = "identity", value = "身份认证", dataType = "java.lang.String", example = "1130", required = true), @ApiImplicitParam(name = "secret", value = "身份认证Key", dataType = "java.lang.String", example = "LTEO+oOgWMsuQAOUglqXuQ==", required = true) }) - @PostMapping("/queryRpaTaxAccount/{identity}/{secret}") - public Object queryRpaTaxAccount(@PathVariable("identity") String identity, @PathVariable("secret") String secret ){ + @PostMapping("/queryRpaTaxAccount") + public Object queryRpaTaxAccount(@RequestBody Map params){ + JSONObject paramJson = new JSONObject(params); + + String identity = paramJson.getString("identity"); + String secret = paramJson.getString("secret"); log.debug("queryRpaTaxAccount param identity:{} secret:{}",identity,secret); //参数校验 if (StringUtils.isBlank(identity)){ @@ -130,12 +134,14 @@ public class InvoiceFrontController { @ApiImplicitParam(name = "secret", value = "身份认证Key", dataType = "java.lang.String", example = "LTEO+oOgWMsuQAOUglqXuQ==", required = true), @ApiImplicitParam(name = "yhm", value = "电子税局登陆账号", dataType = "java.lang.String", required = true) }) - @PostMapping("/getRpaQrCode/{identity}/{secret}") - public Object getRpaQrCode(@RequestBody Map params,@PathVariable("identity") String identity, @PathVariable("secret") String secret ) { + @PostMapping("/getRpaQrCode") + public Object getRpaQrCode(@RequestBody Map params) { JSONObject paramJson = new JSONObject(params); - log.debug("getRpaQrCode param params:{} identity:{} secret:{}", paramJson,identity,secret); + log.debug("getRpaQrCode param params:{}", paramJson); + String identity = paramJson.getString("identity"); + String secret = paramJson.getString("secret"); //参数校验 if (StringUtils.isBlank(identity)){ return AjaxResult.error("公司ID不能为空"); @@ -145,9 +151,9 @@ public class InvoiceFrontController { return AjaxResult.error("公司Key不能为空"); } - if (StringUtils.isBlank(paramJson.getString("yhm"))){ - return AjaxResult.error("电子税局登录名不能为空"); - } +// if (StringUtils.isBlank(paramJson.getString("yhm"))){ +// return AjaxResult.error("电子税局登录名不能为空"); +// } Companyservice companyservice = iCompanyserviceService.selectCompanyserviceByIdentity(identity); @@ -168,12 +174,14 @@ public class InvoiceFrontController { @ApiImplicitParam(name = "secret", value = "身份认证Key", dataType = "java.lang.String", example = "LTEO+oOgWMsuQAOUglqXuQ==", required = true), @ApiImplicitParam(name = "params", value = "请求体", dataType = "java.lang.String", required = true) }) - @PostMapping("/getRpaAuthStatus/{identity}/{secret}") - public Object getRpaAuthStatus(@RequestBody Map params, @PathVariable("identity") String identity, @PathVariable("secret") String secret ) { + @PostMapping("/getRpaAuthStatus") + public Object getRpaAuthStatus(@RequestBody Map params) { JSONObject paramJson = new JSONObject(params); - log.debug("getRpaAuthStatus param{} identity:{} secret:{}", paramJson.toJSONString(), identity, secret); + log.debug("getRpaAuthStatus param{}", paramJson.toJSONString()); + String identity = paramJson.getString("identity"); + String secret = paramJson.getString("secret"); //参数校验 if (StringUtils.isBlank(identity)){ diff --git a/jianshui-invoice-all/src/main/java/com/jianshui/invoiceall/service/impl/InvoiceAllImpl.java b/jianshui-invoice-all/src/main/java/com/jianshui/invoiceall/service/impl/InvoiceAllImpl.java index 11f68dd..39ee588 100644 --- a/jianshui-invoice-all/src/main/java/com/jianshui/invoiceall/service/impl/InvoiceAllImpl.java +++ b/jianshui-invoice-all/src/main/java/com/jianshui/invoiceall/service/impl/InvoiceAllImpl.java @@ -171,7 +171,7 @@ public class InvoiceAllImpl implements IInvoiceAll { } catch (Exception e) { e.printStackTrace(); - log.error("【金四服务类】【金财数科】【用户登记】API请求异常,外部报文返回code非0000。错误信息:{}", e.getMessage()); + log.error("【金四服务类】【金财数科】【用户登记】API请求异常,外部报文返回code非0000。错误信息:{}", e); return AjaxResult.error(ErrorCode.INCOME_ERROR); } diff --git a/jianshui-ui/dist.zip b/jianshui-ui/dist.zip deleted file mode 100644 index de54b09..0000000 Binary files a/jianshui-ui/dist.zip and /dev/null differ