1.批量修改已分配员工数据功能
This commit is contained in:
@@ -114,9 +114,18 @@ public class EmployeeBigBrotherController {
|
||||
|
||||
@GetMapping("/self_page")
|
||||
@Operation(summary = "获得大哥数据员工业务分页")
|
||||
@PreAuthorize("@ss.hasPermission('server:employee-big-brother:query')")
|
||||
public CommonResult<PageResult<EmployeeBigBrotherRespVO>> getEmployeeBigBrotherPagewithSelf(@Valid EmployeeBigBrotherPageReqVO pageReqVO) {
|
||||
@PreAuthorize("@ss.hasPermission('server:employee-big-brother:selfquery')")
|
||||
public CommonResult<PageResult<EmployeeBigBrotherRespVO>> getEmployeeBigBrotherPageWithSelf(@Valid EmployeeBigBrotherPageReqVO pageReqVO) {
|
||||
PageResult<EmployeeBigBrotherDO> pageResult = employeeBigBrotherService.getEmployeeBigBrotherPageWithSelf(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, EmployeeBigBrotherRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
@PutMapping("/batch_update")
|
||||
@Operation(summary = "批量更新大哥数据员工业务")
|
||||
@PreAuthorize("@ss.hasPermission('server:employee-big-brother:batchupdate')")
|
||||
public CommonResult<Boolean> batchupdateEmployeeBigBrother(@Valid @RequestBody List<EmployeeBigBrotherSaveReqVO> updateReqVO) {
|
||||
employeeBigBrotherService.batchUpdateEmployeeBigBrother(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
@@ -63,4 +63,6 @@ public interface EmployeeBigBrotherService {
|
||||
Boolean allocationEmployeeBigBrother(@Valid List<EmployeeBigBrotherSaveReqVO> createReqVO);
|
||||
|
||||
PageResult<EmployeeBigBrotherDO> getEmployeeBigBrotherPageWithSelf(@Valid EmployeeBigBrotherPageReqVO pageReqVO);
|
||||
|
||||
void batchUpdateEmployeeBigBrother(@Valid List<EmployeeBigBrotherSaveReqVO> updateReqVO);
|
||||
}
|
||||
@@ -124,4 +124,13 @@ public class EmployeeBigBrotherServiceImpl implements EmployeeBigBrotherService
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchUpdateEmployeeBigBrother(List<EmployeeBigBrotherSaveReqVO> updateReqVO) {
|
||||
ArrayList<EmployeeBigBrotherDO> employeeBigBrotherDOS = new ArrayList<>();
|
||||
for (EmployeeBigBrotherSaveReqVO employeeBigBrotherSaveReqVO : updateReqVO) {
|
||||
employeeBigBrotherDOS.add(BeanUtils.toBean(employeeBigBrotherSaveReqVO, EmployeeBigBrotherDO.class));
|
||||
}
|
||||
employeeBigBrotherMapper.updateBatch(employeeBigBrotherDOS);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user