From e59a45b48b0fdcddb59f6df2d017dcc97f2e18c6 Mon Sep 17 00:00:00 2001 From: fl <3098731433@qq.com> Date: Wed, 7 May 2025 10:37:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E7=89=88=E4=B8=8B=E8=BD=BD=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tool/service/impl/EpcServiceImpl.java | 20 +++++++--------- .../service/impl/StateGridServiceImpl.java | 24 +++++++++---------- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/search-tool/src/main/java/com/bonus/tool/service/impl/EpcServiceImpl.java b/search-tool/src/main/java/com/bonus/tool/service/impl/EpcServiceImpl.java index d16f642..197505f 100644 --- a/search-tool/src/main/java/com/bonus/tool/service/impl/EpcServiceImpl.java +++ b/search-tool/src/main/java/com/bonus/tool/service/impl/EpcServiceImpl.java @@ -201,11 +201,9 @@ public class EpcServiceImpl implements EpcService { } } - @Value("file.domain") - private String prefixPath; + @Value("file.path") + private String filePath; - @Value("file.prefix") - private String mappingPath; /** * 将数据转换为模版数据 @@ -320,7 +318,7 @@ public class EpcServiceImpl implements EpcService { imgMap.put("height", "3492375"); imgMap.put("index", (100 * (i + 1)) + imgIndex++); imgMap.put("base64Url", file.getFilePath() != null ? - FreeMarkerUtil.getImageBase(prefixPath + mappingPath + file.getFilePath()) : ""); + FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : ""); imgList.add(imgMap); } } @@ -332,7 +330,7 @@ public class EpcServiceImpl implements EpcService { imgMap.put("height", "7534910"); imgMap.put("index", (100 * (i + 1)) + imgIndex++); imgMap.put("base64Url", file.getFilePath() != null ? - FreeMarkerUtil.getImageBase(prefixPath + mappingPath + file.getFilePath()) : ""); + FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : ""); imgList.add(imgMap); } } @@ -345,7 +343,7 @@ public class EpcServiceImpl implements EpcService { imgMap.put("height", "7534910"); imgMap.put("index", (100 * (i + 1)) + imgIndex++); imgMap.put("base64Url", file.getFilePath() != null ? - FreeMarkerUtil.getImageBase(prefixPath + mappingPath + file.getFilePath()) : ""); + FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : ""); imgList.add(imgMap); } } @@ -367,7 +365,7 @@ public class EpcServiceImpl implements EpcService { imgMap.put("width", "5325745"); imgMap.put("height", "7534910"); imgMap.put("base64Url", file.getFilePath() != null ? - FreeMarkerUtil.getImageBase(prefixPath + mappingPath + file.getFilePath()) : ""); + FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : ""); imgList2.add(imgMap); } } @@ -403,7 +401,7 @@ public class EpcServiceImpl implements EpcService { imgMap.put("height", "3492375"); imgMap.put("index", (100 * (i + 1)) + imgIndex++); imgMap.put("base64Url", file.getFilePath() != null ? - FreeMarkerUtil.getImageBase(prefixPath + mappingPath + file.getFilePath()) : ""); + FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : ""); imgList.add(imgMap); } } @@ -415,7 +413,7 @@ public class EpcServiceImpl implements EpcService { imgMap.put("height", "7534910"); imgMap.put("index", (100 * (i + 1)) + imgIndex++); imgMap.put("base64Url", file.getFilePath() != null ? - FreeMarkerUtil.getImageBase(prefixPath + mappingPath + file.getFilePath()) : ""); + FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : ""); imgList.add(imgMap); } } @@ -427,7 +425,7 @@ public class EpcServiceImpl implements EpcService { imgMap.put("height", "7534910"); imgMap.put("index", (100 * (i + 1)) + imgIndex++); imgMap.put("base64Url", file.getFilePath() != null ? - FreeMarkerUtil.getImageBase(prefixPath + mappingPath + file.getFilePath()) : ""); + FreeMarkerUtil.getImageBase(filePath + file.getFilePath()) : ""); imgList.add(imgMap); } } diff --git a/search-tool/src/main/java/com/bonus/tool/service/impl/StateGridServiceImpl.java b/search-tool/src/main/java/com/bonus/tool/service/impl/StateGridServiceImpl.java index f9f5df9..ba7ddf7 100644 --- a/search-tool/src/main/java/com/bonus/tool/service/impl/StateGridServiceImpl.java +++ b/search-tool/src/main/java/com/bonus/tool/service/impl/StateGridServiceImpl.java @@ -264,11 +264,9 @@ public class StateGridServiceImpl implements StateGridService { return AjaxResult.success(); } - @Value("file.domain") - private String prefixPath; + @Value("file.path") + private String filePath; - @Value("file.prefix") - private String mappingPath; /** * 将数据转换为模版数据 @@ -314,7 +312,7 @@ public class StateGridServiceImpl implements StateGridService { imgMap.put("index", 100 * index + imgIndex++); imgMap.put("width", "5325745"); imgMap.put("height", "7534910"); - imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(prefixPath+mappingPath+file.getFilePath()) : ""); + imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); imgList.add(imgMap); } perfImgMap.put("imgList", imgList); @@ -366,7 +364,7 @@ public class StateGridServiceImpl implements StateGridService { imgMap.put("index", 100000 * perfIndex + imgIndex++); imgMap.put("width", "5325745"); imgMap.put("height", "7534910"); - imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(prefixPath+mappingPath+file.getFilePath()) : ""); + imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); imgList.add(imgMap); } zmMap.put("imgList", imgList); @@ -382,7 +380,7 @@ public class StateGridServiceImpl implements StateGridService { zzMap.put("index", 1000 * subIndex + zzIndex++); zzMap.put("width", "5325745"); zzMap.put("height", "7534910"); - zzMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(prefixPath+mappingPath+file.getFilePath()) : ""); + zzMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); zzList.add(zzMap); } } @@ -411,7 +409,7 @@ public class StateGridServiceImpl implements StateGridService { imgMap.put("index", 10000 * personIndex + imgIndex++); imgMap.put("width", "4959860"); imgMap.put("height", "3492375"); - imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(prefixPath+mappingPath+file.getFilePath()) : ""); + imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); imgList.add(imgMap); } } @@ -422,7 +420,7 @@ public class StateGridServiceImpl implements StateGridService { imgMap.put("index", 10000 * personIndex + imgIndex++); imgMap.put("width", "5325745"); imgMap.put("height", "7534910"); - imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(prefixPath+mappingPath+file.getFilePath()) : ""); + imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); imgList.add(imgMap); } } @@ -433,7 +431,7 @@ public class StateGridServiceImpl implements StateGridService { imgMap.put("index", 10000 * personIndex + imgIndex++); imgMap.put("width", "5325745"); imgMap.put("height", "7534910"); - imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(prefixPath+mappingPath+file.getFilePath()) : ""); + imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); imgList.add(imgMap); } } @@ -493,7 +491,7 @@ public class StateGridServiceImpl implements StateGridService { imgMap.put("index", 1000000 * otherIndex + imgIndex++); imgMap.put("width", "4959860"); imgMap.put("height", "3492375"); - imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(prefixPath+mappingPath+file.getFilePath()) : ""); + imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); personImgList.add(imgMap); } } @@ -510,7 +508,7 @@ public class StateGridServiceImpl implements StateGridService { imgMap.put("index", 1000000 * otherIndex + imgIndex++); imgMap.put("width", "5325745"); imgMap.put("height", "7534910"); - imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(prefixPath+mappingPath+file.getFilePath()) : ""); + imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); personImgList.add(imgMap); } } @@ -614,7 +612,7 @@ public class StateGridServiceImpl implements StateGridService { imgMap.put("index", imgIndex++); imgMap.put("width", "5325745"); imgMap.put("height", "7534910"); - imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(prefixPath+mappingPath+file.getFilePath()) : ""); + imgMap.put("base64Url", file.getFilePath() != null ? FreeMarkerUtil.getImageBase(filePath+file.getFilePath()) : ""); corePersonImgList.add(imgMap); }