Skip to content

Commit

Permalink
add search file name
Browse files Browse the repository at this point in the history
  • Loading branch information
zrll12 committed Dec 18, 2023
1 parent 651f486 commit 7da0e3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public ResponseEntity<Page<ShareVO>> getAllShares(ShareListRequest shareListRequ
long current = shareListRequest.getCurrent();
long size = shareListRequest.getPageSize();

if (size > 100) {
if (size > 20) {
throw new BusinessException(StatusCode.FORBIDDEN, "页面过大");
}

Expand All @@ -173,6 +173,7 @@ public ResponseEntity<Page<ShareVO>> getAllShares(ShareListRequest shareListRequ
ShareVO shareVO = new ShareVO();
BeanUtils.copyProperties(share, shareVO);
shareVO.setPassword(share.getPassword() != null);
shareVO.setFileName(userPictureService.getById(share.getId()).getFileName());
return shareVO;
}).collect(Collectors.toList());
shareVOPage.setRecords(shareVOList);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/cc/vastsea/toyou/model/vo/ShareVO.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public class ShareVO implements Serializable {
private Long id;
private Long uid;
private Boolean password;
private String fileName;
private Long downloads;
private Integer shareMode;
private Long expiry;
Expand Down

0 comments on commit 7da0e3a

Please sign in to comment.