|
|
@@ -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.ISysPostService;
|
|
|
*
|
|
|
* @author zhongzheng
|
|
|
*/
|
|
|
+@Api(tags ="岗位信息管理")
|
|
|
@RestController
|
|
|
@RequestMapping("/system/post")
|
|
|
public class SysPostController extends BaseController
|
|
|
@@ -38,6 +42,7 @@ public class SysPostController extends BaseController
|
|
|
/**
|
|
|
* 获取岗位列表
|
|
|
*/
|
|
|
+ @ApiOperation("岗位列表")
|
|
|
@PreAuthorize("@ss.hasPermi('system:post:list')")
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(SysPost post)
|
|
|
@@ -60,6 +65,7 @@ public class SysPostController extends BaseController
|
|
|
/**
|
|
|
* 根据岗位编号获取详细信息
|
|
|
*/
|
|
|
+ @ApiOperation("根据岗位编号获取详细信息")
|
|
|
@PreAuthorize("@ss.hasPermi('system:post:query')")
|
|
|
@GetMapping(value = "/{postId}")
|
|
|
public AjaxResult getInfo(@PathVariable Long postId)
|
|
|
@@ -70,6 +76,7 @@ public class SysPostController extends BaseController
|
|
|
/**
|
|
|
* 新增岗位
|
|
|
*/
|
|
|
+ @ApiOperation("新增岗位")
|
|
|
@PreAuthorize("@ss.hasPermi('system:post:add')")
|
|
|
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
@@ -90,9 +97,10 @@ public class SysPostController extends BaseController
|
|
|
/**
|
|
|
* 修改岗位
|
|
|
*/
|
|
|
+ @ApiOperation("修改岗位")
|
|
|
@PreAuthorize("@ss.hasPermi('system:post:edit')")
|
|
|
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
|
|
|
- @PutMapping
|
|
|
+ @PostMapping("/edit")
|
|
|
public AjaxResult edit(@Validated @RequestBody SysPost post)
|
|
|
{
|
|
|
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
|