mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 23:11:24 +08:00
Provides an interface to display the top 5 entries of personal transactions
This commit is contained in:
@@ -43,6 +43,16 @@ public class AffairController {
|
|||||||
return ResponseResult.build(ResponseCode.DATABASE_SELECT_OK, "success", affairService.list(wrapper));
|
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")
|
@GetMapping("/not_approved")
|
||||||
@PreAuthorize("hasAuthority('affair:manage:get')")
|
@PreAuthorize("hasAuthority('affair:manage:get')")
|
||||||
public ResponseResult<List<Affair>> selectNotApproved() {
|
public ResponseResult<List<Affair>> selectNotApproved() {
|
||||||
|
|||||||
Reference in New Issue
Block a user