|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 数据字典信息 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @author ruoyi | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ISysDictTypeService dictTypeService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:dict:list')") | 
|---|
|  |  |  | //@PreAuthorize("@ss.hasPermi('system:dict:list')") | 
|---|
|  |  |  | @GetMapping("/list") | 
|---|
|  |  |  | public TableDataInfo list(SysDictData dictData) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Log(title = "字典数据", businessType = BusinessType.EXPORT) | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:dict:export')") | 
|---|
|  |  |  | //@PreAuthorize("@ss.hasPermi('system:dict:export')") | 
|---|
|  |  |  | @PostMapping("/export") | 
|---|
|  |  |  | public void export(HttpServletResponse response, SysDictData dictData) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询字典数据详细 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:dict:query')") | 
|---|
|  |  |  | //@PreAuthorize("@ss.hasPermi('system:dict:query')") | 
|---|
|  |  |  | @GetMapping(value = "/{dictCode}") | 
|---|
|  |  |  | public AjaxResult getInfo(@PathVariable Long dictCode) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 新增字典类型 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:dict:add')") | 
|---|
|  |  |  | //@PreAuthorize("@ss.hasPermi('system:dict:add')") | 
|---|
|  |  |  | @Log(title = "字典数据", businessType = BusinessType.INSERT) | 
|---|
|  |  |  | @PostMapping | 
|---|
|  |  |  | @PostMapping("/add") | 
|---|
|  |  |  | public AjaxResult add(@Validated @RequestBody SysDictData dict) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | dict.setCreateBy(getUsername()); | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改保存字典类型 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:dict:edit')") | 
|---|
|  |  |  | //@PreAuthorize("@ss.hasPermi('system:dict:edit')") | 
|---|
|  |  |  | @Log(title = "字典数据", businessType = BusinessType.UPDATE) | 
|---|
|  |  |  | @PutMapping | 
|---|
|  |  |  | @PostMapping("/edit") | 
|---|
|  |  |  | public AjaxResult edit(@Validated @RequestBody SysDictData dict) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | dict.setUpdateBy(getUsername()); | 
|---|
|  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 删除字典类型 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @PreAuthorize("@ss.hasPermi('system:dict:remove')") | 
|---|
|  |  |  | //@PreAuthorize("@ss.hasPermi('system:dict:remove')") | 
|---|
|  |  |  | @Log(title = "字典类型", businessType = BusinessType.DELETE) | 
|---|
|  |  |  | @DeleteMapping("/{dictCodes}") | 
|---|
|  |  |  | @GetMapping("/remove/{dictCodes}") | 
|---|
|  |  |  | public AjaxResult remove(@PathVariable Long[] dictCodes) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | dictDataService.deleteDictDataByIds(dictCodes); | 
|---|