package com.hdkj.lt.bf.controller;


import com.hdkj.lt.bf.entity.vo.ThemeColorVo;
import com.hdkj.lt.bf.service.ISystemThemeService;
import com.hdkj.lt.core.mvc.BaseController;
import com.hdkj.hussar.ApiResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : liuaini
 * @version : 1.0
 * @description :
 * @createTime : 2024/5/22 16:18
 */
@Api(value = "系统主题")
@RestController
@AllArgsConstructor
@RequestMapping("/sys/theme")
public class SystemThemeController extends BaseController {

    private final ISystemThemeService systemThemeService;

    /**
     * 获取系统颜色
     */
    @GetMapping("/getThemeColor")
    @ApiOperation(value = "获取系统颜色")
    public ApiResponse<ThemeColorVo> getThemeColor(){
        ThemeColorVo themeColorVo = systemThemeService.getThemeColor();
        return ApiResponse.success(themeColorVo);
    }

    /**
     * 修改系统颜色
     */
    @GetMapping("/updateThemeColor")
    @ApiOperation(value = "修改系统颜色")
    public ApiResponse<ThemeColorVo> updateThemeColor(){
        ThemeColorVo themeColorVo = systemThemeService.updateThemeColor();
        return ApiResponse.success(themeColorVo);
    }
}
