mirror of https://gitee.com/stylefeng/roses
【7.3.2】更新批量获取岗位集合
parent
95b68119cb
commit
5f4050658a
|
@ -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 {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue