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.config.security.user.JwtUser;
|
||||||
import com.qiwenshare.file.domain.FileBean;
|
import com.qiwenshare.file.domain.FileBean;
|
||||||
import com.qiwenshare.file.domain.FileModel;
|
import com.qiwenshare.file.domain.FileModel;
|
||||||
import com.qiwenshare.file.domain.UserBean;
|
|
||||||
import com.qiwenshare.file.domain.UserFile;
|
import com.qiwenshare.file.domain.UserFile;
|
||||||
import com.qiwenshare.file.dto.file.CreateOfficeFileDTO;
|
import com.qiwenshare.file.dto.file.CreateOfficeFileDTO;
|
||||||
import com.qiwenshare.file.dto.file.EditOfficeFileDTO;
|
import com.qiwenshare.file.dto.file.EditOfficeFileDTO;
|
||||||
|
@ -70,6 +70,8 @@ public class OperationLogBean {
|
|||||||
*/
|
*/
|
||||||
private String logLevel;
|
private String logLevel;
|
||||||
|
|
||||||
|
|
||||||
private Integer platform;
|
private Integer platform;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,6 @@ public interface UserFileMapper extends BaseMapper<UserFile> {
|
|||||||
@Param("newFilePath") String newfilePath,
|
@Param("newFilePath") String newfilePath,
|
||||||
@Param("userId") long userId);
|
@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);
|
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) {
|
public IPage<FileListVo> getFileByFileType(Integer fileTypeId, Long currentPage, Long pageCount, long userId) {
|
||||||
Page<FileListVo> page = new Page<>(currentPage, pageCount);
|
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 userFile = new UserFile();
|
||||||
userFile.setUserId(userId);
|
userFile.setUserId(userId);
|
||||||
return userFileMapper.selectPageVo(page, userFile, extendNameList);
|
return userFileMapper.selectPageVo(page, userFile, fileTypeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -152,7 +152,6 @@ public class UserService extends ServiceImpl<UserMapper, UserBean> implements IU
|
|||||||
authorities.add(simpleGrantedAuthority);
|
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(),
|
JwtUser jwtUser = new JwtUser(user.getUserId(), user.getUsername(), user.getPassword(),
|
||||||
user.getAvailable(), authorities);
|
user.getAvailable(), authorities);
|
||||||
return jwtUser;
|
return jwtUser;
|
||||||
|
@ -17,11 +17,15 @@
|
|||||||
left join image on a.fileId = image.fileId
|
left join image on a.fileId = image.fileId
|
||||||
left join file on file.fileId = a.fileId
|
left join file on file.fileId = a.fileId
|
||||||
<where>
|
<where>
|
||||||
<if test="extendNameList != null and extendNameList.size() > 0">
|
<if test="fileTypeId != null">
|
||||||
extendName in
|
<choose>
|
||||||
<foreach collection="extendNameList" open="(" close=")" separator="," item="extendName" >
|
<when test="fileTypeId != 5">
|
||||||
#{extendName}
|
extendName in (select fileExtendName from fileclassification where fileTypeId = #{fileTypeId})
|
||||||
</foreach>
|
</when>
|
||||||
|
<otherwise>
|
||||||
|
extendName not in (select fileExtendName from fileclassification where fileTypeId in (1, 2, 3, 4))
|
||||||
|
</otherwise>
|
||||||
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
<if test="userFile.userId != null">
|
<if test="userFile.userId != null">
|
||||||
and a.userId = #{userFile.userId}
|
and a.userId = #{userFile.userId}
|
||||||
|
Loading…
Reference in New Issue
Block a user