张延森 3 anos atrás
pai
commit
010e1a20b4

+ 2
- 2
pom.xml Ver arquivo

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

+ 8
- 8
src/main/java/com/njyunzhi/pet_identity/controller/TaApplicationController.java Ver arquivo

370
         if (StringUtils.isEmpty(makeCardParam.getCardNo())) {
370
         if (StringUtils.isEmpty(makeCardParam.getCardNo())) {
371
             return ResponseBean.error("卡号不能为空");
371
             return ResponseBean.error("卡号不能为空");
372
         } else {
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
             TaPetIdentity taPetIdentity = iTaPetIdentityService.getExistBy("card_no", makeCardParam.getCardNo(), false, true);
382
             TaPetIdentity taPetIdentity = iTaPetIdentityService.getExistBy("card_no", makeCardParam.getCardNo(), false, true);
383
             if (null != taPetIdentity) {
383
             if (null != taPetIdentity) {

+ 2
- 2
src/main/java/com/njyunzhi/pet_identity/controller/TaPetIdentityController.java Ver arquivo

154
      */
154
      */
155
     @RequestMapping(value="/wx/{clientId}/card/{id}",method= RequestMethod.GET)
155
     @RequestMapping(value="/wx/{clientId}/card/{id}",method= RequestMethod.GET)
156
     @ApiOperation(value="证件详情", notes = "证件详情", httpMethod = "GET", response = ResponseBean.class)
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
         if (null == taPetIdentity) {
159
         if (null == taPetIdentity) {
160
             return ResponseBean.error("未找到证件信息");
160
             return ResponseBean.error("未找到证件信息");
161
         }
161
         }

+ 1
- 0
src/main/java/com/njyunzhi/pet_identity/service/impl/TaCardNoServiceImpl.java Ver arquivo

43
         if (StringUtils.isEmpty(cardNo)) return null;
43
         if (StringUtils.isEmpty(cardNo)) return null;
44
 
44
 
45
         TaCardNo taCardNo = getById(cardNo);
45
         TaCardNo taCardNo = getById(cardNo);
46
+        if (null == taCardNo) return null;
46
 
47
 
47
         // 已经关联的无效
48
         // 已经关联的无效
48
         if (Constants.STATUS_READY != taCardNo.getStatus()) return null;
49
         if (Constants.STATUS_READY != taCardNo.getStatus()) return null;

+ 12
- 1
src/main/java/com/njyunzhi/pet_identity/service/impl/TaMiniappQrcodeServiceImpl.java Ver arquivo

39
     @Value("${weixin.miniapp.appid}")
39
     @Value("${weixin.miniapp.appid}")
40
     String miniAppid;
40
     String miniAppid;
41
 
41
 
42
+    @Value("${yz.miniapp.qrEnv}")
43
+    String envVersion;
44
+
42
     @Override
45
     @Override
43
     public TaMiniappQrcode createQRCode(String page, String scene) throws Exception {
46
     public TaMiniappQrcode createQRCode(String page, String scene) throws Exception {
44
         TaMiniappQrcode taMiniappQrcode = getByPageAndScene(page, scene);
47
         TaMiniappQrcode taMiniappQrcode = getByPageAndScene(page, scene);
79
      */
82
      */
80
     private String buildMAQrCode(String page, String scene) throws WxErrorException, FileNotFoundException {
83
     private String buildMAQrCode(String page, String scene) throws WxErrorException, FileNotFoundException {
81
         WxMaQrcodeService qrcodeService = wxUtils.getMaService().getQrcodeService();
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
         return ossUtils.putObject(qrFile);
95
         return ossUtils.putObject(qrFile);
85
     }
96
     }

+ 5
- 3
src/main/resources/application-prod.yml Ver arquivo

8
       max-file-size: 10MB
8
       max-file-size: 10MB
9
       max-request-size: 50MB
9
       max-request-size: 50MB
10
   datasource:
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
 yz:
15
 yz:
16
+  miniapp:
17
+    qrEnv: release
16
   mode: prod
18
   mode: prod
17
   cros: true
19
   cros: true

+ 1
- 0
src/main/resources/application.yml Ver arquivo

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