From 1625d30ace6e31ea0166b1357532463c6ca08876 Mon Sep 17 00:00:00 2001 From: zhengzheng <18918765049@163.com> Date: Thu, 21 Apr 2022 14:41:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/busi/ActiveInfoController.java | 11 +++++++++-- zt-admin/src/main/resources/application.yml | 2 ++ .../com/wuzhen/common/config/RuoYiConfig.java | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/zt-admin/src/main/java/com/wuzhen/web/controller/busi/ActiveInfoController.java b/zt-admin/src/main/java/com/wuzhen/web/controller/busi/ActiveInfoController.java index 86359e7ae..489d669bc 100644 --- a/zt-admin/src/main/java/com/wuzhen/web/controller/busi/ActiveInfoController.java +++ b/zt-admin/src/main/java/com/wuzhen/web/controller/busi/ActiveInfoController.java @@ -12,6 +12,7 @@ import com.wuzhen.system.domain.ActiveInfo; import com.wuzhen.system.service.IActiveInfoService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.validation.annotation.Validated; @@ -36,6 +37,12 @@ public class ActiveInfoController extends BaseController @Autowired private IActiveInfoService activeInfoService; + @Value("${wuzhen.fp}") + private String fp ; + @Value("${wuzhen.lp}") + private String lp ; + + @RequiresPermissions("active:info:view") @@ -104,7 +111,7 @@ public class ActiveInfoController extends BaseController } catch (IOException e) { e.printStackTrace(); } - activeInfo.setActivePicUrl(filename); + activeInfo.setActivePicUrl(lp+filename); } activeInfo.setCreateBy(getLoginName()); @@ -166,7 +173,7 @@ public class ActiveInfoController extends BaseController } catch (IOException e) { e.printStackTrace(); } - activeInfo.setActiveFirstPicUrl(filename); + activeInfo.setActiveFirstPicUrl(fp+filename); activeInfo.setIsFristPage("1"); } activeInfo.setUpdateBy(getLoginName()); diff --git a/zt-admin/src/main/resources/application.yml b/zt-admin/src/main/resources/application.yml index 7ab44d95b..24bfdb33d 100644 --- a/zt-admin/src/main/resources/application.yml +++ b/zt-admin/src/main/resources/application.yml @@ -10,6 +10,8 @@ wuzhen: demoEnabled: false # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) profile: /www/wwwroot + fp: http://47.94.96.229:18001/fp/ + lp: http://47.94.96.229:18001/lp/ # 获取ip地址开关 addressEnabled: false diff --git a/zt-common/src/main/java/com/wuzhen/common/config/RuoYiConfig.java b/zt-common/src/main/java/com/wuzhen/common/config/RuoYiConfig.java index eed6c380d..31e87d10d 100644 --- a/zt-common/src/main/java/com/wuzhen/common/config/RuoYiConfig.java +++ b/zt-common/src/main/java/com/wuzhen/common/config/RuoYiConfig.java @@ -26,6 +26,24 @@ public class RuoYiConfig /** 上传路径 */ private static String profile; + /** lp */ + private static String lp; + + public static String getLp() { + return lp; + } + + /** fp */ + private static String fp; + + public static String getFp() { + return fp; + } + + + + + /** 获取地址开关 */ private static boolean addressEnabled;