From 7b291d619aa70e5bb33f2b1caabe7f4b0bd003d9 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 10 Jun 2022 17:28:15 +0800
Subject: [PATCH] 制证数据更新

---
 src/main/java/org/springblade/modules/FTP/FtpUtil.java |   34 ++++++++++++++++++++++++++--------
 1 files changed, 26 insertions(+), 8 deletions(-)

diff --git a/src/main/java/org/springblade/modules/FTP/FtpUtil.java b/src/main/java/org/springblade/modules/FTP/FtpUtil.java
index 8473c3a..85eba10 100644
--- a/src/main/java/org/springblade/modules/FTP/FtpUtil.java
+++ b/src/main/java/org/springblade/modules/FTP/FtpUtil.java
@@ -362,22 +362,40 @@
 	}
 
 	/**
-	 * 执行 对象数据(用户,报名对象信息等) 上传
-	 * @param obj 对象信息
+	 * 执行sql 上传,推送审查结果,json 命名用户id相同的文件名称一致
+	 * @param obj sql
+	 * @param id 用户id
 	 */
-	public static void objectFileUpload(Object obj){
+	public static void sqlFileUploadUserExamine(String obj,String id){
 		String json1 = JSON.toJSONString(obj);
-		String response1 = String.valueOf((new Date()).getTime());
-		OutJson.createJsonFile(json1, localPath, "ni"+response1);
+		OutJson.createJsonFile(json1, localPath, "nq"+id);
 		FileInputStream in1 = null;
 		try {
-			in1 = new FileInputStream(new File(localPath + "ni"+response1+".json"));
+			in1 = new FileInputStream(new File(localPath + "nq"+id+".json"));
 		} catch (FileNotFoundException e) {
 			e.printStackTrace();
 		}
-		FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserNameOut, ftpPasswordOut, ftpPath, "/",  "ni"+response1+".json", in1);
+		FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserNameOut, ftpPasswordOut, ftpPath, "/",  "nq"+id+".json", in1);
+		MysqlCenlint.deletess("nq"+id+".json");
+	}
+
+	/**
+	 * 执行 对象数据(用户,报名对象信息等) 上传
+	 * @param obj 对象信息
+	 * @param uuid
+	 */
+	public static void objectFileUpload(Object obj,String uuid){
+		String json1 = JSON.toJSONString(obj);
+		OutJson.createJsonFile(json1, localPath, "ni"+uuid);
+		FileInputStream in1 = null;
+		try {
+			in1 = new FileInputStream(new File(localPath + "ni"+uuid+".json"));
+		} catch (FileNotFoundException e) {
+			e.printStackTrace();
+		}
+		FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserNameOut, ftpPasswordOut, ftpPath, "/",  "ni"+uuid+".json", in1);
 		System.out.println("用户新增,向外网推送数据结束.................");
-		MysqlCenlint.deletess("ni"+response1+".json");
+		MysqlCenlint.deletess("ni"+uuid+".json");
 	}
 
 

--
Gitblit v1.9.3