package com.retdata.yaoyibi.web;

import com.retdata.yaoyibi.service.CsoSysDictItemService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/cso-sys-dict-items")
public class CsoSysDictItemController {

    private final CsoSysDictItemService csoSysDictItemService;

    public CsoSysDictItemController(CsoSysDictItemService csoSysDictItemService) {
        this.csoSysDictItemService = csoSysDictItemService;
    }

    @GetMapping("/dict-map")
    public Map<String, String> getDictMap(@RequestParam("type") String dictType) {
        return csoSysDictItemService.getDictMap(dictType);
    }

}
