【8.0】【权限】更新职位管理界面

pull/57/head
fengshuonan 2023-07-07 15:08:59 +08:00
parent 7020a46b4a
commit 5b7a119302
2 changed files with 31 additions and 10 deletions

View File

@ -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";
}

View File

@ -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<>();