浏览代码

修改url

cuimengchao 3 年之前
父节点
当前提交
c117b4a7bc

+ 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;
     }
 
     /**

+ 4 - 16
fyzd-phone/src/main/resources/application-prod.yml

@@ -40,13 +40,13 @@ 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:
@@ -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/

+ 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);
-
 }
 

+ 6 - 34
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 String wxUrl;
+
     @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())
@@ -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;
-    }
 }
 

+ 4 - 0
src/main/resources/application-prod.yml

@@ -96,6 +96,10 @@ knife4j:
     username: fyzd
     ## Basic认证密码
     password: fyzd
+
+
+##-----------------------------------------微信
+wx.phone.url: http://192.168.99.11:9012/winxin-fyzd/weiXin/getPhone
 ##``````````````````````````````````` 上传文件 配置``````````````````````````````````````````````````````````````###
 file.upload.path: file/
 file.upload.path.relative: /file/**