From ffa70a1adfcbc62f1d2f34d4e6e0003cd92186dd Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 10 Jun 2022 11:24:03 +0800
Subject: [PATCH] ftp  上传下载设置连接超时时间

---
 src/main/java/org/springblade/modules/system/service/MyAsyncService.java |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/service/MyAsyncService.java b/src/main/java/org/springblade/modules/system/service/MyAsyncService.java
index 3456245..c968340 100644
--- a/src/main/java/org/springblade/modules/system/service/MyAsyncService.java
+++ b/src/main/java/org/springblade/modules/system/service/MyAsyncService.java
@@ -1,10 +1,13 @@
 package org.springblade.modules.system.service;
 
+import com.alibaba.fastjson.JSON;
 import net.sf.json.JSONObject;
 import org.springblade.common.utils.HttpClientUtils;
 import org.springblade.modules.FTP.FtpUtil;
+import org.springblade.modules.FTP.Result;
 import org.springblade.modules.system.dto.UserDTO;
 import org.springblade.modules.system.entity.User;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.scheduling.annotation.Async;
 import org.springframework.stereotype.Service;
 
@@ -13,6 +16,7 @@
 import java.util.Map;
 
 import static org.springblade.common.config.FtpConfig.qfqkBaseApiUrl;
+import static org.springblade.modules.FTP.DataHandler.handlerUserInfo;
 
 @Service
 public class MyAsyncService {
@@ -35,10 +39,12 @@
 		userDTO.setPhone(user.getPhone());
 		userDTO.setIsDeleted(user.getIsDeleted());
 		userDTO.setRealName(user.getRealName());
+		userDTO.setSecurityId(user.getId().toString());
 		//装换为 json
 		JSONObject jsonObject = JSONObject.fromObject(userDTO);
 		//发送请求
 		try {
+			System.out.println("发起异步推送qfqk----用户新增");
 			HttpClientUtils.httpPostWithjson(requestUrl,jsonObject.toString());
 			System.out.println("用户新增请求已发送....");
 		} catch (IOException e) {
@@ -62,10 +68,12 @@
 		userDTO.setSex(user.getSex());
 		userDTO.setAvatar(user.getAvatar());
 		userDTO.setExamination_type(user.getExaminationType());
+		userDTO.setSecurityId(user.getId().toString());
 		//装换为 json
 		JSONObject jsonObject = JSONObject.fromObject(userDTO);
 		//发送请求
 		try {
+			System.out.println("发起异步推送qfqk----用户更新");
 			HttpClientUtils.httpPostWithjson(requestUrl,jsonObject.toString());
 		} catch (IOException e) {
 			e.printStackTrace();
@@ -125,6 +133,16 @@
 
 
 	/**
+	 * 用户审查FTP
+	 * @param user
+	 */
+	@Async
+	public void userExamineFTP(User user) {
+		FtpUtil.sqlFileUploadUserExamine(user);
+	}
+
+
+	/**
 	 * test
 	 * @param user
 	 */
@@ -156,6 +174,7 @@
 			userDTO.setPhone(user.getPhone());
 			userDTO.setIsDeleted(user.getIsDeleted());
 			userDTO.setRealName(user.getRealName());
+			userDTO.setSecurityId(user.getId().toString());
 			//装换为 json
 			JSONObject jsonObject = JSONObject.fromObject(userDTO);
 			//发送请求
@@ -183,4 +202,12 @@
 	public void FTPObjectListUserId(Map<String, Object> map) {
 		FtpUtil.objectFileUploadListUserId(map);
 	}
+
+	/**
+	 * 查询保安员证编号位数
+	 * @param map
+	 */
+	public void FTPSecurityNumberBit(Map<String, Object> map) {
+		FtpUtil.getSecurityNumberBit(map);
+	}
 }

--
Gitblit v1.9.3