zhibing.pu
2024-08-12 34d18c08f04de78eccb42b88b7484b0531d263ff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.ruoyi.other.controller;
 
 
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.core.web.domain.AjaxResult;
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;
 
/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 无关风月
 * @since 2024-08-06
 */
@RestController
@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(name = "type")@ApiParam(value = "1=客服信息,2=系统设置") Integer type) {
        return AjaxResult.ok(systemConfigurationService.getOne(Wrappers.lambdaQuery(TSystemConfiguration.class)
                .eq(TSystemConfiguration::getType, type)));
    }
 
}