package easydo.technology.system.rest;

import easydo.technology.annotation.WebLog;
import easydo.technology.system.dto.DictDetailDto;
import easydo.technology.system.mapper.DictDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sysDict")
public class SysDictController {
    @Autowired
    private DictDetailMapper dictDetailMapper;

    @WebLog
    @RequestMapping(value = "/selectDict")
    public List<DictDetailDto> selectDict(@RequestBody DictDetailDto detailDto){
        List<DictDetailDto> dictDetailDtos = dictDetailMapper.getDictDetailsByDictName(detailDto);
        return dictDetailDtos;
    }
}
