xuhy
6 天以前 11ecb9ee39fc61af04cd8d462faf9dce496d1773
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.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.model.TSysConfig;
import com.ruoyi.system.model.TSysQualifications;
import com.ruoyi.system.service.TSysConfigService;
import com.ruoyi.system.service.TSysQualificationsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
 
/**
 * <p>
 * 系统配置-协议管理-其他设置 前端控制器
 * </p>
 *
 * @author xiaochen
 * @since 2025-08-20
 */
@Api(tags = "系统配置-协议管理-其他设置")
@RestController
@RequestMapping("/t-sys-config")
public class TSysConfigController {
    private final TSysConfigService sysConfigService;
    @Autowired
    public TSysConfigController(TSysConfigService sysConfigService) {
        this.sysConfigService = sysConfigService;
    }
    /**
     * 修改系统配置-协议管理-其他设置
     */
    @Log(title = "系统配置-协议管理-其他设置-修改系统配置-协议管理-其他设置管理", businessType = BusinessType.UPDATE)
    @ApiOperation(value = "修改系统配置-协议管理-其他设置管理")
    @PostMapping(value = "/update")
    public R<Boolean> update(@Validated @RequestBody TSysConfig dto) {
        return R.ok(sysConfigService.updateById(dto));
    }
 
    /**
     * 查看系统配置-协议管理-其他设置详情
     */
    @ApiOperation(value = "查看系统配置-协议管理-其他设置详情",notes = "配置类型 1=用户协议 2=隐私协议 3=其他设置")
    @GetMapping(value = "/getDetailById")
    public R<TSysConfig> getDetailById(@RequestParam Integer configType) {
        TSysConfig sysConfig = sysConfigService.getOne(Wrappers.<TSysConfig>lambdaQuery().eq(TSysConfig::getConfigType, configType)
                .last("LIMIT 1"));
        return R.ok(sysConfig);
    }
 
}