package cn.iocoder.yudao.module.system.controller.admin.appearance; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.module.system.controller.admin.appearance.vo.SystemAppearanceRespVO; import cn.iocoder.yudao.module.system.controller.admin.appearance.vo.SystemAppearanceSaveReqVO; import cn.iocoder.yudao.module.system.service.appearance.SystemAppearanceService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.annotation.Resource; import jakarta.annotation.security.PermitAll; import jakarta.validation.Valid; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; /** * 管理后台 - 系统外观(登录背景图、企业 Logo) * * @author 超级管理员 */ @Tag(name = "管理后台 - 系统外观") @RestController @RequestMapping("/system/appearance") @Validated public class SystemAppearanceController { @Resource private SystemAppearanceService appearanceService; @GetMapping("/get") @Operation(summary = "获得系统外观") @PermitAll public CommonResult getAppearance() { return success(appearanceService.getAppearance()); } @PostMapping("/save") @Operation(summary = "保存系统外观") @PreAuthorize("@ss.hasPermission('system:appearance:update')") public CommonResult saveAppearance(@Valid @RequestBody SystemAppearanceSaveReqVO reqVO) { appearanceService.saveAppearance(reqVO); return success(true); } }