package com.backendsys.modules.system.controller;

import com.backendsys.modules.common.config.security.annotations.Anonymous;
import com.backendsys.modules.common.utils.Result;
import com.backendsys.modules.system.service.SysDictionaryService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@Validated
@RestController
@Tag(name = "字典枚举")
public class SysDictionaryController {

    @Autowired
    private SysDictionaryService sysDictionaryService;

    @Anonymous
    @Operation(summary = "获取字典枚举值")
    @GetMapping("/api/system/dictionary/getDictionarList")
    public Result getDictionary() {
        return Result.success().put("data", sysDictionaryService.selectDictionaryList());
    }

}
