张延森 3 年之前
父節點
當前提交
010e1a20b4

+ 2
- 2
pom.xml 查看文件

@@ -88,7 +88,7 @@
88 88
 		<dependency>
89 89
 			<groupId>com.github.binarywang</groupId>
90 90
 			<artifactId>weixin-java-miniapp</artifactId>
91
-			<version>4.2.0</version>
91
+			<version>4.3.0</version>
92 92
 		</dependency>
93 93
 		<!--weixin-miniapp start-->
94 94
 
@@ -101,7 +101,7 @@
101 101
 		<dependency>
102 102
 			<groupId>com.github.binarywang</groupId>
103 103
 			<artifactId>weixin-java-pay</artifactId>
104
-			<version>4.2.0</version>
104
+			<version>4.3.0</version>
105 105
 		</dependency>
106 106
 		<!--weixin-pay start-->
107 107
 

+ 8
- 8
src/main/java/com/njyunzhi/pet_identity/controller/TaApplicationController.java 查看文件

@@ -370,14 +370,14 @@ public class TaApplicationController extends BaseController {
370 370
         if (StringUtils.isEmpty(makeCardParam.getCardNo())) {
371 371
             return ResponseBean.error("卡号不能为空");
372 372
         } else {
373
-            TaCardNo taCardNo = iTaCardNoService.getUnuseCard(makeCardParam.getCardNo());
374
-            if (taCardNo != null) {
375
-                return ResponseBean.error("卡号无效或者已使用");
376
-            }
377
-
378
-            // 将卡号置为已使用
379
-            taCardNo.setStatus(Constants.STATUS_NORMAL);
380
-            iTaCardNoService.updateById(taCardNo);
373
+//            TaCardNo taCardNo = iTaCardNoService.getUnuseCard(makeCardParam.getCardNo());
374
+//            if (taCardNo != null) {
375
+//                return ResponseBean.error("卡号无效或者已使用");
376
+//            }
377
+//
378
+//            // 将卡号置为已使用
379
+//            taCardNo.setStatus(Constants.STATUS_NORMAL);
380
+//            iTaCardNoService.updateById(taCardNo);
381 381
 
382 382
             TaPetIdentity taPetIdentity = iTaPetIdentityService.getExistBy("card_no", makeCardParam.getCardNo(), false, true);
383 383
             if (null != taPetIdentity) {

+ 2
- 2
src/main/java/com/njyunzhi/pet_identity/controller/TaPetIdentityController.java 查看文件

@@ -154,8 +154,8 @@ public class TaPetIdentityController extends BaseController {
154 154
      */
155 155
     @RequestMapping(value="/wx/{clientId}/card/{id}",method= RequestMethod.GET)
156 156
     @ApiOperation(value="证件详情", notes = "证件详情", httpMethod = "GET", response = ResponseBean.class)
157
-    public ResponseBean taPetIdentityGet(@ApiParam("对象ID") @PathVariable String id) throws Exception{
158
-        TaPetIdentity taPetIdentity = iTaPetIdentityService.getExistBy("card_id", id, false, true);
157
+    public ResponseBean taPetIdentityGet(@ApiParam("证件号码") @PathVariable String id) throws Exception{
158
+        TaPetIdentity taPetIdentity = iTaPetIdentityService.getExistBy("card_no", id, false, true);
159 159
         if (null == taPetIdentity) {
160 160
             return ResponseBean.error("未找到证件信息");
161 161
         }

+ 1
- 0
src/main/java/com/njyunzhi/pet_identity/service/impl/TaCardNoServiceImpl.java 查看文件

@@ -43,6 +43,7 @@ public class TaCardNoServiceImpl extends ServiceImpl<TaCardNoMapper, TaCardNo> i
43 43
         if (StringUtils.isEmpty(cardNo)) return null;
44 44
 
45 45
         TaCardNo taCardNo = getById(cardNo);
46
+        if (null == taCardNo) return null;
46 47
 
47 48
         // 已经关联的无效
48 49
         if (Constants.STATUS_READY != taCardNo.getStatus()) return null;

+ 12
- 1
src/main/java/com/njyunzhi/pet_identity/service/impl/TaMiniappQrcodeServiceImpl.java 查看文件

@@ -39,6 +39,9 @@ public class TaMiniappQrcodeServiceImpl extends ServiceImpl<TaMiniappQrcodeMappe
39 39
     @Value("${weixin.miniapp.appid}")
40 40
     String miniAppid;
41 41
 
42
+    @Value("${yz.miniapp.qrEnv}")
43
+    String envVersion;
44
+
42 45
     @Override
43 46
     public TaMiniappQrcode createQRCode(String page, String scene) throws Exception {
44 47
         TaMiniappQrcode taMiniappQrcode = getByPageAndScene(page, scene);
@@ -79,7 +82,15 @@ public class TaMiniappQrcodeServiceImpl extends ServiceImpl<TaMiniappQrcodeMappe
79 82
      */
80 83
     private String buildMAQrCode(String page, String scene) throws WxErrorException, FileNotFoundException {
81 84
         WxMaQrcodeService qrcodeService = wxUtils.getMaService().getQrcodeService();
82
-        File qrFile = qrcodeService.createWxaCodeUnlimit(scene, page);
85
+        File qrFile = qrcodeService.createWxaCodeUnlimit(scene,
86
+                page,
87
+                false, // checkPath
88
+                envVersion,
89
+                430, // width
90
+                false, // autoColor
91
+                new WxMaCodeLineColor("0", "0", "0"), // lineColor
92
+                true // isHyaline 透明色
93
+                );
83 94
 
84 95
         return ossUtils.putObject(qrFile);
85 96
     }

+ 5
- 3
src/main/resources/application-prod.yml 查看文件

@@ -8,10 +8,12 @@ spring:
8 8
       max-file-size: 10MB
9 9
       max-request-size: 50MB
10 10
   datasource:
11
-    url: jdbc:mysql://rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com:3306/ubpa?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
12
-    username: ubpa
13
-    password: ubpa@ABCD1234
11
+    url: jdbc:mysql://110.40.183.156:3306/pet_identity?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
12
+    username: pet_identity
13
+    password: pet@ABCD1234
14 14
 
15 15
 yz:
16
+  miniapp:
17
+    qrEnv: release
16 18
   mode: prod
17 19
   cros: true

+ 1
- 0
src/main/resources/application.yml 查看文件

@@ -44,6 +44,7 @@ yz:
44 44
     servBase: https://pet-certificate-online.njyunzhi.com/api
45 45
   miniapp:
46 46
     qrpath: pages/qrcode/index
47
+    qrEnv: develop
47 48
   sms:
48 49
     ## ??????
49 50
     appid: ubpa