ソースを参照

首页滚动文字接口

lsd 3 ヶ月 前
コミット
c5f593dbc6

+ 19 - 13
leromro-admin/src/main/java/com/leromro/web/controller/system/SysConfigController.java

@@ -1,26 +1,22 @@
 package com.leromro.web.controller.system;
 
-import java.util.List;
-import javax.servlet.http.HttpServletResponse;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
 import com.leromro.common.annotation.Log;
 import com.leromro.common.core.controller.BaseController;
 import com.leromro.common.core.domain.AjaxResult;
+import com.leromro.common.core.domain.R;
 import com.leromro.common.core.page.TableDataInfo;
 import com.leromro.common.enums.BusinessType;
 import com.leromro.common.utils.poi.ExcelUtil;
 import com.leromro.system.domain.SysConfig;
 import com.leromro.system.service.ISysConfigService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * 参数配置 信息操作处理
@@ -130,4 +126,14 @@ public class SysConfigController extends BaseController
         configService.resetConfigCache();
         return success();
     }
+
+    /**
+     * 获取首页滚动文字
+     */
+    @ApiOperation(value = "获取首页滚动文字")
+    @GetMapping("/getHomeRollText")
+    public R<String> getHomeRollText() {
+        return R.ok(configService.selectConfigByKey("homeRollText"));
+    }
+
 }

+ 1 - 1
leromro-framework/src/main/java/com/leromro/framework/config/SecurityConfig.java

@@ -112,7 +112,7 @@ public class SecurityConfig
                 permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
                 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
                 requests.antMatchers("/login","/loginWeb", "/register", "/captchaImage","/system/dict/**,","/websocket/**",
-                                "/core/users/orders/payNotify","/core/users/orders/refundNotify").permitAll()
+                                "/core/users/orders/payNotify","/core/users/orders/refundNotify","/system/config/getHomeRollText").permitAll()
                     //微信小程序需要提供部分预览功能
                     .antMatchers("/core/volunteer/info/**","/web/core/slideshow/**","/core/business/management/**",
                                 "/core/volunteer/work-date/**","/utils/common/region/**").permitAll()