From 17fa2006cec012005debd48cacb923062aca2649 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Sat, 12 Aug 2023 00:54:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A2=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bweb/src/main/resources/dev/application.yml | 2 +- .../src/main/java/com/api/controller/v1/TradeController.java | 4 ++-- .../main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bweb/src/main/resources/dev/application.yml b/bweb/src/main/resources/dev/application.yml index 7e59886..1f85468 100644 --- a/bweb/src/main/resources/dev/application.yml +++ b/bweb/src/main/resources/dev/application.yml @@ -9,7 +9,7 @@ debug: false #datasource数据源设置 spring: datasource: - url: jdbc:mysql://139.9.154.68:3306/gratia_pay_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://139.9.154.68:3306/gratia_pay?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: HF123456. type: com.alibaba.druid.pool.DruidDataSource diff --git a/open-api/src/main/java/com/api/controller/v1/TradeController.java b/open-api/src/main/java/com/api/controller/v1/TradeController.java index 0911ff4..f6f3a29 100644 --- a/open-api/src/main/java/com/api/controller/v1/TradeController.java +++ b/open-api/src/main/java/com/api/controller/v1/TradeController.java @@ -332,8 +332,8 @@ public class TradeController { if (!SignatureUtil.checkSign(body.getSign(), body, merKeyService.getKeyByMerNo(body.getMerchantNo()))) { throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.OPEN_API_SIGN_ERR, ""); } - // 最大周期范围1个月 30天 - Long maxTime = 60*24*30L; + // 最大周期范围1个月 31天 + Long maxTime = 60*24*31L; if (maxTime.compareTo(DateUtil.getMinutesDiff(new Date(body.getBillDateS()), new Date(body.getBillDateE()))) < 0) { throw ErrorHelp.genException(SysCode.OpenApi, ErrorCode.OPEN_API_COMMON, "时间范围大于1个月"); } diff --git a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java index 97b793a..b9a6594 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java +++ b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java @@ -83,8 +83,8 @@ public class SignatureUtil { public static void main(String[] args) throws Exception { String paramStr = "{\n" + " \"merchantNo\": \"2023051910562136809\",\n" + - " \"billDateS\": 1690819200000,\n" + - " \"billDateE\": 1691078400000" + + " \"billDateS\": 1688918400000,\n" + + " \"billDateE\": 1691596800000\n" + "}"; String sign = createSign(JSONObject.parseObject(paramStr), "NGixVhkzVYFFMj8tjj4zOkYQtUiU3bd4"); System.out.println(sign);