From f284ec0a229d32a72eb5ff7397f3b0507fdb2eb3 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Thu, 02 Dec 2021 17:07:23 +0800
Subject: [PATCH] 1.许可

---
 src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 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 8ce5df9..40c7857 100644
--- a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
+++ b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
@@ -425,7 +425,7 @@
 
 		List<MultipartFile> fileList = new ArrayList<>();
 		//获取图片文件
-		fileList = fileUtil.getSubFiles(desPath+File.separator+namePath,fileList);
+		fileList = fileUtil.getSubFiles(desPath,fileList);
 		for (MultipartFile multipartFile : fileList){
 			if(multipartFile.getName().toLowerCase().endsWith(".png") || multipartFile.getName().toLowerCase().endsWith(".jpg")) {
 				String newName = "upload/picture/" + UUID.randomUUID().toString().replaceAll("-", "") + multipartFile.getName().substring(multipartFile.getName().lastIndexOf("."));
@@ -629,7 +629,23 @@
 			"insert into blade_attach(id,tenant_id,link,domain,name,original_name,extension,attach_size,create_user,deptid," +
 				"create_time,update_user,update_time,status,is_deleted,type,cardid";
 		if (noticeId != null) {
-			s1 += ",notice_id";
+			s1 += ",notice_id"+")" +"values(" + "'" + attach.getId() + "'" + "," +
+				"'" + attach.getTenantId() + "'" + "," +
+				"'" + imgurl + "'" + "," +
+				"'" + ip + "'" + "," +
+				"'" + split[2] + "'" + "," +
+				"'" + attach.getOriginalName() + "'" + "," +
+				"'" + attach.getExtension() + "'" + "," +
+				"'" + attach.getAttachSize() + "'" + "," +
+				"'" + attach.getCreateUser() + "'" + "," +
+				"'" + attach.getDeptid() + "'" + "," +
+				"'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," +
+				"'" + attach.getUpdateUser() + "'" + "," +
+				"'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," +
+				"'" + attach.getStatus() + "'" + "," +
+				"'" + attach.getIsDeleted() + "'" + "," +
+				"'" + attach.getType() + "'" + "," +
+				"'" + cardid + "'";
 		} else {
 			s1 += ") " +
 				"values(" + "'" + attach.getId() + "'" + "," +
@@ -651,7 +667,7 @@
 				"'" + cardid + "'";
 		}
 		if (noticeId != null) {
-			s1 += "'" + noticeId + "'" + ")";
+			s1 += ","+"'" + noticeId + "'" + ")";
 		} else {
 			s1 += ")";
 		}

--
Gitblit v1.9.3