【7.3.2】更新批量获取岗位集合

pull/41/head
fengshuonan 2022-11-05 15:30:25 +08:00
parent 95b68119cb
commit 5f4050658a
2 changed files with 19 additions and 1 deletions

View File

@ -98,8 +98,14 @@ public class HrPositionRequest extends BaseRequest {
/**
* id
*/
@NotNull(message = "职位id集合不能为空", groups = {batchDelete.class})
@NotNull(message = "职位id集合不能为空", groups = {batchDelete.class, batchQuery.class})
@ChineseDescription("职位id集合用在批量操作")
private List<Long> positionIds;
/**
*
*/
public @interface batchQuery {
}
}

View File

@ -33,6 +33,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.system.api.pojo.organization.HrPositionDTO;
import cn.stylefeng.roses.kernel.system.api.pojo.organization.HrPositionRequest;
import cn.stylefeng.roses.kernel.system.modular.organization.entity.HrPosition;
import cn.stylefeng.roses.kernel.system.modular.organization.service.HrPositionService;
@ -154,4 +155,15 @@ public class HrPositionController {
return new SuccessResponseData<>(hrPositionService.findList(hrPositionRequest));
}
/**
* id
*
* @author fengshuonan
* @date 2022/11/5 15:27
*/
@PostResource(name = "获取岗位集合列表通过岗位id集合", path = "/hrPosition/getPositionListByIds")
public ResponseData<List<HrPositionDTO>> getPositionListByIds(@RequestBody @Validated(HrPositionRequest.batchQuery.class) HrPositionRequest hrPositionRequest) {
return new SuccessResponseData<>(hrPositionService.getPositionDetailList(hrPositionRequest.getPositionIds()));
}
}