| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | 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> |
| | |
| | | * @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); |
| | | } |
| | | |
| | | } |
| | | |