From 8853292babb2ad94de4a3207966f1e83b767cd2d Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Sun, 17 Sep 2023 16:38:34 +0800
Subject: [PATCH] 新增流程节点进程查询接口

---
 src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java |   47 +++++++++++++++++++++++++----------------------
 1 files changed, 25 insertions(+), 22 deletions(-)

diff --git a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
index 180c1b7..04f9ff5 100644
--- a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
+++ b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
@@ -181,6 +181,7 @@
 	@PostMapping("/put-file")
 	public R<BladeFile> putFile(@RequestParam MultipartFile file) {
 		BladeFile bladeFile = ossBuilder.template().putFile(file.getOriginalFilename(), file.getInputStream());
+		bladeFile.setLink(bladeFile.getLink().replace("127.0.0.1","60.220.177.113"));
 		return R.data(bladeFile);
 	}
 
@@ -194,7 +195,7 @@
 	@PostMapping("/put-file-user-avatar")
 	public R putFileUserAvatar(@RequestParam MultipartFile file) {
 		//填写你文件上传的地址以及相应信息
-		String url = FileConfig.url;
+		String url = FileConfig.apiUrl;
 		String access = FileConfig.access;
 		String secret = FileConfig.secret;
 		String bucket = FileConfig.bucket;
@@ -225,8 +226,8 @@
 				in, in.available(), -1)
 				.headers(headers)
 				.build());
-		InputStream inputStream = file.getInputStream();
-		FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
+//		InputStream inputStream = file.getInputStream();
+//		FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
 		in.close();
 		String urls = FileConfig.url + "/"+ FileConfig.bucket + "/" + newName;
 		//数据封装
@@ -246,7 +247,7 @@
 	@PostMapping("put-file-app")
 	public R putFileApp(@RequestParam MultipartFile file) throws IOException, ServerException, InsufficientDataException, InternalException, InvalidResponseException, InvalidKeyException, NoSuchAlgorithmException, XmlParserException, ErrorResponseException {
 		//填写你文件上传的地址以及相应信息
-		String url = FileConfig.url;
+		String url = FileConfig.apiUrl;
 		String access = FileConfig.access;
 		String secret = FileConfig.secret;
 		String bucket = FileConfig.bucket;
@@ -277,8 +278,8 @@
 				in, in.available(), -1)
 				.headers(headers)
 				.build());
-		InputStream inputStream = file.getInputStream();
-		FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
+//		InputStream inputStream = file.getInputStream();
+//		FtpUtil.uploadFile(ftpHost, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
 		in.close();
 		String urls = FileConfig.url + "/"+ FileConfig.bucket + "/" + newName;
 		return R.data(urls);
@@ -293,7 +294,7 @@
 	@PostMapping("put-files")
 	public R putFiles(@RequestParam MultipartFile file) throws IOException, ServerException, InsufficientDataException, InternalException, InvalidResponseException, InvalidKeyException, NoSuchAlgorithmException, XmlParserException, ErrorResponseException {
 		//填写你文件上传的地址以及相应信息
-		String url = FileConfig.url;
+		String url = FileConfig.apiUrl;
 		String access = FileConfig.access;
 		String secret = FileConfig.secret;
 		String bucket = FileConfig.bucket;
@@ -324,8 +325,8 @@
 				in, in.available(), -1)
 				.headers(headers)
 				.build());
-		InputStream inputStream = file.getInputStream();
-		FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
+//		InputStream inputStream = file.getInputStream();
+//		FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
 		in.close();
 		String urls = FileConfig.url + "/"+ FileConfig.bucket + "/" + newName;
 		//数据封装
@@ -346,7 +347,7 @@
 	public R putFileZip(@RequestParam MultipartFile file) throws Exception {
 		Map<String, Object> map = new HashMap<>(1);
 		//填写你文件上传的地址以及相应信息
-		String url = FileConfig.url;
+		String url = FileConfig.apiUrl;
 		String access = FileConfig.access;
 		String secret = FileConfig.secret;
 		String bucket = FileConfig.bucket;
@@ -434,13 +435,15 @@
 
 					//内网数据推送
 					//数据推送
-					String s = "update blade_user set avatar = " + "'" + inUrl + "'" + "where id = " + "'" + user.getId() + "'";
+					String s = "update blade_user set avatar = " + "'" + inUrl +
+						",update_time = " + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" +
+						"'" + "where id = " + "'" + user.getId() + "'";
 					//FtpUtil.sqlFileUpload(s);
-					myAsyncService.FTP(s);
+					myAsyncService.dataSync(s);
 
 					//文件推送
-					InputStream inputStream = multipartFile.getInputStream();
-					FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
+//					InputStream inputStream = multipartFile.getInputStream();
+//					FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
 					in.close();
 				}
 			}
@@ -468,7 +471,7 @@
 	public R putFileExamPaymentZip(@RequestParam MultipartFile file) throws Exception {
 		Map<String, Object> map = new HashMap<>(1);
 		//填写你文件上传的地址以及相应信息
-		String url = FileConfig.url;
+		String url = FileConfig.apiUrl;
 		String access = FileConfig.access;
 		String secret = FileConfig.secret;
 		String bucket = FileConfig.bucket;
@@ -559,11 +562,11 @@
 						"," + "'" + examPayment.getPaymentStatus() + "'" +
 						"," +"'" + inUrl + "'" + ")";
 					//FtpUtil.sqlFileUpload(s);
-					myAsyncService.FTP(s);
+					myAsyncService.dataSync(s);
 
 					//文件推送
-					InputStream inputStream = multipartFile.getInputStream();
-					FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
+//					InputStream inputStream = multipartFile.getInputStream();
+//					FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
 					in.close();
 				}
 			}
@@ -586,7 +589,7 @@
 	@PostMapping("put-files-talk")
 	public R putFilestak(@RequestParam MultipartFile file) throws IOException, ServerException, InsufficientDataException, InternalException, InvalidResponseException, InvalidKeyException, NoSuchAlgorithmException, XmlParserException, ErrorResponseException {
 		//填写你文件上传的地址以及相应信息
-		String url = FileConfig.url;
+		String url = FileConfig.apiUrl;
 		String access = FileConfig.access;
 		String secret = FileConfig.secret;
 		String bucket = FileConfig.bucket;
@@ -619,8 +622,8 @@
 				.build());
 
 		//文件推送
-		InputStream inputStream = file.getInputStream();
-		FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
+//		InputStream inputStream = file.getInputStream();
+//		FtpUtil.uploadFile(FtpConfig.ftpHost, ftpPort, FtpConfig.ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
 		in.close();
 		String urls = FileConfig.url + "/"+ FileConfig.bucket + "/" + newName;
 		//数据封装
@@ -756,7 +759,7 @@
 			s1 += ")";
 		}
 		//FtpUtil.sqlFileUpload(s1);
-		myAsyncService.FTP(s1);
+		myAsyncService.dataSync(s1);
 		return attach.getId();
 	}
 

--
Gitblit v1.9.3