From 68af47f24bc344d2e1c5e1a848458b38679ddad4 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期一, 06 十月 2025 08:39:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java | 2
zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java | 3
zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java | 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java | 293 ++++++++++++++++++++++++++++++++----
ruoyi-common/src/main/java/com/ruoyi/common/utils/RenamedMultipartFile.java | 57 +++++++
zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java | 2
zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java | 2
zhang-content/src/main/java/com/ruoyi/domain/ZIdea.java | 3
zhang-content/src/main/java/com/ruoyi/service/MarrySelfService.java | 4
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java | 8
zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java | 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java | 9
zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java | 1
zhang-content/src/main/java/com/ruoyi/domain/ZProperty.java | 1
zhang-content/src/main/java/com/ruoyi/domain/TravelDetail.java | 2
zhang-content/src/main/java/com/ruoyi/domain/ZYearInfo.java | 2
zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java | 2
zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java | 3
zhang-content/src/main/java/com/ruoyi/service/impl/MarrySelfServiceImpl.java | 32 ++++
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java | 2
zhang-content/src/main/java/com/ruoyi/domain/ZSelfNote.java | 3
zhang-content/src/main/java/com/ruoyi/domain/Physcial.java | 2
zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java | 1
zhang-content/src/main/java/com/ruoyi/domain/ZSecret.java | 1
24 files changed, 398 insertions(+), 41 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
index adad316..8e2e52c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -1,14 +1,26 @@
package com.ruoyi.web.controller.common;
+import java.io.File;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
+import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.websocket.server.PathParam;
import com.ruoyi.common.annotation.Anonymous;
+import com.ruoyi.common.utils.RenamedMultipartFile;
+import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.service.DownLoadFileService;
+import lombok.Data;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -31,8 +43,7 @@
*/
@RestController
@RequestMapping("/common")
-public class CommonController
-{
+public class CommonController {
private static final Logger log = LoggerFactory.getLogger(CommonController.class);
@Autowired
@@ -42,6 +53,9 @@
private DownLoadFileService downLoadFileService;
private static final String FILE_DELIMETER = ",";
+
+ private static final Pattern CHINESE_PATTERN = Pattern.compile("[\u4e00-\u9fa5]");
+
// @GetMapping("/downloadFile")
// public void fileDownload(@PathParam("path") String path, HttpServletResponse response)
@@ -68,9 +82,7 @@
// }
-
-
-// /**
+ // /**
// * 閫氱敤涓嬭浇璇锋眰
// *
// * @param fileName 鏂囦欢鍚嶇О
@@ -101,11 +113,11 @@
// log.error("涓嬭浇鏂囦欢澶辫触", e);
// }
// }
-@Anonymous
+ @Anonymous
@GetMapping("/downLoadFile")
public void downLoadFile(@PathParam("path") String path, HttpServletResponse response) throws Exception {
- downLoadFileService.downLoadFile(path,response);
+ downLoadFileService.downLoadFile(path, response);
}
@@ -113,14 +125,12 @@
* 閫氱敤涓婁紶璇锋眰锛堝崟涓級
*/
@PostMapping("/upload")
- public AjaxResult uploadFile(@RequestParam("uploadFile") MultipartFile file,String fname) throws Exception
- {
- try
- {
+ public AjaxResult uploadFile(@RequestParam("uploadFile") MultipartFile file, String fname) throws Exception {
+ try {
// 涓婁紶鏂囦欢璺緞
String filePath = RuoYiConfig.getUploadPath();
// 涓婁紶骞惰繑鍥炴柊鏂囦欢鍚嶇О
- String fileName = FileUploadUtils.upload(filePath, file,fname);
+ String fileName = FileUploadUtils.upload(filePath, file, fname);
String url = serverConfig.getUrl() + fileName;
AjaxResult ajax = AjaxResult.success();
@@ -131,15 +141,14 @@
data.put("newFileName", FileUtils.getName(fileName));
data.put("originalFilename", file.getOriginalFilename());
- ajax.put("msg","鎿嶄綔鎴愬姛");
- ajax.put("data",data);
+ ajax.put("msg", "鎿嶄綔鎴愬姛");
+ ajax.put("data", data);
return ajax;
- }
- catch (Exception e)
- {
+ } catch (Exception e) {
return AjaxResult.error(e.getMessage());
}
}
+
/**
* 閫氱敤涓婁紶璇锋眰锛堝涓級
@@ -156,15 +165,15 @@
List<String> fileNames = new ArrayList<String>();
List<String> newFileNames = new ArrayList<String>();
List<String> originalFilenames = new ArrayList<String>();
- // System.out.println("99999999999999999999999990000000000000000");
- // System.out.println(files);
- // System.out.println(files.size());
+ // System.out.println("99999999999999999999999990000000000000000");
+ // System.out.println(files);
+ // System.out.println(files.size());
for (MultipartFile file : files)
{
// 涓婁紶骞惰繑鍥炴柊鏂囦欢鍚嶇О
String filename = "";
- // System.out.println("1122123330+++++++++++++++++++++++++++++");
+ // System.out.println("1122123330+++++++++++++++++++++++++++++");
String fileName = FileUploadUtils.upload(filePath, file, filename);
String url = serverConfig.getUrl() + fileName;
@@ -174,13 +183,13 @@
originalFilenames.add(file.getOriginalFilename());
}
AjaxResult ajax = AjaxResult.success();
- // System.out.println("99999999999999999999999990000000000000000");
+ // System.out.println("99999999999999999999999990000000000000000");
ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
- // System.out.println("1122123330+++++++++++++++++++++++++++++");
+ // System.out.println("1122123330+++++++++++++++++++++++++++++");
return ajax;
}
catch (Exception e)
@@ -190,16 +199,235 @@
}
/**
+ * 閫氱敤涓婁紶璇锋眰锛堝涓級 灏嗕腑鏂囦慨鏀逛负鍏朵粬
+ */
+ @PostMapping("/noChinese/uploads")
+ public AjaxResult noChineseUploadFiles(@RequestParam("files") List<MultipartFile> files) throws Exception {
+ //System.out.println("99999999999999999999999990000000000000000");
+ try {
+ // 涓婁紶鏂囦欢璺緞
+ String filePath = RuoYiConfig.getUploadPath();
+ List<String> urls = new ArrayList<String>();
+ List<String> fileNames = new ArrayList<String>();
+ List<String> newFileNames = new ArrayList<String>();
+ List<String> originalFilenames = new ArrayList<String>();
+
+ for (MultipartFile file : files) {
+ originalFilenames.add(file.getOriginalFilename());
+
+ String safeFilename = generateSafeFilename(file.getOriginalFilename());
+
+ MultipartFile renamedFile = new RenamedMultipartFile(file, safeFilename);
+
+ String lastName="";
+
+ String fileName = FileUploadUtils.upload(filePath, renamedFile, lastName);
+
+ String url = serverConfig.getUrl() + fileName;
+ urls.add(url);
+ fileNames.add(fileName);
+ newFileNames.add(FileUtils.getName(fileName));
+ }
+ AjaxResult ajax = AjaxResult.success();
+
+ ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
+ ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
+ ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
+ ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
+ return ajax;
+ } catch (Exception e) {
+ return AjaxResult.error(e.getMessage());
+ }
+ }
+
+ /**
+ * 鐢熸垚瀹夊叏鏂囦欢鍚嶏紙鍙浛鎹腑鏂囬儴鍒嗭級
+ */
+ private String generateSafeFilename(String originalName) {
+ if (originalName == null) {
+ return "";
+ }
+
+ // 1. 鑾峰彇鏂囦欢鎵╁睍鍚�
+ String extension = "";
+ int dotIndex = originalName.lastIndexOf('.');
+ if (dotIndex > 0) {
+ extension = originalName.substring(dotIndex);
+ originalName = originalName.substring(0, dotIndex);
+ }
+
+ // 2. 鍙浛鎹腑鏂囬儴鍒�
+ StringBuilder safeName = new StringBuilder();
+ Matcher matcher = CHINESE_PATTERN.matcher(originalName);
+ int lastEnd = 0;
+
+ while (matcher.find()) {
+ // 娣诲姞闈炰腑鏂囬儴鍒�
+ safeName.append(originalName, lastEnd, matcher.start());
+
+ // 娣诲姞闅忔満瀛楃涓叉浛鎹腑鏂�
+ safeName.append(generateRandomString(4));
+
+ lastEnd = matcher.end();
+ }
+
+ // 娣诲姞鍓╀綑閮ㄥ垎
+ safeName.append(originalName.substring(lastEnd));
+ String noSpaceName = safeName.toString().replaceAll("\\s", "");
+
+ // 3. 娣诲姞鎵╁睍鍚�
+ return noSpaceName + extension;
+ }
+ /**
+ * 鐢熸垚闅忔満瀛楃涓诧紙瀛楁瘝+鏁板瓧锛�
+ */
+ private String generateRandomString(int length) {
+ String uuid = UUID.randomUUID().toString().replace("-", "");
+ return uuid.substring(0, Math.min(length, uuid.length()));
+ }
+
+
+ @PostMapping("/uploads1")
+ public AjaxResult uploadFiles1(@RequestParam("files") List<MultipartFile> files) {
+ try {
+ String filePath = RuoYiConfig.getUploadPath();
+ List<String> urls = new ArrayList<>();
+ List<String> fileNames = new ArrayList<>();
+ List<String> newFileNames = new ArrayList<>();
+ List<String> originalFilenames = new ArrayList<>();
+ List<String> httpSafePaths = new ArrayList<>();
+
+ for (MultipartFile file : files) {
+ // 1. 涓婁紶鏂囦欢
+ String fileName = FileUploadUtils.upload(filePath, file, "");
+ String originalFilename = file.getOriginalFilename();
+
+ // 2. 鑾峰彇HTTP瀹夊叏璺緞
+ String httpSafePath = toHttpPath(fileName);
+
+ // 3. 鏋勫缓瀹屾暣URL锛堢‘淇濇湁鏂滄潬鍒嗛殧锛�
+ String baseUrl = serverConfig.getUrl();
+ if (!baseUrl.endsWith("/") && !httpSafePath.startsWith("/")) {
+ baseUrl += "/";
+ }
+ String url = baseUrl + httpSafePath;
+
+ urls.add(url);
+ fileNames.add(fileName);
+ newFileNames.add(FileUtils.getName(fileName));
+ originalFilenames.add(originalFilename);
+ httpSafePaths.add(httpSafePath);
+ }
+
+ AjaxResult ajax = AjaxResult.success();
+ ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
+ ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
+ ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
+ ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
+ ajax.put("httpSafePaths", StringUtils.join(httpSafePaths, FILE_DELIMETER));
+ return ajax;
+ } catch (Exception e) {
+ return AjaxResult.error(e.getMessage());
+ }
+ }
+
+
+ /**
+ * 灏嗗寘鍚腑鏂囩殑鏂囦欢璺緞杞崲涓� HTTP 瀹夊叏鐨� URL 璺緞
+ */
+
+ public String toHttpPath(String filePath) {
+ try {
+ // 1. 鏍囧噯鍖栬矾寰�
+ Path normalizedPath = Paths.get(filePath).normalize();
+
+ // 2. 缁熶竴浣跨敤姝f枩鏉�
+ String pathStr = normalizedPath.toString().replace("\\", "/");
+
+ // 3. 鍒嗗壊璺緞缁勪欢
+ String[] parts = pathStr.split("/");
+ StringBuilder encodedPath = new StringBuilder();
+
+ // 4. 瀵规瘡涓粍浠跺崟鐙紪鐮佸苟澶勭悊绌烘牸
+ for (String part : parts) {
+ if (!part.isEmpty()) {
+ // 缂栫爜骞舵浛鎹㈢┖鏍间负 %20
+ String encodedPart = URLEncoder.encode(part, StandardCharsets.UTF_8.name())
+ .replace("+", "%20");
+ encodedPath.append("/").append(encodedPart);
+ }
+ }
+
+ // 5. 澶勭悊缁濆璺緞鍜岀浉瀵硅矾寰�
+ return filePath.startsWith("/") || filePath.startsWith("\\") ?
+ encodedPath.toString() :
+ encodedPath.substring(1);
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException("UTF-8 encoding not supported", e);
+ }
+ }
+
+ /**
+ * 浠� HTTP URL 璺緞杩樺師鍘熷涓枃璺緞
+ */
+ @PostMapping("/getFileName")
+ public String extractFileName(@RequestBody String httpPath) {
+ try {
+ // 1. 澶勭悊绌哄��
+ if (httpPath == null || httpPath.trim().isEmpty()) {
+ return "";
+ }
+
+ // 2. 绉婚櫎URL鍗忚銆佸煙鍚嶅拰鏌ヨ鍙傛暟
+ String pathOnly = httpPath;
+
+ // 绉婚櫎鍗忚鍜屽煙鍚�
+ if (pathOnly.contains("://")) {
+ pathOnly = pathOnly.substring(pathOnly.indexOf("://") + 3);
+ pathOnly = pathOnly.substring(pathOnly.indexOf('/'));
+ }
+
+ // 绉婚櫎鏌ヨ鍙傛暟锛堝 ?token=123锛�
+ int queryStart = pathOnly.indexOf('?');
+ if (queryStart > 0) {
+ pathOnly = pathOnly.substring(0, queryStart);
+ }
+
+ // 3. URL瑙g爜
+ String decodedPath = URLDecoder.decode(pathOnly, StandardCharsets.UTF_8.name());
+
+ // 4. 鎻愬彇鏂囦欢鍚嶏紙澶勭悊Windows璺緞锛�
+ decodedPath = decodedPath.replace("\\", "/");
+
+ // 鑾峰彇鏈�鍚庝竴涓潪绌鸿矾寰勭粍浠�
+ int lastSlash = decodedPath.lastIndexOf('/');
+ String fileName = (lastSlash >= 0 && lastSlash < decodedPath.length() - 1) ?
+ decodedPath.substring(lastSlash + 1) : decodedPath;
+
+ // 5. 澶勭悊鐗规畩鎯呭喌锛堝缁撳熬鏂滄潬锛�
+ if (fileName.isEmpty()) {
+ // 灏濊瘯鑾峰彇鍊掓暟绗簩涓粍浠�
+ int prevSlash = decodedPath.lastIndexOf('/', lastSlash - 1);
+ if (prevSlash >= 0) {
+ fileName = decodedPath.substring(prevSlash + 1, lastSlash);
+ }
+ }
+
+ return fileName;
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException("UTF-8 encoding not supported", e);
+ }
+ }
+
+
+ /**
* 鏈湴璧勬簮閫氱敤涓嬭浇
*/
@GetMapping("/download/resource")
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
- throws Exception
- {
- try
- {
- if (!FileUtils.checkAllowDownload(resource))
- {
+ throws Exception {
+ try {
+ if (!FileUtils.checkAllowDownload(resource)) {
throw new Exception(StringUtils.format("璧勬簮鏂囦欢({})闈炴硶锛屼笉鍏佽涓嬭浇銆� ", resource));
}
// 鏈湴璧勬簮璺緞
@@ -211,10 +439,9 @@
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, downloadName);
FileUtils.writeBytes(downloadPath, response.getOutputStream());
- }
- catch (Exception e)
- {
+ } catch (Exception e) {
log.error("涓嬭浇鏂囦欢澶辫触", e);
}
+
}
-}
+}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
index 9d068ab..8d8fa3c 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -4,10 +4,7 @@
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.framework.web.domain.server.Sys;
@@ -96,8 +93,8 @@
LocalDateTime startDateTime = instant.atZone(ZoneId.systemDefault()).toLocalDateTime();
long daysPassed = ChronoUnit.DAYS.between(startDateTime, LocalDateTime.now());
- return AjaxResult.success("璇曠敤鎻愰啋锛氭偍杩樻湁 " + (7L - daysPassed) + " 澶╃殑璇曠敤澶╂暟");
- }else return AjaxResult.success("灏婃暚鐨勪細鍛樼敤鎴凤紝鎮ㄥソ锛佹杩庢潵鍒版湰鍢熷槦瀹剁綉");
+ return AjaxResult.success(daysPassed > 7 ? "鎮ㄧ殑璇曠敤鏈熷凡缁忕粨鏉燂紝璇蜂粯璐圭户缁娇鐢�":"鎮ㄨ繕鏈� " + (7L - daysPassed) + " 澶╃殑璇曠敤澶╂暟");
+ }else return AjaxResult.success("灏婃暚鐨勪細鍛樼敤鎴凤紝鎮ㄥソ锛�");
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
index 07c2889..6944147 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -537,6 +537,8 @@
if(same){
zInfoUserService.setUserInfoSame(infoUser);
+ marrySelfService.setMarryInfoSame(infoUser,marrySelf.getId());
+
}
// 5.5.1 鏇存柊閰嶅伓鍏宠仈淇℃伅
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java
index 4173dac..d1e4f15 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java
@@ -75,13 +75,19 @@
sysUser.setSex(marryInfoDto.getSpouseSex().equals("鐢�") ? "0" : "1");
userService.updateUser(sysUser);
}
+ List<ZInfoUser> byUaidToFaid = zInfoUserService.findByUaidToFaid(infoBysysId.getUaid());
+
+ for (ZInfoUser zInfoUser1:byUaidToFaid){
+ marryInfoDto.setUid(zInfoUser1.getSysId());
+ marrySelfService.updateData(marryInfoDto);
+ }
}} catch (Exception e) {
e.printStackTrace();
System.out.println("鎶ラ敊"+e.getMessage());
return AjaxResult.error("鏇存柊澶辫触");
}
- return AjaxResult.success( marrySelfService.updateData(marryInfoDto));
+ return AjaxResult.success( );
}
//瀵煎嚭
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/RenamedMultipartFile.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/RenamedMultipartFile.java
new file mode 100644
index 0000000..725954b
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/RenamedMultipartFile.java
@@ -0,0 +1,57 @@
+package com.ruoyi.common.utils;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.springframework.web.multipart.MultipartFile;
+
+public class RenamedMultipartFile implements MultipartFile {
+ private final MultipartFile originalFile;
+ private final String newFilename;
+
+ public RenamedMultipartFile(MultipartFile file, String newFilename) {
+ this.originalFile = file;
+ this.newFilename = newFilename;
+ }
+
+ @Override
+ public String getName() {
+ return originalFile.getName();
+ }
+
+ @Override
+ public String getOriginalFilename() {
+ return newFilename; // 杩斿洖鏂版枃浠跺悕
+ }
+
+ @Override
+ public String getContentType() {
+ return originalFile.getContentType();
+ }
+
+ @Override
+ public boolean isEmpty() {
+ return originalFile.isEmpty();
+ }
+
+ @Override
+ public long getSize() {
+ return originalFile.getSize();
+ }
+
+ @Override
+ public byte[] getBytes() throws IOException {
+ return originalFile.getBytes();
+ }
+
+ @Override
+ public InputStream getInputStream() throws IOException {
+ return originalFile.getInputStream();
+ }
+
+ @Override
+ public void transferTo(File dest) throws IOException, IllegalStateException {
+ originalFile.transferTo(dest);
+ }
+}
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/Physcial.java b/zhang-content/src/main/java/com/ruoyi/domain/Physcial.java
index a841271..b5dfcfe 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/Physcial.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/Physcial.java
@@ -32,7 +32,7 @@
*/
@TableId(value = "id", type = IdType.AUTO)
private Long id;
-
+ private String fileName;
/**
* 骞村害鎶ュ憡
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/TravelDetail.java b/zhang-content/src/main/java/com/ruoyi/domain/TravelDetail.java
index edaefdd..59c9385 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/TravelDetail.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/TravelDetail.java
@@ -35,6 +35,8 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+ private String fileName;
+
/**
* 瀵瑰簲鐨勭粺璁¤〃鐨刬d
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZIdea.java b/zhang-content/src/main/java/com/ruoyi/domain/ZIdea.java
index 5973cc8..e6a2094 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZIdea.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZIdea.java
@@ -28,6 +28,9 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+ private String fileName;
+
+
private Long uid;
@Excel(name = "鏃堕棿",dateFormat = "yyyy-MM-dd")
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZProperty.java b/zhang-content/src/main/java/com/ruoyi/domain/ZProperty.java
index 812b71f..784ecf2 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZProperty.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZProperty.java
@@ -28,6 +28,7 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+ private String fileName;
/**
* 鏈汉id
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZSecret.java b/zhang-content/src/main/java/com/ruoyi/domain/ZSecret.java
index 14bfbf6..ba68adf 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZSecret.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZSecret.java
@@ -32,6 +32,7 @@
private Long id;
private Long userId;
+ private String fileName;
/**
* 鍒涘缓鏃堕棿
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZSelfNote.java b/zhang-content/src/main/java/com/ruoyi/domain/ZSelfNote.java
index ab4ddb7..134b255 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZSelfNote.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZSelfNote.java
@@ -29,6 +29,9 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+
+ private String fileName;
+
/**
* 鐢ㄦ埛id
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZYearInfo.java b/zhang-content/src/main/java/com/ruoyi/domain/ZYearInfo.java
index b219f27..c9990ab 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZYearInfo.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZYearInfo.java
@@ -30,6 +30,8 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+ private String fileName;
+
/**
* 骞村害鍋ュ悍琛╥d
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java
index badf92c..ebdce65 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfClean.java
@@ -28,6 +28,8 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+ private String fileName;
+
/**
* 0锛氫繚娲侊紝1锛氭敹绾�
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java
index a2b347f..84dff3f 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfCollection.java
@@ -31,6 +31,7 @@
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
+ private String fileName;
/**
* 绫诲埆
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java
index a56bb56..8240219 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java
@@ -30,6 +30,8 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+ private String fileName;
+
/**
* 瀹朵汉濮撳悕
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
index 91b6fab..943de3e 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfDoctor.java
@@ -30,6 +30,8 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+ private String fileName;
+
/**
* 鐥呯殑绫诲瀷
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java
index 4b635d6..0d26bba 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfEconomy.java
@@ -31,6 +31,8 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+ private String fileName;
+
/**
* 0锛氬熀閲戙��1锛氬彴璐�
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java
index 1d8cbaa..29ec656 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfEquipment.java
@@ -79,6 +79,8 @@
private String url;
+ private String fileName;
+
@Excel(name = "鏄惁娉ㄩ攢",readConverterExp = "0=姝e父,1=宸叉敞閿�")
private Integer status;
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java
index 7a52b97..807e108 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfEvent.java
@@ -43,6 +43,8 @@
@Excel(name="鍙備笌鏈澶т簨鐨勪汉鐗╁悕瀛�")
private String people;
+ private String fileName;
+
/**
* 鍦扮偣
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
index 8dd4acf..bce44bb 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfPet.java
@@ -31,6 +31,7 @@
@TableId(value = "id", type = IdType.AUTO)
private String id;
+ private String fileName;
/**
* 瀹犵墿鍙风爜
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java
index c68453f..303fe62 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfPetNote.java
@@ -30,6 +30,9 @@
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+ private String fileName;
+
+
/**
* 瀹犵墿id
*/
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java
index be9d73a..3c3aeb7 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfProperty.java
@@ -30,6 +30,9 @@
@TableId(type = IdType.AUTO)
private Integer id;
+ private String fileName;
+
+
/** 璧勪骇绫诲瀷 */
@Excel(name = "璧勪骇绫诲瀷")
private String type;
diff --git a/zhang-content/src/main/java/com/ruoyi/service/MarrySelfService.java b/zhang-content/src/main/java/com/ruoyi/service/MarrySelfService.java
index f0225d9..8f9cea2 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/MarrySelfService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/MarrySelfService.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.domain.MarrySelf;
+import com.ruoyi.domain.ZInfoUser;
import com.ruoyi.domain.dto.MarryInfoDto;
/**
@@ -12,6 +13,9 @@
* @Version 1.0.0
**/
public interface MarrySelfService extends IService<MarrySelf> {
+
+ void setMarryInfoSame(ZInfoUser zInfoUser, Long id);
+
AjaxResult getInfo();
Boolean updateData(MarryInfoDto marryInfoDto);
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/MarrySelfServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/MarrySelfServiceImpl.java
index eef64c0..6a3816b 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/MarrySelfServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/MarrySelfServiceImpl.java
@@ -21,6 +21,7 @@
import javax.annotation.Resource;
import java.util.List;
+import java.util.Objects;
import java.util.stream.Collectors;
/**
@@ -41,6 +42,37 @@
// @Resource
// MarrySelfService marrySelfService;
+ @Override
+ public void setMarryInfoSame(ZInfoUser zInfoUser,Long id){
+
+ List<ZInfoUser> byUaidToFaid = zInfoUserService.findByUaidToFaid(zInfoUser.getUaid());
+
+ List<Long> resultIds = byUaidToFaid.stream()
+ .map(ZInfoUser::getSysId)
+ .filter(sysId -> !Objects.equals(sysId, zInfoUser.getSysId()))
+ .collect(Collectors.toList());
+ if (resultIds.size() != 0){
+
+ LambdaQueryWrapper<MarrySelf> marrySelfLQW = new LambdaQueryWrapper<>();
+ marrySelfLQW.eq(MarrySelf::getUid,resultIds.get(0));
+ MarrySelf myself = getOne(marrySelfLQW);
+
+
+ MarrySelf newUser = new MarrySelf();
+ // 鎷疯礉鎵�鏈夊睘鎬�
+ org.springframework.beans.BeanUtils.copyProperties(myself, newUser);
+
+ newUser.setUid(zInfoUser.getSysId());
+ newUser.setId(id);
+
+
+ System.out.println("ddddd"+newUser);
+
+
+ this.updateById(newUser);
+ }
+
+ }
@Override
--
Gitblit v1.9.1