From c980c8c2cd9403393db6a3f42705612a0a4d4511 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期一, 16 十二月 2024 15:49:04 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BaseSettingController.java |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BaseSettingController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BaseSettingController.java
index 7f360cb..18a4626 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BaseSettingController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BaseSettingController.java
@@ -1,9 +1,12 @@
 package com.ruoyi.other.controller;
 
 
+import com.alibaba.fastjson2.JSONObject;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.other.api.domain.BaseSetting;
 import com.ruoyi.other.service.BaseSettingService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -18,6 +21,7 @@
  */
 @RestController
 @RequestMapping("/base-setting")
+@Api("基础配置")
 public class BaseSettingController {
 
 	@Resource
@@ -30,11 +34,26 @@
 	 * @return
 	 */
 	@ResponseBody
-	@PostMapping("/getBaseSetting")
+	@GetMapping("/getBaseSetting")
+	@ApiOperation(value = "获取基础配置", tags = {"管理后台-基础配置"})
 	public R<BaseSetting> getBaseSetting(@RequestParam("id") Integer id){
 		BaseSetting baseSetting = baseSettingService.getById(id);
 		return R.ok(baseSetting);
 	}
+
+	/**
+	 * 保存设置
+	 */
+	@ApiOperation(value = "保存设置", tags = {"管理后台-基础配置"})
+	@PostMapping("/save")
+	public R saveActivityConfig(@RequestBody String json){
+		JSONObject jsonObject = JSONObject.parseObject(json);
+		Integer id = jsonObject.getInteger("id");
+		BaseSetting baseSetting = baseSettingService.getById(id);
+		baseSetting.setContent(jsonObject.getString("content"));
+		baseSettingService.saveOrUpdate(baseSetting);
+		return R.ok();
+	}
 	
 	
 	

--
Gitblit v1.7.1