diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrgApproverController.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrgApproverController.java index 57ce781eb..f1a205e64 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrgApproverController.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrgApproverController.java @@ -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<>(); diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/pojo/request/HrOrgApproverRequest.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/pojo/request/HrOrgApproverRequest.java index d29aec500..ed6443d59 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/pojo/request/HrOrgApproverRequest.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/pojo/request/HrOrgApproverRequest.java @@ -30,19 +30,21 @@ public class HrOrgApproverRequest extends BaseRequest { * 组织审批类型:1-负责人,2-部长,3-体系负责人,4-部门助理,5-资产助理(专员),6-考勤专员,7-HRBP,8-门禁员,9-办公账号员,10-转岗须知员 */ @ChineseDescription("组织审批类型:1-负责人,2-部长,3-体系负责人,4-部门助理,5-资产助理(专员),6-考勤专员,7-HRBP,8-门禁员,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; /** diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrgApproverServiceImpl.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrgApproverServiceImpl.java index 5d149b702..45034ada6 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrgApproverServiceImpl.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/service/impl/HrOrgApproverServiceImpl.java @@ -89,8 +89,11 @@ public class HrOrgApproverServiceImpl extends ServiceImpl 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