| | |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @ApiOperation("查询字典数据详细") |
| | | @PreAuthorize("@ss.hasPermi('system:dict:query')") |
| | | @GetMapping(value = "/{dictCode}") |
| | | public AjaxResult<SysDictData> getInfo(@PathVariable Long dictCode) { |
| | | public AjaxResult<SysDictData> getInfo(@ApiParam("字典code") @PathVariable Long dictCode) { |
| | | return AjaxResult.success(dictDataService.selectDictDataById(dictCode)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation("根据字典类型查询字典数据信息") |
| | | @GetMapping(value = "/type/{dictType}") |
| | | public AjaxResult<List<SysDictData>> dictType(@PathVariable String dictType) { |
| | | public AjaxResult<List<SysDictData>> dictType(@ApiParam("字典类型") @PathVariable String dictType) { |
| | | List<SysDictData> data = dictTypeService.selectDictDataByType(dictType); |
| | | if (StringUtils.isNull(data)) { |
| | | data = new ArrayList<>(); |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:dict:remove')") |
| | | @Log(title = "字典类型", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{dictCodes}") |
| | | public AjaxResult<Void> remove(@PathVariable Long[] dictCodes) { |
| | | public AjaxResult<Void> remove(@ApiParam("字典code串") @PathVariable Long[] dictCodes) { |
| | | dictDataService.deleteDictDataByIds(dictCodes); |
| | | return success(); |
| | | } |