fix(分类): 其他类别文件查看失败问题修复
This commit is contained in:
parent
c66c553315
commit
77a8acaef3
@ -13,7 +13,6 @@ import com.qiwenshare.file.api.IUserService;
|
||||
import com.qiwenshare.file.config.security.user.JwtUser;
|
||||
import com.qiwenshare.file.domain.FileBean;
|
||||
import com.qiwenshare.file.domain.FileModel;
|
||||
import com.qiwenshare.file.domain.UserBean;
|
||||
import com.qiwenshare.file.domain.UserFile;
|
||||
import com.qiwenshare.file.dto.file.CreateOfficeFileDTO;
|
||||
import com.qiwenshare.file.dto.file.EditOfficeFileDTO;
|
||||
|
@ -70,6 +70,8 @@ public class OperationLogBean {
|
||||
*/
|
||||
private String logLevel;
|
||||
|
||||
|
||||
private Integer platform;
|
||||
|
||||
|
||||
}
|
||||
|
@ -28,6 +28,6 @@ public interface UserFileMapper extends BaseMapper<UserFile> {
|
||||
@Param("newFilePath") String newfilePath,
|
||||
@Param("userId") long userId);
|
||||
|
||||
IPage<FileListVo> selectPageVo(Page<?> page, @Param("userFile") UserFile userFile, @Param("extendNameList") List<String> extendNameList);
|
||||
IPage<FileListVo> selectPageVo(Page<?> page, @Param("userFile") UserFile userFile, @Param("fileTypeId") Integer fileTypeId);
|
||||
Long selectStorageSizeByUserId(@Param("userId") Long userId);
|
||||
}
|
||||
|
@ -154,13 +154,9 @@ public class UserFileService extends ServiceImpl<UserFileMapper, UserFile> impl
|
||||
public IPage<FileListVo> getFileByFileType(Integer fileTypeId, Long currentPage, Long pageCount, long userId) {
|
||||
Page<FileListVo> page = new Page<>(currentPage, pageCount);
|
||||
|
||||
List<String> extendNameList = fileTypeMapper.selectExtendNameByFileType(fileTypeId);
|
||||
if (extendNameList != null && extendNameList.isEmpty()) {
|
||||
return page;
|
||||
}
|
||||
UserFile userFile = new UserFile();
|
||||
userFile.setUserId(userId);
|
||||
return userFileMapper.selectPageVo(page, userFile, extendNameList);
|
||||
return userFileMapper.selectPageVo(page, userFile, fileTypeId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -152,7 +152,6 @@ public class UserService extends ServiceImpl<UserMapper, UserBean> implements IU
|
||||
authorities.add(simpleGrantedAuthority);
|
||||
}
|
||||
|
||||
// List<SimpleGrantedAuthority> authorities = roleList.stream().map(Role::getRoleName).map(SimpleGrantedAuthority::new).collect(Collectors.toList());
|
||||
JwtUser jwtUser = new JwtUser(user.getUserId(), user.getUsername(), user.getPassword(),
|
||||
user.getAvailable(), authorities);
|
||||
return jwtUser;
|
||||
|
@ -17,11 +17,15 @@
|
||||
left join image on a.fileId = image.fileId
|
||||
left join file on file.fileId = a.fileId
|
||||
<where>
|
||||
<if test="extendNameList != null and extendNameList.size() > 0">
|
||||
extendName in
|
||||
<foreach collection="extendNameList" open="(" close=")" separator="," item="extendName" >
|
||||
#{extendName}
|
||||
</foreach>
|
||||
<if test="fileTypeId != null">
|
||||
<choose>
|
||||
<when test="fileTypeId != 5">
|
||||
extendName in (select fileExtendName from fileclassification where fileTypeId = #{fileTypeId})
|
||||
</when>
|
||||
<otherwise>
|
||||
extendName not in (select fileExtendName from fileclassification where fileTypeId in (1, 2, 3, 4))
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="userFile.userId != null">
|
||||
and a.userId = #{userFile.userId}
|
||||
|
Loading…
Reference in New Issue
Block a user