From b223c71ef71f2697bd09642d659655730185afb9 Mon Sep 17 00:00:00 2001 From: wangxy <1481820854@qq.com> Date: Mon, 13 Jan 2025 15:10:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/home/HomeController.java | 16 ++++++++++++++++ .../com/ruoyi/framework/config/ShiroConfig.java | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/home/HomeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/home/HomeController.java index dea0024..9d59df8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/home/HomeController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/home/HomeController.java @@ -3,11 +3,15 @@ package com.ruoyi.web.controller.home; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.*; +import com.ruoyi.system.service.ISysSpecialService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; /** * ClassName: HomeController @@ -22,6 +26,9 @@ import org.springframework.web.bind.annotation.GetMapping; @Controller public class HomeController { + @Autowired + private ISysSpecialService specialService; + @Log(title = Constants.WEBSITE_ACCESS, businessType = BusinessType.OTHER) @ApiOperation("首页门户") @@ -31,4 +38,13 @@ public class HomeController { return "law/base"; } + + @ApiOperation("详情") + @GetMapping("/publicView") + public String publicView(ModelMap mmap, @RequestParam String specialId) { + SysSpecial sysSpecial = specialService.selectSysSpecialById(specialId); + mmap.put("sysSpecial", sysSpecial); + return "law/view"; + } + } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java index 348a2c3..793104f 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java @@ -311,7 +311,7 @@ public class ShiroConfig filterChainDefinitionMap.put("/dept_trends_view.html", "anon"); filterChainDefinitionMap.put("/business_view.html", "anon"); filterChainDefinitionMap.put("/special_view.html", "anon"); - filterChainDefinitionMap.put("/public_view.html", "anon"); + filterChainDefinitionMap.put("/publicView", "anon"); filterChainDefinitionMap.put("/profile/**", "anon"); filterChainDefinitionMap.put("/search", "anon"); filterChainDefinitionMap.put("/law/**", "anon");