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