From 94e9dc3adb80baf6e1d7d56e54a93917996bc339 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期日, 28 四月 2024 11:21:49 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- rest/src/main/resources/application-prod.yml | 10 ++++++++-- rest/src/main/resources/application.yml | 11 +++++++++-- rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java | 8 +++++--- guns/src/main/resources/application-prod.yml | 4 ++-- rest/src/main/resources/ijpay/wxpay.properties | 4 ++-- rest/src/main/resources/ijpay/alipay.properties | 2 +- 6 files changed, 27 insertions(+), 12 deletions(-) diff --git a/guns/src/main/resources/application-prod.yml b/guns/src/main/resources/application-prod.yml index 0c39a9c..1f8482b 100644 --- a/guns/src/main/resources/application-prod.yml +++ b/guns/src/main/resources/application-prod.yml @@ -2,7 +2,7 @@ spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://192.168.0.33:8306/xlzx?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true + url: jdbc:mysql://192.168.0.84:8306/xlzx?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true username: root password: Root2024! @@ -11,7 +11,7 @@ max-pool-prepared-statement-per-connection-size: 100 redis: - host: 192.168.0.33 #地址 + host: 192.168.0.84 #地址1.95.42.247 port: 8379 #端口 password: RediS2018 timeout: 10000 # 连接超时时间(毫秒) diff --git a/rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java b/rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java index 926eb8b..45ffed8 100644 --- a/rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java +++ b/rest/src/main/java/cn/stylefeng/rest/modular/user/controller/CounsellingInfoController.java @@ -624,10 +624,12 @@ if (counsellingOrder == null){ throw new ServiceException("没有在咨询的订单,无法进行预约!"); } - RLock lock = redissonClient.getLock("counsel:" + counsellingReservationRequest.getCounsellingId()+"_"+counsellingReservationRequest.getDayTime()+"_"+counsellingReservationRequest.getTimePoint()); + String key = "counsel:" + counsellingReservationRequest.getCounsellingId()+"_"+counsellingReservationRequest.getDayTime()+"_"+counsellingReservationRequest.getTimePoint(); + RLock lock = redissonClient.getLock(key); boolean tryLock = false; try { - tryLock = lock.tryLock(10, TimeUnit.SECONDS); + log.info("咨询key:"+key+",userId:"+counsellingOrder.getUserId()); + tryLock = lock.tryLock(20, TimeUnit.SECONDS); if (!tryLock) { throw new ServiceException("当前时间段已预约,请选择其他时间段!"); } @@ -796,7 +798,7 @@ return new SuccessResponseData<>(counsellingOrderReservation); }catch (Exception ex){ log.error("咨询预约服务异常",ex.getStackTrace()); - throw new ServiceException("服务异常,请稍后再试"); + throw new ServiceException("当前时间段已在进行预约,请稍后再试!"); }finally { if(tryLock){ lock.unlock(); diff --git a/rest/src/main/resources/application-prod.yml b/rest/src/main/resources/application-prod.yml index 0c39a9c..5d45f2e 100644 --- a/rest/src/main/resources/application-prod.yml +++ b/rest/src/main/resources/application-prod.yml @@ -2,7 +2,7 @@ spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://192.168.0.33:8306/xlzx?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true + url: jdbc:mysql://192.168.0.84:8306/xlzx?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=CTT&nullCatalogMeansCurrent=true username: root password: Root2024! @@ -11,7 +11,7 @@ max-pool-prepared-statement-per-connection-size: 100 redis: - host: 192.168.0.33 #地址 + host: 192.168.0.84 #地址1.95.42.247 port: 8379 #端口 password: RediS2018 timeout: 10000 # 连接超时时间(毫秒) @@ -23,3 +23,9 @@ max-idle: 10 # 连接池中的最大空闲连接 min-idle: 0 # 连接池中的最小空闲连接 time-between-eviction-runs: -1 #逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1 + +# 支付环境域名(回调-prod) +alipay: + domain: http://m.xintongtong.cn:8081/rest +wxpay: + domain: http://m.xintongtong.cn:8081/rest \ No newline at end of file diff --git a/rest/src/main/resources/application.yml b/rest/src/main/resources/application.yml index 69ca016..ba07a03 100644 --- a/rest/src/main/resources/application.yml +++ b/rest/src/main/resources/application.yml @@ -84,6 +84,13 @@ sk: e1XiZRPT4cADyT3G0NI7Gqktid9DZzD9kxUIcx6X bucket-name: xlzx +# 支付环境域名(回调-test) +alipay: + domain: http://1.95.0.51:8081/rest +wxpay: + domain: http://1.95.0.51:8081/rest + refund: - alipay-url: http://1.95.0.51:8081/rest/aliPay/notLogin/tradeRefund - wxpay-url: http://1.95.0.51:8081/rest/wxPay/notLogin/refund + alipay-url: ${alipay:domain}/aliPay/notLogin/tradeRefund + wxpay-url: ${wxpay:domain}/wxPay/notLogin/refund + diff --git a/rest/src/main/resources/ijpay/alipay.properties b/rest/src/main/resources/ijpay/alipay.properties index 4229fca..6bba817 100644 --- a/rest/src/main/resources/ijpay/alipay.properties +++ b/rest/src/main/resources/ijpay/alipay.properties @@ -5,4 +5,4 @@ alipay.aliPayCertPath=\u652F\u4ED8\u5B9D\u516C\u94A5\u8BC1\u4E66 alipay.aliPayRootCertPath=\u652F\u4ED8\u5B9D\u6839\u8BC1\u4E66 alipay.serverUrl=https://openapi.alipay.com/gateway.do -alipay.domain=http://www.xintongtong.cn:8081/rest \ No newline at end of file +#alipay.domain=http://www.xintongtong.cn:8081/rest \ No newline at end of file diff --git a/rest/src/main/resources/ijpay/wxpay.properties b/rest/src/main/resources/ijpay/wxpay.properties index de2974b..14428b0 100644 --- a/rest/src/main/resources/ijpay/wxpay.properties +++ b/rest/src/main/resources/ijpay/wxpay.properties @@ -2,8 +2,8 @@ wxpay.appSecret=7d8845342e3af5b5ff2289b55eccd716 wxpay.mchId=1675018573 wxpay.partnerKey=H8JdzeF35n2yTRfNk2WnZxEtbY3aB8P0 -# wxpay.partnerKey=mQQc4irkRkKp0B25cnPWthHc9YbByJy9 +#wxpay.partnerKey=mQQc4irkRkKp0B25cnPWthHc9YbByJy9 wxpay.certPath=/ijpay/cert/apiclient_cert.p12 -wxpay.domain=http://www.xintongtong.cn:8081/rest +#wxpay.domain=http://www.xintongtong.cn:8081/rest wxpay.worker.appId=wx360336f91d289d52 wxpay.worker.appSecret=9022c6a2e8d628e85c99fa787313a79e \ No newline at end of file -- Gitblit v1.7.1