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;