Browse Source

给自助机和体检开放微信二维码支付接口

lighter 3 years ago
parent
commit
6ec6a80a99

+ 35 - 0
.gitignore

@@ -0,0 +1,35 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+*.jar
+logs/

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>wxservice-server</artifactId>
-    <version>6.1</version>
+    <version>6.2</version>
     <name>wxservice-server</name>
     <description>server for wxservice-web</description>
 

+ 7 - 0
src/main/java/thyyxxk/wxservice_server/entity/inpatient/GetZyFeeParam.java

@@ -2,13 +2,20 @@ package thyyxxk.wxservice_server.entity.inpatient;
 
 import lombok.Data;
 
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
 /**
  * @author dj
  */
 @Data
 public class GetZyFeeParam {
+    @NotBlank(message = "住院号不能为空。")
     private String inpatientNo;
+    @NotNull(message = "住院次数不能为空。")
     private Integer admissTimes;
+    @NotBlank(message = "开始日期不能为空。")
     private String start;
+    @NotBlank(message = "结束日期不能为空。")
     private String end;
 }

+ 2 - 0
src/main/java/thyyxxk/wxservice_server/entity/wxapi/WxPyQrcdPrm.java

@@ -21,4 +21,6 @@ public class WxPyQrcdPrm {
     private String description;
     @NotNull(message = "订单类型不能为空。")
     private Integer orderType;
+    // WX, ZFB
+    private String payMode;
 }

+ 2 - 2
src/main/java/thyyxxk/wxservice_server/service/WxApiService.java

@@ -192,7 +192,6 @@ public class WxApiService {
         }
         TradeVectorUtil.add(tradeNo);
         JSONObject obj = retryService.queryOrderStateFromTencent(tradeNo);
-        dao.incrementQueryTimesByTradeNo(tradeNo);
         String tradeState = obj.getString("trade_state");
         if ("SUCCESS".equals(tradeState)) {
             String successTime = obj.getString("success_time")
@@ -219,6 +218,7 @@ public class WxApiService {
                     break;
             }
             TradeVectorUtil.remove(tradeNo);
+            dao.incrementQueryTimesByTradeNo(tradeNo);
             return CompletableFuture.completedFuture(saveRet);
         }
         String message;
@@ -256,6 +256,7 @@ public class WxApiService {
                 break;
         }
         TradeVectorUtil.remove(tradeNo);
+        dao.incrementQueryTimesByTradeNo(tradeNo);
         return CompletableFuture.completedFuture(ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR, message));
     }
 
@@ -338,7 +339,6 @@ public class WxApiService {
         httpPost.setEntity(entity);
         httpPost.addHeader("Content-Type", "application/json;charset=UTF-8");
         httpPost.addHeader("Accept", "application/json");
-        //完成签名并执行请求
         CloseableHttpClient httpClient = WxHttpUtil.getClosableHttpClient();
         CloseableHttpResponse response = httpClient.execute(httpPost);
         int statusCode = response.getStatusLine().getStatusCode();

+ 7 - 6
src/main/resources/application-prod.yml

@@ -1,5 +1,5 @@
 server:
-  port: 8083
+  port: 8085
   servlet:
     context-path: /wxserver
 spring:
@@ -12,13 +12,14 @@ spring:
     hikari:
       username: sa
       password:
-      minimum-idle: 5
-      idle-timeout: 180000
-      maximum-pool-size: 8
+      minimum-idle: 10
+      idle-timeout: 60000
+      maximum-pool-size: 30
       auto-commit: true
-      pool-name: MyHikariCP
+      pool-name: DJHikariCP
       connection-timeout: 30000
-      connection-test-query: select 1
+      validation-timeout: 3000
+      max-lifetime: 60000
   jackson:
     time-zone: GMT+8
     date-format: yyyy-MM-dd HH:mm:ss

+ 1 - 2
src/main/resources/application.yml

@@ -31,6 +31,5 @@ mybatis:
   configuration:
     map-underscore-to-camel-case: true
 
-#hrgApiUrl: http://172.16.30.33:8089/thmz/api/v1
-hrgApiUrl: http://webhis.thyy.cn:81/thmz/api/v1
+hrgApiUrl: http://172.16.30.33:8089/thmz/api/v1
 inspectionUrl: http://172.16.32.178:622/pushservice.asmx?wsdl

+ 1 - 16
src/main/resources/weChatOfficialAccounts.properties

@@ -1,14 +1,7 @@
 osName=
 access_token=
 ticket=
-#长沙泰和医院1
-#appId=wx19fc85fd5bfcc164
-#appSecret=ffdf6f4ae704d374966dfb82bc300257
-#mchId=1375971802
-#mchKey=zxKl2oaid8KXA8dkai2DKk23ZIQE2X2e
-#mchApiV3Key=ialfilajiDOAJLJ7232Lzlcjiw2s32dz
 
-#湖南泰和医院
 appId=wxbde6b16acad84204
 appSecret=57026648f9a5771f2a5deb34ef5212dc
 mchId=1574204121
@@ -17,14 +10,6 @@ mchApiV3Key=zxkkOIL9Z909lkjl2lzczi2KLsol2wct
 mchSerialNo=6574E696C4DB0B93EBD0D29B5DE809F31E04FC6D
 notifyUrl=http://staticweb.hnthyy.cn/wxserver/wxPayNotify/notify
 
-#企业微信
 qywxCorpId=wwf0b23c8b36012b34
 qywxSecret=wpHuNePfiDyotmpXjy5hUYGF0w8Ks5OPHSQp22z8oBk
-qywxToken=
-
-#配置解释
-#appId=公众号的开发者ID(AppID)
-#appSecret=公众号的开发者密码(AppSecret)
-#mchId=微信支付商户号
-#mchKey=商户号的API密钥
-#mchApiV3Key=商户号的APIv3密钥
+qywxToken=