yangys
2024-03-27 e48aa2ac8dea1be5db11c63edf0b912c4ad5ce65
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
package com.qianwen.smartman.modules.system.controller;
 
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.qianwen.smartman.common.constant.ExtCacheConstant;
import com.qianwen.core.cache.utils.CacheUtil;
import com.qianwen.core.scanner.modular.annotation.PostResource;
import com.qianwen.core.scanner.modular.stereotype.ApiResource;
import com.qianwen.core.tenant.annotation.NonDS;
import com.qianwen.core.tool.api.R;
import com.qianwen.smartman.modules.system.entity.Param;
import com.qianwen.smartman.modules.system.service.IThemeService;
import org.springframework.web.bind.annotation.RestController;
 
@Api(value = "主题管理", tags = {"主题管理"})
@RestController
@ApiResource({"blade-system/theme"})
@NonDS
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/system/controller/ThemeController.class */
public class ThemeController {
    private final IThemeService themeService;
 
    public ThemeController(final IThemeService themeService) {
        this.themeService = themeService;
    }
 
    @ApiOperationSupport(order = 1)
    @PostResource({"/theme-change"})
    @ApiOperation(value = "切换主题", notes = "传入theme")
    public R<Param> change(String theme) {
        CacheUtil.clear("blade:param", ExtCacheConstant.TENANT_MODE);
        return R.data(this.themeService.changeTheme(theme));
    }
}