【7.2.5】【org】更新删除绑定审批人

pull/37/head
fengshuonan 2022-09-15 00:18:25 +08:00
parent fcd1e83e6f
commit 4959f658cc
3 changed files with 10 additions and 5 deletions

View File

@ -52,12 +52,12 @@ public class HrOrgApproverController {
}
/**
*
*
*
* @author fengshuonan
* @date 2022/09/13 23:15
*/
@PostResource(name = "删除", path = "/hrOrgApprover/delete")
@PostResource(name = "删除绑定审批人", path = "/hrOrgApprover/delete")
public ResponseData<?> delete(@RequestBody @Validated(HrOrgApproverRequest.delete.class) HrOrgApproverRequest hrOrgApproverRequest) {
hrOrgApproverService.del(hrOrgApproverRequest);
return new SuccessResponseData<>();

View File

@ -30,19 +30,21 @@ public class HrOrgApproverRequest extends BaseRequest {
* 1-2-3-4-5-6-7-HRBP8-9-10-
*/
@ChineseDescription("组织审批类型1-负责人2-部长3-体系负责人4-部门助理5-资产助理专员6-考勤专员7-HRBP8-门禁员9-办公账号员10-转岗须知员")
@NotNull(message = "组织审批类型不能为空", groups = {delete.class})
private Integer orgApproverType;
/**
* id
*/
@ChineseDescription("组织机构id")
@NotNull(message = "组织机构id不能为空", groups = {list.class, add.class})
@NotNull(message = "组织机构id不能为空", groups = {list.class, add.class, delete.class})
private Long orgId;
/**
* id
*/
@ChineseDescription("用户id")
@NotNull(message = "用户id不能为空", groups = {delete.class})
private Long userId;
/**

View File

@ -89,8 +89,11 @@ public class HrOrgApproverServiceImpl extends ServiceImpl<HrOrgApproverMapper, H
@Override
public void del(HrOrgApproverRequest hrOrgApproverRequest) {
HrOrgApprover hrOrgApprover = this.queryHrOrgApprover(hrOrgApproverRequest);
this.removeById(hrOrgApprover.getOrgApproverId());
LambdaQueryWrapper<HrOrgApprover> hrOrgApproverLambdaQueryWrapper = new LambdaQueryWrapper<>();
hrOrgApproverLambdaQueryWrapper.eq(HrOrgApprover::getOrgId, hrOrgApproverRequest.getOrgId());
hrOrgApproverLambdaQueryWrapper.eq(HrOrgApprover::getOrgApproverType, hrOrgApproverRequest.getOrgApproverType());
hrOrgApproverLambdaQueryWrapper.eq(HrOrgApprover::getUserId, hrOrgApproverRequest.getUserId());
this.remove(hrOrgApproverLambdaQueryWrapper);
}
@Override