mirror of https://gitee.com/stylefeng/roses
【8.0】【权限】更新职位管理界面
parent
7020a46b4a
commit
5b7a119302
|
@ -14,33 +14,49 @@ public interface PermissionCodeConstants {
|
|||
String COMPANY_STAT_INFO = "COMPANY_STAT_INFO";
|
||||
|
||||
/**
|
||||
* 人员_新增人员
|
||||
* 人员管理界面-新增人员
|
||||
*/
|
||||
String ADD_USER = "ADD_USER";
|
||||
|
||||
/**
|
||||
* 人员_修改人员
|
||||
* 人员管理界面-修改人员
|
||||
*/
|
||||
String EDIT_USER = "EDIT_USER";
|
||||
|
||||
/**
|
||||
* 人员_删除人员
|
||||
* 人员管理界面-删除人员
|
||||
*/
|
||||
String DELETE_USER = "DELETE_USER";
|
||||
|
||||
/**
|
||||
* 人员_分配角色
|
||||
* 人员管理界面-分配角色
|
||||
*/
|
||||
String ASSIGN_USER_ROLE = "ASSIGN_USER_ROLE";
|
||||
|
||||
/**
|
||||
* 人员_重置密码
|
||||
* 人员管理界面-重置密码
|
||||
*/
|
||||
String RESET_PASSWORD = "RESET_PASSWORD";
|
||||
|
||||
/**
|
||||
* 人员_修改状态
|
||||
* 人员管理界面-修改状态
|
||||
*/
|
||||
String UPDATE_USER_STATUS = "UPDATE_USER_STATUS";
|
||||
|
||||
/**
|
||||
* 职位管理界面-新增职位
|
||||
*/
|
||||
String ADD_POSITION = "ADD_POSITION";
|
||||
|
||||
/**
|
||||
* 职位管理界面-修改职位
|
||||
*/
|
||||
String EDIT_POSITION = "EDIT_POSITION";
|
||||
|
||||
/**
|
||||
* 职位管理界面-删除职位
|
||||
*/
|
||||
String DELETE_POSITION = "DELETE_POSITION";
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
|||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
|
||||
import cn.stylefeng.roses.kernel.sys.api.constants.PermissionCodeConstants;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.position.entity.HrPosition;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.position.pojo.request.HrPositionRequest;
|
||||
import cn.stylefeng.roses.kernel.sys.modular.position.service.HrPositionService;
|
||||
|
@ -35,7 +36,8 @@ public class HrPositionController {
|
|||
* @author fengshuonan
|
||||
* @date 2023/06/10 21:25
|
||||
*/
|
||||
@PostResource(name = "添加职位", path = "/hrPosition/add")
|
||||
@PostResource(name = "添加职位", path = "/hrPosition/add", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.ADD_POSITION)
|
||||
public ResponseData<HrPosition> add(@RequestBody @Validated(HrPositionRequest.add.class) HrPositionRequest hrPositionRequest) {
|
||||
hrPositionService.add(hrPositionRequest);
|
||||
return new SuccessResponseData<>();
|
||||
|
@ -47,7 +49,8 @@ public class HrPositionController {
|
|||
* @author fengshuonan
|
||||
* @date 2023/06/10 21:25
|
||||
*/
|
||||
@PostResource(name = "删除职位", path = "/hrPosition/delete")
|
||||
@PostResource(name = "删除职位", path = "/hrPosition/delete", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.DELETE_POSITION)
|
||||
public ResponseData<?> delete(@RequestBody @Validated(HrPositionRequest.delete.class) HrPositionRequest hrPositionRequest) {
|
||||
hrPositionService.del(hrPositionRequest);
|
||||
return new SuccessResponseData<>();
|
||||
|
@ -59,7 +62,8 @@ public class HrPositionController {
|
|||
* @author fengshuonan
|
||||
* @date 2023/06/10 21:25
|
||||
*/
|
||||
@PostResource(name = "批量删除职位", path = "/hrPosition/batchDelete")
|
||||
@PostResource(name = "批量删除职位", path = "/hrPosition/batchDelete", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.DELETE_POSITION)
|
||||
public ResponseData<?> batchDelete(@RequestBody @Validated(BaseRequest.batchDelete.class) HrPositionRequest hrPositionRequest) {
|
||||
hrPositionService.batchDelete(hrPositionRequest);
|
||||
return new SuccessResponseData<>();
|
||||
|
@ -71,7 +75,8 @@ public class HrPositionController {
|
|||
* @author fengshuonan
|
||||
* @date 2023/06/10 21:25
|
||||
*/
|
||||
@PostResource(name = "编辑职位", path = "/hrPosition/edit")
|
||||
@PostResource(name = "编辑职位", path = "/hrPosition/edit", requiredPermission = true,
|
||||
requirePermissionCode = PermissionCodeConstants.EDIT_POSITION)
|
||||
public ResponseData<?> edit(@RequestBody @Validated(HrPositionRequest.edit.class) HrPositionRequest hrPositionRequest) {
|
||||
hrPositionService.edit(hrPositionRequest);
|
||||
return new SuccessResponseData<>();
|
||||
|
|
Loading…
Reference in New Issue