From a75bb5cc48daa9eaf6e40933e96bb0b8ff144ddc Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 12 九月 2024 09:18:55 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TSystemConfigurationController.java |   40 +++++++++++++++++++++++++++++++++++++---
 1 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TSystemConfigurationController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TSystemConfigurationController.java
index 6c217a3..8aa6085 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TSystemConfigurationController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TSystemConfigurationController.java
@@ -1,9 +1,16 @@
 package com.ruoyi.other.controller;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
-
-import org.springframework.web.bind.annotation.RestController;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.common.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
+import com.ruoyi.other.api.domain.TSystemConfiguration;
+import com.ruoyi.other.service.TSystemConfigurationService;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * <p>
@@ -17,5 +24,32 @@
 @RequestMapping("/t-system-configuration")
 public class TSystemConfigurationController {
 
+    private final TSystemConfigurationService systemConfigurationService;
+
+    @Autowired
+    public TSystemConfigurationController(TSystemConfigurationService systemConfigurationService) {
+        this.systemConfigurationService = systemConfigurationService;
+    }
+
+    /**
+     * 查看系统设置
+     */
+    @ApiOperation(tags = {"小程序-系统设置","后台-内容设置"},value = "联系客服,查询设置")
+    @GetMapping(value = "/getDetailById")
+    public AjaxResult<TSystemConfiguration> getDetailById(@RequestParam("type")@ApiParam(value = "1=客服信息,2=系统设置") Integer type) {
+        return AjaxResult.ok(systemConfigurationService.getOne(Wrappers.lambdaQuery(TSystemConfiguration.class)
+                .eq(TSystemConfiguration::getType, type)));
+    }
+
+
+
+    @ApiOperation(tags = {"后台-内容设置"},value = "客户信息,系统内容设置")
+    @PostMapping(value = "/save")
+    @Log(title = "【系统内容设置】保存系统内容设置", businessType = BusinessType.INSERT)
+    public AjaxResult getDetailById(@RequestBody TSystemConfiguration systemConfiguration) {
+        systemConfigurationService.saveOrUpdate(systemConfiguration);
+        return AjaxResult.success();
+    }
+
 }
 

--
Gitblit v1.7.1