预览优化
This commit is contained in:
parent
a40ea5109c
commit
1addde3ac7
2
pom.xml
2
pom.xml
@ -11,7 +11,7 @@
|
||||
|
||||
<groupId>com.qiwenshare</groupId>
|
||||
<artifactId>qiwen-file</artifactId>
|
||||
<version>1.0.2-SNAPSHOT</version>
|
||||
<version>1.0.3-SNAPSHOT</version>
|
||||
<name>qiwen-file</name>
|
||||
<description>fileos.qiwenshare.com</description>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -160,8 +160,10 @@ public class FiletransferController {
|
||||
@GetMapping("/preview")
|
||||
public void preview(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, PreviewDTO previewDTO){
|
||||
UserFile userFile = userFileService.getById(previewDTO.getUserFileId());
|
||||
String token = previewDTO.getToken();
|
||||
if ("1".equals(previewDTO.getMode())) {
|
||||
|
||||
if ("undefined".equals(previewDTO.getShareBatchNum()) || StringUtils.isEmpty(previewDTO.getShareBatchNum())) {
|
||||
|
||||
String token = previewDTO.getToken();
|
||||
UserBean sessionUserBean = userService.getUserBeanByToken(token);
|
||||
if (sessionUserBean == null) {
|
||||
return;
|
||||
@ -169,7 +171,8 @@ public class FiletransferController {
|
||||
if (userFile.getUserId() != sessionUserBean.getUserId()) {
|
||||
return;
|
||||
}
|
||||
} else if ("2".equals(previewDTO.getMode())) {
|
||||
} else {
|
||||
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put("shareBatchNum", previewDTO.getShareBatchNum());
|
||||
List<Share> shareList = shareService.listByMap(param);
|
||||
|
@ -8,8 +8,6 @@ import lombok.Data;
|
||||
public class PreviewDTO {
|
||||
private Long userFileId;
|
||||
private String token;
|
||||
@Schema(description="预览模式,1-登录,2-分享")
|
||||
private String mode;
|
||||
@Schema(description="批次号")
|
||||
private String shareBatchNum;
|
||||
@Schema(description="提取码")
|
||||
|
@ -41,8 +41,8 @@ public class ShareFileListVO {
|
||||
//
|
||||
// private String shareTime;
|
||||
// private String endTime;
|
||||
// private String extractionCode;
|
||||
// private String shareBatchNum;
|
||||
private String extractionCode;
|
||||
private String shareBatchNum;
|
||||
// private Integer shareType;//0公共,1私密,2好友
|
||||
// private Integer shareStatus;//0正常,1已失效,2已撤销
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
<select id="selectShareFileList" resultType="com.qiwenshare.file.vo.share.ShareFileListVO">
|
||||
select * from sharefile a
|
||||
LEFT JOIN share ON share.shareBatchNum = a.shareBatchNum
|
||||
left join userfile b on b.userFileId = a.userFileId
|
||||
left join file c on c.fileId = b.fileId
|
||||
where a.shareBatchNum = #{shareBatchNum}
|
||||
|
Loading…
Reference in New Issue
Block a user