无关风月
2024-08-24 d0a2f8a17bb7888602f0f421bb01a765ef04fd29
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TSystemConfigurationController.java
@@ -6,6 +6,7 @@
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.*;
@@ -33,13 +34,15 @@
     */
    @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 = "/save")
    @PostMapping(value = "/save")
    public AjaxResult getDetailById(@RequestBody TSystemConfiguration systemConfiguration) {
        systemConfigurationService.saveOrUpdate(systemConfiguration);
        return AjaxResult.success();