xuhy
2024-02-29 7c9ec6e5b5ad5e744ddb65f876c4db4c4ae90501
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
47
48
49
50
51
52
53
54
55
56
package com.ruoyi.web.controller.api;
 
 
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.TConfig;
import com.ruoyi.system.domain.TCustomerService;
import com.ruoyi.system.service.TConfigService;
import com.ruoyi.system.service.TCustomerServiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * <p>
 * 基础配置表 前端控制器
 * </p>
 *
 * @author xiaochen
 * @since 2024-02-29
 */
@Api(tags = "基础配置")
@RestController
@RequestMapping("/tConfig")
public class TConfigController {
 
    private final TConfigService configService;
 
    @Autowired
    public TConfigController(TConfigService configService) {
        this.configService = configService;
    }
 
    /**
     * 通过id查询协议内容
     */
    @ApiOperation(value = "通过id查询协议内容",notes = "1=创业合伙人配置 2=会员说明 3=剧本出售说明 4=短剧出售说明 5=用户协议 6=隐私协议 7=注销协议")
    @GetMapping("/getConfigById")
    public AjaxResult<TConfig> getConfigById(@RequestParam Long id)
    {
        return AjaxResult.success(configService.getById(id));
    }
 
    /**
     * 修改协议内容
     */
    @ApiOperation(value = "修改协议内容",notes = "修改协议内容")
    @PostMapping("/updateConfigById")
    public AjaxResult<TConfig> updateConfigById(@RequestBody TConfig config)
    {
        return AjaxResult.success(configService.updateById(config));
    }
 
}