From 06c8ec846e8a8ebb113eea8bc73a3d75be4dba4e Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期三, 04 十二月 2024 12:06:43 +0800
Subject: [PATCH] 修改启动异常

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java
index e9de37f..78d3303 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SystemConfigController.java
@@ -8,6 +8,8 @@
 import com.ruoyi.other.api.dto.IndexConfigSetDto;
 import com.ruoyi.other.service.SystemConfigService;
 import org.springframework.web.bind.annotation.*;
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.*;
 import io.swagger.annotations.ApiOperation;
 
 import javax.annotation.Resource;
@@ -38,7 +40,7 @@
         systemConfigService.save(systemConfig);
         return R.ok();
       }
-    @PostMapping("/index/detail")
+    @GetMapping("/index/detail")
 	@ApiOperation(value = "宣传图片-公司简介", tags = {"后台-广告管理-首页配置","小程序-首页"})
 	public R<IndexConfigSetDto> detail(){
         SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, 2).one();
@@ -49,6 +51,19 @@
         return R.ok(indexConfigSetDto);
 
     }
+	
+	
+	/**
+	 * 根据类型获取系统配置
+	 * @param type
+	 * @return
+	 */
+	@ResponseBody
+	@PostMapping("/getSystemConfig")
+	public R<SystemConfig> getSystemConfig(@RequestParam("type") Integer type){
+		SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, type).last("limit 1").one();
+		return R.ok(one);
+	}
 
 }
 

--
Gitblit v1.7.1