From 06e4db5a576c63c10ab4673dba017ffe1a3e7e66 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 17 一月 2025 19:07:27 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TSystemConfigurationController.java | 38 +++++++++++++++++++++++++++++++------- 1 files changed, 31 insertions(+), 7 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 cc3de1a..8770c49 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 @@ -3,15 +3,16 @@ 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.common.security.annotation.Logical; +import com.ruoyi.common.security.annotation.RequiresPermissions; 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.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; /** * <p> @@ -35,12 +36,35 @@ /** * 查看系统设置 */ - @ApiOperation(tags = {"小程序-系统设置"},value = "联系客服") + @RequiresPermissions(value = {"/customerServiceInformation", "/systemContentSetting"}, logical = Logical.OR) + @ApiOperation(tags = {"后台-内容设置"},value = "联系客服,查询设置") @GetMapping(value = "/getDetailById") - public AjaxResult<TSystemConfiguration> getDetailById(@RequestParam(name = "type",value = "1=客服信息,2=系统设置") Integer type) { + 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 = "联系客服,查询设置") + @GetMapping(value = "/getDetailById1") + public AjaxResult<TSystemConfiguration> getDetailById1(@RequestParam("type")@ApiParam(value = "1=客服信息,2=系统设置") Integer type) { + return AjaxResult.ok(systemConfigurationService.getOne(Wrappers.lambdaQuery(TSystemConfiguration.class) + .eq(TSystemConfiguration::getType, type))); + } + + + + @RequiresPermissions(value = {"/customerServiceInformation", "/systemContentSetting"}, logical = Logical.OR) + @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