postman发送post请求,用获取请求参数

时间:2025-03-03 07:31:22
@RequestMapping("notifyUrl")
  public void notifyUrl(HttpServletRequest request, HttpServletResponse response) {
    String transactionId = ("transaction_id");
    String contractId = ("contract_id");
    String resultCode = ("result_code"); // 3000(签章成功)3001(签章失败)
    String resultDesc = ("result_desc");
    String timestamp = ("timestamp");
    String msgDigest = ("msg_digest");// Base64( SHA1(
                                                          // app_id+MD5(timestamp)+SHA1(app_secret+transaction_id)
    // ) ) 建议接入
    ("异步通知参数");
    ("transactionId= {}", transactionId);
    ("contractId = {}", contractId);
    ("resultCode = {}", resultCode);
    ("resultDesc = {}", resultDesc);
    ("timestamp = {}", timestamp);
    ("msgDigest = {}", msgDigest);
    try {
      String msgDigestSelf = new String(FddEncryptTool.Base64Encode(FddEncryptTool
          .sha1(appId + FddEncryptTool.md5Digest(timestamp) + FddEncryptTool.sha1(secret + transactionId)).getBytes()));
      if (!(msgDigestSelf, msgDigest)) {
        ("校验失败! {}", msgDigest);
        return;
      }
    } catch (Exception e) {
      ("{}", e);
    }
    // TODO 根据transactionId 判断是客户签署还是公司签署,回写当前合同签署状态.
    TblContractPre entity = (contractId);
    if ((entity != null) && ((()))) {
      if ((())) { // 客户签署
        (contractId);
      }
    }
  }