|
|
@@ -1,6 +1,9 @@
|
|
|
package com.zhongzheng.controller.system;
|
|
|
|
|
|
import java.util.List;
|
|
|
+
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
@@ -28,6 +31,7 @@ import com.zhongzheng.modules.system.service.ISysDictTypeService;
|
|
|
*
|
|
|
* @author zhongzheng
|
|
|
*/
|
|
|
+@Api(tags ="字典管理")
|
|
|
@RestController
|
|
|
@RequestMapping("/system/dict/type")
|
|
|
public class SysDictTypeController extends BaseController
|
|
|
@@ -35,6 +39,7 @@ public class SysDictTypeController extends BaseController
|
|
|
@Autowired
|
|
|
private ISysDictTypeService dictTypeService;
|
|
|
|
|
|
+ @ApiOperation("获取字典列表")
|
|
|
@PreAuthorize("@ss.hasPermi('system:dict:list')")
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(SysDictType dictType)
|
|
|
@@ -57,6 +62,7 @@ public class SysDictTypeController extends BaseController
|
|
|
/**
|
|
|
* 查询字典类型详细
|
|
|
*/
|
|
|
+ @ApiOperation("查询字典类型详细")
|
|
|
@PreAuthorize("@ss.hasPermi('system:dict:query')")
|
|
|
@GetMapping(value = "/{dictId}")
|
|
|
public AjaxResult getInfo(@PathVariable Long dictId)
|
|
|
@@ -67,6 +73,7 @@ public class SysDictTypeController extends BaseController
|
|
|
/**
|
|
|
* 新增字典类型
|
|
|
*/
|
|
|
+ @ApiOperation("新增字典类型")
|
|
|
@PreAuthorize("@ss.hasPermi('system:dict:add')")
|
|
|
@Log(title = "字典类型", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
@@ -83,9 +90,10 @@ public class SysDictTypeController extends BaseController
|
|
|
/**
|
|
|
* 修改字典类型
|
|
|
*/
|
|
|
+ @ApiOperation("修改字典类型")
|
|
|
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
|
|
|
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
|
|
|
- @PutMapping
|
|
|
+ @PostMapping("/edit")
|
|
|
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
|
|
|
{
|
|
|
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
|
|
|
@@ -99,9 +107,10 @@ public class SysDictTypeController extends BaseController
|
|
|
/**
|
|
|
* 删除字典类型
|
|
|
*/
|
|
|
+ @ApiOperation("删除字典类型")
|
|
|
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
|
|
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{dictIds}")
|
|
|
+ @PostMapping("/delete/{dictIds}")
|
|
|
public AjaxResult remove(@PathVariable Long[] dictIds)
|
|
|
{
|
|
|
return toAjax(dictTypeService.deleteDictTypeByIds(dictIds));
|
|
|
@@ -110,6 +119,7 @@ public class SysDictTypeController extends BaseController
|
|
|
/**
|
|
|
* 清空缓存
|
|
|
*/
|
|
|
+
|
|
|
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
|
|
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
|
|
|
@DeleteMapping("/clearCache")
|
|
|
@@ -122,6 +132,7 @@ public class SysDictTypeController extends BaseController
|
|
|
/**
|
|
|
* 获取字典选择框列表
|
|
|
*/
|
|
|
+ @ApiOperation("获取字典选择框列表")
|
|
|
@GetMapping("/optionselect")
|
|
|
public AjaxResult optionselect()
|
|
|
{
|