Commit 52a23ed3 by 崔彦峰

modify: 提交优加回调接口。

1 parent 10b7b3f6
...@@ -29,6 +29,9 @@ public class ESignNotifyController extends HttpServlet { ...@@ -29,6 +29,9 @@ public class ESignNotifyController extends HttpServlet {
@Value("${esign.appKey}") @Value("${esign.appKey}")
private String appSecret; private String appSecret;
@Value("${yjzhEsign.appKey}")
private String yjzhAppSecret;
@Autowired @Autowired
private ESignRemote esignRemote; private ESignRemote esignRemote;
...@@ -50,4 +53,19 @@ public class ESignNotifyController extends HttpServlet { ...@@ -50,4 +53,19 @@ public class ESignNotifyController extends HttpServlet {
return Map.of("code", "200", "msg", "success"); return Map.of("code", "200", "msg", "success");
} }
@PostMapping("/yjzhNotify")
public Map<String, String> yjzhEsignNotify(@RequestBody String param, HttpServletRequest request) throws IOException {
log.info("yjzhEsignNotify param:{}", param);
if (StringUtils.isBlank(param)) {
return Map.of("code", "500", "msg", "fail");
}
SafeVerify sv = new SafeVerify();
String res =sv.checkPass(param, request, yjzhAppSecret);
if (!res.equals("true")) {
return Map.of("code", "500", "msg", "fail");
}
esignRemote.notify(param);
return Map.of("code", "200", "msg", "success");
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!