Bläddra i källkod

Merge remote-tracking branch 'origin/master'

wxg 3 år sedan
förälder
incheckning
40b91795ad

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 0 - 0
fyzd-phone/logs/winxin-fyzd.log


+ 4 - 1
fyzd-phone/src/main/java/com/yx/face/boot/uitls/MiniOUtils.java

@@ -22,6 +22,9 @@ import java.text.SimpleDateFormat;
 @Component
 public class MiniOUtils {
 
+//    @Value("${web.address}")
+    private static final String ip = "https://ldb-airport.hz-hanghui.com:9100/img/";
+
 //    /**
 //     * ACCESS_KEY
 //     */
@@ -123,7 +126,7 @@ public class MiniOUtils {
         } catch (Exception e) {
             new RuntimeException("上传发生错误!");
         }
-        return minioUrl + bucketName + "/" + fileName;
+        return ip + bucketName + "/" + fileName;
     }
 
     /**

+ 7 - 19
fyzd-phone/src/main/resources/application-prod.yml

@@ -40,24 +40,24 @@ logging:
 # minio 参数配置
 
 # 存储服务器
-MINIO_PATH_URL: http://192.168.9.187:9000
+MINIO_PATH_URL: http://222.85.198.43:9102
 #存储文件块
 MINIO_OSS_BUCKET: hanghui
 #账号
-MINIO_ACCESS_KEY: admin
+MINIO_ACCESS_KEY: hanghui
 #密码
-MINIO_SECRET_KEY: nqj##3961
+MINIO_SECRET_KEY: nqj##361
 
 ##``````````````````````````````````` 微信小程序配置``````````````````````````````````````````````````````````````###
 wx:
   miniapp:
     configs:
-      - appid: wx4abbcffd7abc80b8
-        secret:  460651003eecb2d27cad6f15e95b09f9
+      - appid: wx1d8658b9d9597284
+        secret:  1a39f8be0b2d84a3176cb3c74a6dd222
         token: #微信小程序消息服务器配置的token
         aesKey: #微信小程序消息服务器配置的EncodingAESKey
         msgDataFormat: JSON
-weixin.appid: wx4abbcffd7abc80b8
+weixin.appid: wx1d8658b9d9597284
 ##``````````````````````````````````` 在线文档 配置``````````````````````````````````````````````````````````````###
 swagger:
   enable: true
@@ -70,16 +70,4 @@ knife4j:
     ## Basic认证密码
     password: fyzd
 ##``````````````````````````````````` 上传文件 配置``````````````````````````````````````````````````````````````###
-file.upload.path: file/
-file.upload.path.relative: /file/**
-web.address: https://fyzd.gzdata.com.cn:9100/fyzd/
-
-
-##``````````````````````````````````` 人脸服务 配置``````````````````````````````````````````````````````````````###
-face.service.tb: http://10.61.107.140:1820
-
-
-
-
-#定时任务 每5分钟
-cron.face.clear.user: 0 1/5 * * * ?
+web.address: https://ldb-airport.hz-hanghui.com:9100/img/

+ 1 - 1
pom.xml

@@ -205,7 +205,7 @@
 
 
     <build>
-        <finalName>hanghui-fyzd</finalName>
+        <finalName>ldb-airport-master</finalName>
         <!--加上这个才能打包时将静态资源打进去-->
         <resources>
             <resource>

+ 2 - 2
src/main/java/com/yx/face/boot/uitls/FileUploadUtil.java

@@ -11,8 +11,8 @@ package com.yx.face.boot.uitls;
  */
 public class FileUploadUtil {
 
-//    private static final String url = "http://10.61.107.140:9810/winxin-fyzd/fyzd/file/";
-    private static final String url = "http://127.0.0.1:9810/winxin-fyzd/fyzd/file/";
+    private static final String url = "http://192.168.99.11:9810/winxin-fyzd/fyzd/file/";
+//    private static final String url = "http://127.0.0.1:9810/winxin-fyzd/fyzd/file/";
 
     /**
      * 文件上传

+ 0 - 2
src/main/java/com/yx/face/service/UserInfoService.java

@@ -35,7 +35,5 @@ public interface UserInfoService {
 
     Map<String, Object> doGetFacePass(Integer userId, String taskId);
 
-    Boolean triggerRetry(Map<String, Object> params);
-
 }
 

+ 7 - 35
src/main/java/com/yx/face/service/impl/UserInfoServiceImpl.java

@@ -24,6 +24,7 @@ import com.yx.face.service.UserInfoService;
 import com.yx.face.service.feign.TBDeviceFaceService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.CollectionUtils;
@@ -73,9 +74,13 @@ public class UserInfoServiceImpl implements UserInfoService {
     @Autowired
     private AsyncTriggerRetryImpl asyncTriggerRetryImpl;
 
+//    @Value("${wx.phone.url}")
+    private static final String wxUrl = "http://192.168.99.11:9012/winxin-fyzd/weiXin/getPhone";
+
     @Override
     public String getWxPhone(WxInfoDTO dto) {
-        String sync = OkHttpUtils.builder().url("http://10.61.107.140:9810/winxin-fyzd/weiXin/getPhone")
+
+        String sync = OkHttpUtils.builder().url(wxUrl)
                 // 有参数的话添加参数,可多个
                 .addParam("code", dto.getCode())
                 .addParam("signature", dto.getSignature())
@@ -342,7 +347,7 @@ public class UserInfoServiceImpl implements UserInfoService {
                 //人脸下发
                 //添加人脸
                 facePassDao.insertSelective(facePass);
-                asyncTriggerRetryImpl.send(params,facePass);
+                asyncTriggerRetryImpl.send(params, facePass);
 
                 faceTaskId = faceTaskDao.getFaceTaskId(device.getSn(), userInfo.getId());
                 faceTask = new FaceTask();
@@ -414,38 +419,5 @@ public class UserInfoServiceImpl implements UserInfoService {
         }
         return path;
     }
-
-    //发送失败重试三次
-    @Override
-    public Boolean triggerRetry(Map<String, Object> params) {
-        Map<String, Object> result = new HashMap<>();
-        int times = 1;
-        while (times <= 3) {
-            try {
-                Thread.sleep(1000 * 20);   // 休眠20秒
-                result = tbDeviceFaceService.downUser(params);
-                log.info("下发人脸重试downFace = {} 重试次数 {}", params, times);
-                if (result.get("msg") != null) {
-                    String msg = result.get("msg").toString();
-                    if (msg.contains("不在线")) {
-                        times++;
-                    } else {
-                        //代表成功
-                        times = 6;
-                    }
-                } else {
-                    times++;
-                }
-            } catch (Exception e) {
-                times++;
-                log.info("下发失败 原因 {}", e.getMessage());
-            }
-        }
-        //成功
-        if (times == 6) {
-            return true;
-        }
-        return false;
-    }
 }
 

+ 18 - 14
src/main/resources/application-prod.yml

@@ -1,7 +1,7 @@
 server:
-  port: 9100
+  port: 9200
   servlet:
-    context-path: /fyzd
+    context-path: /ldb-airport
     session:
       persistent: false
 
@@ -12,16 +12,16 @@ server:
       max: 20
 spring:
   application:
-    name: /fyzd
+    name: /ldb-airport-master
   jackson:
     date-format: yyyy-MM-dd HH:mm:ss
     default-property-inclusion: non_null
     time-zone: GMT+8
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://rm-9vcwh3chy10jo90xk.mysql.rds.ltops.gzdata.com.cn:3306/fyzd?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
-    username: ysgz_fyzd
-    password: QAZwsx123
+    url: jdbc:mysql://192.168.99.12:3306/ldb_airport?characterEncoding=utf8&autoReconnect=true&allowMultiQueries=true&useSSL=false&serverTimezone=Asia/Shanghai
+    username: root
+    password: nqj##361
     hikari:
       maximum-pool-size: 10
       minimum-idle: 5
@@ -48,7 +48,7 @@ spring:
         min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
       shutdown-timeout: 100ms
     password: ''
-    port: 6379
+    port: 6380
 
 logging:
   file:
@@ -79,12 +79,12 @@ mapper. mappers: com.yx.face.boot.component.tk.TKMapper
 wx:
   miniapp:
     configs:
-      - appid: wx4abbcffd7abc80b8
-        secret:  460651003eecb2d27cad6f15e95b09f9
+      - appid: wx1d8658b9d9597284
+        secret: 1a39f8be0b2d84a3176cb3c74a6dd222
         token: #微信小程序消息服务器配置的token
         aesKey: #微信小程序消息服务器配置的EncodingAESKey
         msgDataFormat: JSON
-weixin.appid: wx4abbcffd7abc80b8
+weixin.appid: wx1d8658b9d9597284
 ##``````````````````````````````````` 在线文档 配置``````````````````````````````````````````````````````````````###
 swagger:
   enable: true
@@ -93,17 +93,21 @@ knife4j:
   basic:
     enable: true
     ## Basic认证用户名
-    username: fyzd
+    username: ldbAirport
     ## Basic认证密码
-    password: fyzd
+    password: ldbAirport
+
+
+##-----------------------------------------微信
+wx.phone.url: http://192.168.99.11:9012/winxin-fyzd/weiXin/getPhone
 ##``````````````````````````````````` 上传文件 配置``````````````````````````````````````````````````````````````###
 file.upload.path: file/
 file.upload.path.relative: /file/**
-web.address: https://fyzd.gzdata.com.cn:9100/fyzd/
+web.address: https://ldb-airport.hz-hanghui.com:9100/ldb-airport/
 
 
 ##``````````````````````````````````` 人脸服务 配置``````````````````````````````````````````````````````````````###
-face.service.tb: http://10.61.107.140:1820
+face.service.tb: http://192.168.99.11:1820
 
 #定时任务 每5分钟
 cron.face.clear.user: 0 1/5 * * * ?

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

@@ -1,3 +1,3 @@
 spring:
   profiles:
-    active: dev
+    active: prod

+ 1 - 0
src/main/webapp/static/V9IMRdF6Ii.txt

@@ -0,0 +1 @@
+ccdcc6dffd6df72ba19cbfe28eb261a6

+ 0 - 1
src/main/webapp/static/zIYsxNJTaP.txt

@@ -1 +0,0 @@
-f4d9b2092ff399944f4e9496ea68ed70

Vissa filer visades inte eftersom för många filer har ändrats