package com.ruoyi.web.controller.basic;

import com.ruoyi.RestResponse;
import com.ruoyi.basic.service.impl.BusinessSysDictDataService;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.system.service.ISysDictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 字典数据表 前端控制器
 * </p>
 *
 * @author zhangby
 * @since 2020-01-15
 */
@RestController
@RequestMapping("/api/dict/data")
public class ISysDictDataController {

    @Autowired
    private BusinessSysDictDataService sysDictDataService;

    /**
     * 某字典数据
     * @param dictType
     * @return
     */
    @GetMapping("/list/dictType/{dictType}")
    public RestResponse dictTypeDataList(@PathVariable("dictType") String dictType){
        List<SysDictData> dictDataList = sysDictDataService.dictTypeDataList(dictType);
        return RestResponse.success().setData(dictDataList);
    }



}
