1
0
mirror of https://github.com/FatttSnake/Pinnacle-OA.git synced 2026-04-05 15:01:23 +08:00

Provides an interface to display the top 5 entries of personal transactions

This commit is contained in:
assina045
2023-05-31 15:38:21 +08:00
parent 590e050a12
commit e704faa121

View File

@@ -43,6 +43,16 @@ public class AffairController {
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", affairService.list(wrapper));
}
@GetMapping("/personal_affairs_limit")
@PreAuthorize("hasAuthority('affair:self:get')")
public ResponseResult<List<Affair>> getPersonalAffairsLimit() {
LambdaQueryWrapper<Affair> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(Affair::getApplicantId, WebUtil.getLoginUser().getUser().getId());
wrapper.orderByDesc(Affair::getCreateTime);
wrapper.last("limit 5");
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", affairService.list(wrapper));
}
@GetMapping("/not_approved")
@PreAuthorize("hasAuthority('affair:manage:get')")
public ResponseResult<List<Affair>> selectNotApproved() {