| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.dto.TTenantDTO; |
| | | import com.ruoyi.system.model.TSysConfig; |
| | | import com.ruoyi.system.model.TTenant; |
| | | import com.ruoyi.system.query.TTenantQuery; |
| | | import com.ruoyi.system.service.TSysConfigService; |
| | | import com.ruoyi.system.service.TTenantService; |
| | | import com.ruoyi.system.vo.TenantVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2025-01-17 |
| | | */ |
| | | @Api(tags = "系统公共参数设置") |
| | | @RestController |
| | | @RequestMapping("/t-sys-config") |
| | | public class TSysConfigController { |
| | | |
| | | |
| | | private final TSysConfigService sysConfigService; |
| | | @Autowired |
| | | public TSysConfigController(TSysConfigService sysConfigService) { |
| | | this.sysConfigService = sysConfigService; |
| | | } |
| | | |
| | | /** |
| | | * 系统公共参数设置详情 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:commonParameter')") |
| | | @ApiOperation(value = "查看系统公共参数设置详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public R<TSysConfig> getDetailById() { |
| | | return R.ok(sysConfigService.getById(1)); |
| | | } |
| | | |
| | | /** |
| | | * 修改系统公共参数设置 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:commonParameter:save')") |
| | | @Log(title = "租户信息-修改系统公共参数设置", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "修改系统公共参数设置") |
| | | @PostMapping(value = "/update") |
| | | public R<Boolean> update(@RequestBody TSysConfig sysConfig) { |
| | | return R.ok(sysConfigService.updateById(sysConfig)); |
| | | } |
| | | |
| | | } |
| | | |