Compare commits
14 Commits
6eeb93f90b
...
8454178f46
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8454178f46 | ||
![]() |
f4fda113b9 | ||
![]() |
f15c0a3524 | ||
![]() |
16c2d8e35a | ||
![]() |
2eb34c3b04 | ||
![]() |
d85cc30721 | ||
![]() |
746ec5cf65 | ||
![]() |
eb44028141 | ||
![]() |
1b3e81372b | ||
![]() |
7706385014 | ||
![]() |
51e87fb396 | ||
![]() |
dd5a116b64 | ||
![]() |
a9eed4b81c | ||
![]() |
d1562fa334 |
@ -10,15 +10,21 @@ import java.util.List;
|
||||
|
||||
public interface IUserFileService extends IService<UserFile> {
|
||||
List<UserFile> selectUserFileByNameAndPath(String fileName, String filePath, String userId);
|
||||
|
||||
List<UserFile> selectSameUserFile(String fileName, String filePath, String extendName, String userId);
|
||||
|
||||
IPage<FileListVO> userFileList(String userId, String filePath, Long beginCount, Long pageCount);
|
||||
IPage<FileListVO> userFileList(Integer sysFlag, String userId, String filePath, Long beginCount, Long pageCount,String fileName);
|
||||
|
||||
void updateFilepathByUserFileId(String userFileId, String newfilePath, String userId);
|
||||
|
||||
void userFileCopy(String userId, String userFileId, String newfilePath);
|
||||
|
||||
IPage<FileListVO> getFileByFileType(Integer fileTypeId, Long currentPage, Long pageCount, String userId);
|
||||
IPage<FileListVO> getFileByFileType(Integer sysFlag, Integer fileTypeId, Long currentPage, Long pageCount, String userId,String fileName);
|
||||
|
||||
List<UserFile> selectUserFileListByPath(String filePath, String userId);
|
||||
|
||||
List<UserFile> selectFilePathTreeByUserId(String userId);
|
||||
|
||||
void deleteUserFile(String userFileId, String sessionUserId);
|
||||
|
||||
List<UserFile> selectUserFileByLikeRightFilePath(@Param("filePath") String filePath, @Param("userId") String userId);
|
||||
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.qiwenshare.common.result.RestResult;
|
||||
import com.qiwenshare.file.domain.user.Role;
|
||||
import com.qiwenshare.file.domain.user.UserBean;
|
||||
import com.qiwenshare.file.dto.user.EditPassWordDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -22,16 +23,20 @@ public interface IUserService extends IService<UserBean> {
|
||||
RestResult<String> registerUser(UserBean userBean);
|
||||
|
||||
|
||||
|
||||
UserBean findUserInfoByTelephone(String telephone);
|
||||
|
||||
List<Role> selectRoleListByUserId(String userId);
|
||||
|
||||
String getSaltByTelephone(String telephone);
|
||||
|
||||
UserBean selectUserByTelephoneAndPassword(String username, String password);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 修改密码
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
RestResult<String> editPassword(EditPassWordDTO dto);
|
||||
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
|
||||
"/notice/list",
|
||||
"/notice/detail",
|
||||
"/param/grouplist",
|
||||
|
||||
"/v3/api-docs",
|
||||
"/swagger-ui.html",
|
||||
"/office/IndexServlet"
|
||||
};
|
||||
|
@ -47,7 +47,7 @@ public class CommonFileController {
|
||||
@PostMapping(value = "/commonfile")
|
||||
@MyLog(operation = "共享文件", module = CURRENT_MODULE)
|
||||
@ResponseBody
|
||||
public RestResult<String> commonFile( @RequestBody CommonFileDTO commonFileDTO) {
|
||||
public RestResult<String> commonFile(@RequestBody CommonFileDTO commonFileDTO) {
|
||||
CommonFile commonFile = new CommonFile();
|
||||
commonFile.setUserFileId(commonFileDTO.getUserFileId());
|
||||
commonFile.setCommonFileId(IdUtil.getSnowflakeNextIdStr());
|
||||
@ -57,11 +57,11 @@ public class CommonFileController {
|
||||
List<FilePermission> list = JSON.parseArray(commonFileDTO.getCommonUserList(), FilePermission.class);
|
||||
|
||||
List<FilePermission> filePermissionList = new ArrayList<>();
|
||||
for (FilePermission filePermission : list) {
|
||||
filePermission.setFilePermissionId(IdUtil.getSnowflakeNextId());
|
||||
for (FilePermission filePermission : list) {
|
||||
filePermission.setFilePermissionId(IdUtil.getSnowflakeNextId());
|
||||
filePermission.setCommonFileId(commonFile.commonFileId);
|
||||
filePermissionList.add(filePermission);
|
||||
}
|
||||
}
|
||||
filePermissionService.saveBatch(filePermissionList);
|
||||
|
||||
return RestResult.success();
|
||||
@ -73,7 +73,7 @@ public class CommonFileController {
|
||||
@ResponseBody
|
||||
public RestResult<List<CommonFileUser>> commonFileUserList() {
|
||||
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
List<CommonFileUser> list = commonFileService.selectCommonFileUser(sessionUserBean.getUserId());
|
||||
return RestResult.success().data(list);
|
||||
}
|
||||
@ -82,8 +82,8 @@ public class CommonFileController {
|
||||
@RequestMapping(value = "/getCommonFileByUser", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public RestResult<CommonFileListVo> getCommonFileByUser(
|
||||
@Parameter(description = "用户id", required = true) String userId){
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
@Parameter(description = "用户id", required = true) String userId) {
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
List<CommonFileListVo> commonFileVo = commonFileService.selectCommonFileByUser(userId, sessionUserBean.getUserId());
|
||||
|
||||
return RestResult.success().data(commonFileVo);
|
||||
@ -97,12 +97,13 @@ public class CommonFileController {
|
||||
@Parameter(description = "用户id", required = true) Long commonFileId,
|
||||
@Parameter(description = "文件路径", required = true) String filePath,
|
||||
@Parameter(description = "当前页", required = true) long currentPage,
|
||||
@Parameter(description = "页面数量", required = true) long pageCount){
|
||||
@Parameter(description = "页面数量", required = true) long pageCount,
|
||||
@Parameter(description = "是否文件管理员", required = false) Integer sysFlag) {
|
||||
|
||||
CommonFile commonFile = commonFileService.getById(commonFileId);
|
||||
UserFile userFile = userFileService.getById(commonFile.getUserFileId());
|
||||
QiwenFile qiwenFile = new QiwenFile(userFile.getFilePath(), filePath, true);
|
||||
IPage<FileListVO> fileList = userFileService.userFileList(userFile.getUserId(), qiwenFile.getPath(), currentPage, pageCount);
|
||||
IPage<FileListVO> fileList = userFileService.userFileList(sysFlag, userFile.getUserId(), qiwenFile.getPath(), currentPage, pageCount, null);
|
||||
|
||||
return RestResult.success().data(fileList);
|
||||
|
||||
|
@ -1,13 +1,7 @@
|
||||
package com.qiwenshare.file.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import co.elastic.clients.elasticsearch.ElasticsearchClient;
|
||||
import co.elastic.clients.elasticsearch.core.SearchResponse;
|
||||
import co.elastic.clients.elasticsearch.core.search.HighlighterEncoder;
|
||||
import co.elastic.clients.elasticsearch.core.search.Hit;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -21,7 +15,6 @@ import com.qiwenshare.file.api.IFileService;
|
||||
import com.qiwenshare.file.api.IUserFileService;
|
||||
import com.qiwenshare.file.component.AsyncTaskComp;
|
||||
import com.qiwenshare.file.component.FileDealComp;
|
||||
import com.qiwenshare.file.config.es.FileSearch;
|
||||
import com.qiwenshare.file.domain.FileBean;
|
||||
import com.qiwenshare.file.domain.UserFile;
|
||||
import com.qiwenshare.file.dto.file.*;
|
||||
@ -38,8 +31,6 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.codec.digest.DigestUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.jetty.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@ -55,8 +46,7 @@ import java.net.URLDecoder;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@Tag(name = "file", description = "该接口为文件接口,主要用来做一些文件的基本操作,如创建目录,删除,移动,复制等。")
|
||||
@RestController
|
||||
@ -180,62 +170,62 @@ public class FileController {
|
||||
@MyLog(operation = "文件搜索", module = CURRENT_MODULE)
|
||||
@ResponseBody
|
||||
public RestResult<SearchFileVO> searchFile(SearchFileDTO searchFileDTO) {
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
|
||||
int currentPage = (int)searchFileDTO.getCurrentPage() - 1;
|
||||
int pageCount = (int)(searchFileDTO.getPageCount() == 0 ? 10 : searchFileDTO.getPageCount());
|
||||
int currentPage = (int) searchFileDTO.getCurrentPage() - 1;
|
||||
int pageCount = (int) (searchFileDTO.getPageCount() == 0 ? 10 : searchFileDTO.getPageCount());
|
||||
|
||||
SearchResponse<FileSearch> search = null;
|
||||
try {
|
||||
search = elasticsearchClient.search(s -> s
|
||||
.index("filesearch")
|
||||
.query(_1 -> _1
|
||||
.bool(_2 -> _2
|
||||
.must(_3 -> _3
|
||||
.bool(_4 -> _4
|
||||
.should(_5 -> _5
|
||||
.match(_6 -> _6
|
||||
.field("fileName")
|
||||
.query(searchFileDTO.getFileName())))
|
||||
.should(_5 -> _5
|
||||
.wildcard(_6 -> _6
|
||||
.field("fileName")
|
||||
.wildcard("*" + searchFileDTO.getFileName() + "*")))
|
||||
.should(_5 -> _5
|
||||
.match(_6 -> _6
|
||||
.field("content")
|
||||
.query(searchFileDTO.getFileName())))
|
||||
.should(_5 -> _5
|
||||
.wildcard(_6 -> _6
|
||||
.field("content")
|
||||
.wildcard("*" + searchFileDTO.getFileName() + "*")))
|
||||
))
|
||||
.must(_3 -> _3
|
||||
.term(_4 -> _4
|
||||
.field("userId")
|
||||
.value(sessionUserBean.getUserId())))
|
||||
))
|
||||
.from(currentPage)
|
||||
.size(pageCount)
|
||||
.highlight(h -> h
|
||||
.fields("fileName", f -> f.type("plain")
|
||||
.preTags("<span class='keyword'>").postTags("</span>"))
|
||||
.encoder(HighlighterEncoder.Html))
|
||||
,
|
||||
FileSearch.class);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
List<SearchFileVO> searchFileVOList = new ArrayList<>();
|
||||
for (Hit<FileSearch> hit : search.hits().hits()) {
|
||||
SearchFileVO searchFileVO = new SearchFileVO();
|
||||
BeanUtil.copyProperties(hit.source(), searchFileVO);
|
||||
searchFileVO.setHighLight(hit.highlight());
|
||||
searchFileVOList.add(searchFileVO);
|
||||
asyncTaskComp.checkESUserFileId(searchFileVO.getUserFileId());
|
||||
}
|
||||
return RestResult.success().dataList(searchFileVOList, searchFileVOList.size());
|
||||
// SearchResponse<FileSearch> search = null;
|
||||
// try {
|
||||
// search = elasticsearchClient.search(s -> s
|
||||
// .index("filesearch")
|
||||
// .query(_1 -> _1
|
||||
// .bool(_2 -> _2
|
||||
// .must(_3 -> _3
|
||||
// .bool(_4 -> _4
|
||||
// .should(_5 -> _5
|
||||
// .match(_6 -> _6
|
||||
// .field("fileName")
|
||||
// .query(searchFileDTO.getFileName())))
|
||||
// .should(_5 -> _5
|
||||
// .wildcard(_6 -> _6
|
||||
// .field("fileName")
|
||||
// .wildcard("*" + searchFileDTO.getFileName() + "*")))
|
||||
// .should(_5 -> _5
|
||||
// .match(_6 -> _6
|
||||
// .field("content")
|
||||
// .query(searchFileDTO.getFileName())))
|
||||
// .should(_5 -> _5
|
||||
// .wildcard(_6 -> _6
|
||||
// .field("content")
|
||||
// .wildcard("*" + searchFileDTO.getFileName() + "*")))
|
||||
// ))
|
||||
// .must(_3 -> _3
|
||||
// .term(_4 -> _4
|
||||
// .field("userId")
|
||||
// .value(sessionUserBean.getUserId())))
|
||||
// ))
|
||||
// .from(currentPage)
|
||||
// .size(pageCount)
|
||||
// .highlight(h -> h
|
||||
// .fields("fileName", f -> f.type("plain")
|
||||
// .preTags("<span class='keyword'>").postTags("</span>"))
|
||||
// .encoder(HighlighterEncoder.Html))
|
||||
// ,
|
||||
// FileSearch.class);
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// List<SearchFileVO> searchFileVOList = new ArrayList<>();
|
||||
// for (Hit<FileSearch> hit : search.hits().hits()) {
|
||||
// SearchFileVO searchFileVO = new SearchFileVO();
|
||||
// BeanUtil.copyProperties(hit.source(), searchFileVO);
|
||||
// searchFileVO.setHighLight(hit.highlight());
|
||||
// searchFileVOList.add(searchFileVO);
|
||||
// asyncTaskComp.checkESUserFileId(searchFileVO.getUserFileId());
|
||||
// }
|
||||
return RestResult.success();
|
||||
}
|
||||
|
||||
|
||||
@ -245,7 +235,7 @@ public class FileController {
|
||||
@ResponseBody
|
||||
public RestResult<String> renameFile(@RequestBody RenameFileDTO renameFileDto) {
|
||||
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
UserFile userFile = userFileService.getById(renameFileDto.getUserFileId());
|
||||
|
||||
List<UserFile> userFiles = userFileService.selectUserFileByNameAndPath(renameFileDto.getFileName(), userFile.getFilePath(), sessionUserBean.getUserId());
|
||||
@ -262,7 +252,8 @@ public class FileController {
|
||||
List<UserFile> list = userFileService.selectUserFileByLikeRightFilePath(new QiwenFile(userFile.getFilePath(), userFile.getFileName(), true).getPath(), sessionUserBean.getUserId());
|
||||
|
||||
for (UserFile newUserFile : list) {
|
||||
newUserFile.setFilePath(newUserFile.getFilePath().replaceFirst(new QiwenFile(userFile.getFilePath(), userFile.getFileName(), userFile.getIsDir() == 1).getPath(),
|
||||
String escapedPattern = Pattern.quote(new QiwenFile(userFile.getFilePath(), userFile.getFileName(), userFile.getIsDir() == 1).getPath());
|
||||
newUserFile.setFilePath(newUserFile.getFilePath().replaceFirst(escapedPattern,
|
||||
new QiwenFile(userFile.getFilePath(), renameFileDto.getFileName(), userFile.getIsDir() == 1).getPath()));
|
||||
userFileService.updateById(newUserFile);
|
||||
}
|
||||
@ -277,13 +268,15 @@ public class FileController {
|
||||
public RestResult<FileListVO> getFileList(
|
||||
@Parameter(description = "文件类型", required = true) String fileType,
|
||||
@Parameter(description = "文件路径", required = true) String filePath,
|
||||
@Parameter(description = "文件名称", required = false) String fileName,
|
||||
@Parameter(description = "当前页", required = true) long currentPage,
|
||||
@Parameter(description = "页面数量", required = true) long pageCount){
|
||||
@Parameter(description = "页面数量", required = true) long pageCount,
|
||||
@Parameter(description = "是否文件管理员", required = false) Integer sysFlag) {
|
||||
if ("0".equals(fileType)) {
|
||||
IPage<FileListVO> fileList = userFileService.userFileList(null, filePath, currentPage, pageCount);
|
||||
IPage<FileListVO> fileList = userFileService.userFileList(sysFlag, null, filePath, currentPage, pageCount, fileName);
|
||||
return RestResult.success().dataList(fileList.getRecords(), fileList.getTotal());
|
||||
} else {
|
||||
IPage<FileListVO> fileList = userFileService.getFileByFileType(Integer.valueOf(fileType), currentPage, pageCount, SessionUtil.getSession().getUserId());
|
||||
IPage<FileListVO> fileList = userFileService.getFileByFileType(sysFlag, Integer.valueOf(fileType), currentPage, pageCount, SessionUtil.getSession().getUserId(), fileName);
|
||||
return RestResult.success().dataList(fileList.getRecords(), fileList.getTotal());
|
||||
}
|
||||
}
|
||||
@ -298,8 +291,8 @@ public class FileController {
|
||||
String[] userFileIdList = userFileIds.split(",");
|
||||
userFileService.update(new UpdateWrapper<UserFile>().lambda().set(UserFile::getDeleteFlag, 1).in(UserFile::getUserFileId, Arrays.asList(userFileIdList)));
|
||||
for (String userFileId : userFileIdList) {
|
||||
executor.execute(()->{
|
||||
userFileService.deleteUserFile(userFileId, SessionUtil.getUserId());
|
||||
executor.execute(() -> {
|
||||
userFileService.deleteUserFile(userFileId, SessionUtil.getUserId());
|
||||
});
|
||||
|
||||
fileDealComp.deleteESByUserFileId(userFileId);
|
||||
@ -314,7 +307,7 @@ public class FileController {
|
||||
@ResponseBody
|
||||
public RestResult deleteFile(@RequestBody DeleteFileDTO deleteFileDto) {
|
||||
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
userFileService.deleteUserFile(deleteFileDto.getUserFileId(), sessionUserBean.getUserId());
|
||||
fileDealComp.deleteESByUserFileId(deleteFileDto.getUserFileId());
|
||||
|
||||
@ -372,7 +365,7 @@ public class FileController {
|
||||
@ResponseBody
|
||||
public RestResult<String> moveFile(@RequestBody MoveFileDTO moveFileDto) {
|
||||
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
UserFile userFile = userFileService.getById(moveFileDto.getUserFileId());
|
||||
String oldfilePath = userFile.getFilePath();
|
||||
String newfilePath = moveFileDto.getFilePath();
|
||||
@ -398,7 +391,7 @@ public class FileController {
|
||||
@ResponseBody
|
||||
public RestResult<String> batchMoveFile(@RequestBody BatchMoveFileDTO batchMoveFileDto) {
|
||||
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
|
||||
|
||||
String newfilePath = batchMoveFileDto.getFilePath();
|
||||
@ -427,14 +420,14 @@ public class FileController {
|
||||
public RestResult<TreeNode> getFileTree() {
|
||||
RestResult<TreeNode> result = new RestResult<TreeNode>();
|
||||
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
|
||||
List<UserFile> userFileList = userFileService.selectFilePathTreeByUserId(sessionUserBean.getUserId());
|
||||
TreeNode resultTreeNode = new TreeNode();
|
||||
resultTreeNode.setLabel(QiwenFile.separator);
|
||||
resultTreeNode.setId(0L);
|
||||
long id = 1;
|
||||
for (int i = 0; i < userFileList.size(); i++){
|
||||
for (int i = 0; i < userFileList.size(); i++) {
|
||||
UserFile userFile = userFileList.get(i);
|
||||
QiwenFile qiwenFile = new QiwenFile(userFile.getFilePath(), userFile.getFileName(), false);
|
||||
String filePath = qiwenFile.getPath();
|
||||
@ -442,13 +435,13 @@ public class FileController {
|
||||
Queue<String> queue = new LinkedList<>();
|
||||
|
||||
String[] strArr = filePath.split(QiwenFile.separator);
|
||||
for (int j = 0; j < strArr.length; j++){
|
||||
if (!"".equals(strArr[j]) && strArr[j] != null){
|
||||
for (int j = 0; j < strArr.length; j++) {
|
||||
if (!"".equals(strArr[j]) && strArr[j] != null) {
|
||||
queue.add(strArr[j]);
|
||||
}
|
||||
|
||||
}
|
||||
if (queue.size() == 0){
|
||||
if (queue.size() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -471,7 +464,7 @@ public class FileController {
|
||||
@RequestMapping(value = "/update", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public RestResult<String> updateFile(@RequestBody UpdateFileDTO updateFileDTO) {
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
UserFile userFile = userFileService.getById(updateFileDTO.getUserFileId());
|
||||
FileBean fileBean = fileService.getById(userFile.getFileId());
|
||||
Long pointCount = fileService.getFilePointCount(userFile.getFileId());
|
||||
@ -506,12 +499,10 @@ public class FileController {
|
||||
@RequestMapping(value = "/detail", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public RestResult<FileDetailVO> queryFileDetail(
|
||||
@Parameter(description = "用户文件Id", required = true) String userFileId){
|
||||
@Parameter(description = "用户文件Id", required = true) String userFileId) {
|
||||
FileDetailVO vo = fileService.getFileDetail(userFileId);
|
||||
return RestResult.success().data(vo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -32,7 +32,10 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@Tag(name = "share", description = "该接口为文件分享接口")
|
||||
@RestController
|
||||
@ -55,7 +58,7 @@ public class ShareController {
|
||||
@PostMapping(value = "/sharefile")
|
||||
@MyLog(operation = "分享文件", module = CURRENT_MODULE)
|
||||
@ResponseBody
|
||||
public RestResult<ShareFileVO> shareFile( @RequestBody ShareFileDTO shareFileDTO) {
|
||||
public RestResult<ShareFileVO> shareFile(@RequestBody ShareFileDTO shareFileDTO) {
|
||||
ShareFileVO shareSecretVO = new ShareFileVO();
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
|
||||
@ -113,7 +116,7 @@ public class ShareController {
|
||||
@Operation(summary = "保存分享文件", description = "用来将别人分享的文件保存到自己的网盘中", tags = {"share"})
|
||||
@PostMapping(value = "/savesharefile")
|
||||
@MyLog(operation = "保存分享文件", module = CURRENT_MODULE)
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@ResponseBody
|
||||
public RestResult saveShareFile(@RequestBody SaveShareFileDTO saveShareFileDTO) {
|
||||
|
||||
@ -137,8 +140,7 @@ public class ShareController {
|
||||
|
||||
if (userFile.getIsDir() == 1) {
|
||||
ShareFile shareFile = shareFileService.getOne(new QueryWrapper<ShareFile>().lambda().eq(ShareFile::getUserFileId, userFileId).eq(ShareFile::getShareBatchNum, saveShareFileDTO.getShareBatchNum()));
|
||||
List<ShareFile> shareFileList = shareFileService.list(new QueryWrapper<ShareFile>().lambda().eq(ShareFile::getShareBatchNum, saveShareFileDTO.getShareBatchNum()).likeRight(ShareFile::getShareFilePath, QiwenFile.formatPath(shareFile.getShareFilePath() +"/"+ fileName)));
|
||||
|
||||
List<ShareFile> shareFileList = shareFileService.list(new QueryWrapper<ShareFile>().lambda().eq(ShareFile::getShareBatchNum, saveShareFileDTO.getShareBatchNum()).likeRight(ShareFile::getShareFilePath, QiwenFile.formatPath(shareFile.getShareFilePath() + "/" + fileName)));
|
||||
|
||||
|
||||
for (ShareFile shareFile1 : shareFileList) {
|
||||
@ -168,6 +170,7 @@ public class ShareController {
|
||||
@ResponseBody
|
||||
public RestResult<ShareListVO> shareList(ShareListDTO shareListDTO) {
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
shareListDTO.setSharedFlag(0);
|
||||
List<ShareListVO> shareList = shareService.selectShareList(shareListDTO, sessionUserBean.getUserId());
|
||||
|
||||
int total = shareService.selectShareListTotalCount(shareListDTO, sessionUserBean.getUserId());
|
||||
@ -176,6 +179,19 @@ public class ShareController {
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "查看共享列表", description = "查看共享列表", tags = {"share"})
|
||||
@GetMapping(value = "/getShareList")
|
||||
@ResponseBody
|
||||
public RestResult<ShareListVO> getShareList(ShareListDTO shareListDTO) {
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
shareListDTO.setSharedFlag(1);
|
||||
List<ShareListVO> shareList = shareService.selectShareList(shareListDTO, sessionUserBean.getUserId());
|
||||
|
||||
int total = shareService.selectShareListTotalCount(shareListDTO, sessionUserBean.getUserId());
|
||||
|
||||
return RestResult.success().dataList(shareList, total);
|
||||
}
|
||||
|
||||
@Operation(summary = "分享文件列表", description = "分享列表", tags = {"share"})
|
||||
@GetMapping(value = "/sharefileList")
|
||||
@ResponseBody
|
||||
@ -227,13 +243,17 @@ public class ShareController {
|
||||
return RestResult.fail().message("文件不存在!");
|
||||
}
|
||||
String endTime = share.getEndTime();
|
||||
// -- 如果过期时间为-1则不过期
|
||||
if ("999999".equals(endTime)) {
|
||||
return RestResult.success();
|
||||
}
|
||||
Date endTimeDate = null;
|
||||
try {
|
||||
endTimeDate = DateUtil.getDateByFormatString(endTime, "yyyy-MM-dd HH:mm:ss");
|
||||
} catch (ParseException e) {
|
||||
log.error("日期解析失败:{}" , e);
|
||||
log.error("日期解析失败:{}", e);
|
||||
}
|
||||
if (new Date().after(endTimeDate)) {
|
||||
if (new Date().after(endTimeDate)) {
|
||||
return RestResult.fail().message("分享已过期");
|
||||
} else {
|
||||
return RestResult.success();
|
||||
|
@ -13,6 +13,7 @@ import com.qiwenshare.file.api.IUserService;
|
||||
import com.qiwenshare.file.component.JwtComp;
|
||||
import com.qiwenshare.file.domain.UserLoginInfo;
|
||||
import com.qiwenshare.file.domain.user.UserBean;
|
||||
import com.qiwenshare.file.dto.user.EditPassWordDTO;
|
||||
import com.qiwenshare.file.dto.user.RegisterDTO;
|
||||
import com.qiwenshare.file.vo.user.UserLoginVo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@ -59,19 +60,35 @@ public class UserController {
|
||||
return restResult;
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "修改密码", description = "修改密码", tags = {"user"})
|
||||
@PostMapping(value = "/editPassword")
|
||||
@MyLog(operation = "修改密码", module = CURRENT_MODULE)
|
||||
@ResponseBody
|
||||
public RestResult<String> editPassword(@Valid @RequestBody EditPassWordDTO dto) {
|
||||
RestResult<String> restResult = null;
|
||||
restResult = userService.editPassword(dto);
|
||||
return restResult;
|
||||
}
|
||||
|
||||
@Operation(summary = "用户登录", description = "用户登录认证后才能进入系统", tags = {"user"})
|
||||
@GetMapping("/login")
|
||||
@MyLog(operation = "用户登录", module = CURRENT_MODULE)
|
||||
@ResponseBody
|
||||
public RestResult<UserLoginVo> userLogin(
|
||||
@Parameter(description = "登录手机号") String telephone,
|
||||
@Parameter(description = "登录密码") String password){
|
||||
@Parameter(description = "用户名") String userName) {
|
||||
String password = "123456";
|
||||
RestResult<UserLoginVo> restResult = new RestResult<UserLoginVo>();
|
||||
String salt = userService.getSaltByTelephone(telephone);
|
||||
String hashPassword = HashUtils.hashHex("MD5", password, salt, 1024);
|
||||
UserBean result = userService.selectUserByTelephoneAndPassword(telephone, hashPassword);
|
||||
if (result == null) {
|
||||
return RestResult.fail().message("手机号或密码错误!");
|
||||
result = new UserBean();
|
||||
result.setUsername(userName);
|
||||
result.setTelephone(telephone);
|
||||
result.setPassword(password);
|
||||
userService.registerUser(result);
|
||||
}
|
||||
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
|
@ -23,7 +23,7 @@ public class CommonFile {
|
||||
@TableId(type = IdType.AUTO)
|
||||
@Column(columnDefinition="varchar(20)")
|
||||
public String commonFileId;
|
||||
@Column(columnDefinition="bigint(20) comment '用户文件id'")
|
||||
@Column(columnDefinition="varchar(20) comment '用户文件id'")
|
||||
public String userFileId;
|
||||
// @Column(columnDefinition="int(2) comment '文件权限'")
|
||||
// public Integer filePermission;
|
||||
|
@ -20,7 +20,7 @@ public class RecoveryFile {
|
||||
@TableId(type = IdType.AUTO)
|
||||
@Column(columnDefinition="bigint(20)")
|
||||
private Long recoveryFileId;
|
||||
@Column(columnDefinition = "bigint(20) comment '用户文件id'")
|
||||
@Column(columnDefinition = "varchar(20) comment '用户文件id'")
|
||||
private String userFileId;
|
||||
@Column(columnDefinition="varchar(25) comment '删除时间'")
|
||||
private String deleteTime;
|
||||
|
@ -27,7 +27,7 @@ public class Share {
|
||||
private String extractionCode;
|
||||
@Column(columnDefinition="varchar(40) comment '分享批次号'")
|
||||
private String shareBatchNum;
|
||||
@Column(columnDefinition="int(2) comment '分享类型(0公共,1私密,2好友)'")
|
||||
@Column(columnDefinition="int(2) comment '分享类型(0公共,1私密,2好友,3共享)'")
|
||||
private Integer shareType;
|
||||
@Column(columnDefinition="int(2) comment '分享状态(0正常,1已失效,2已撤销)'")
|
||||
private Integer shareStatus;
|
||||
|
@ -11,7 +11,9 @@ import javax.persistence.*;
|
||||
* 存储信息类
|
||||
*/
|
||||
@Data
|
||||
@Table(name = "storage")
|
||||
@Table(name = "storage", uniqueConstraints = {
|
||||
@UniqueConstraint(name = "userid_index", columnNames = {"userId"})
|
||||
})
|
||||
@Entity
|
||||
@TableName("storage")
|
||||
public class StorageBean {
|
||||
|
@ -13,7 +13,7 @@ public class ShareFileDTO {
|
||||
private String userFileIds;
|
||||
@Schema(description = "过期日期", example="2020-05-23 22:10:33")
|
||||
private String endTime;
|
||||
@Schema(description = "分享类型", example="0公共分享,1私密分享,2好友分享")
|
||||
@Schema(description = "分享类型", example="0公共分享,1私密分享,2好友分享,3文件共享(丢到共享里面)")
|
||||
private Integer shareType;
|
||||
@Schema(description = "备注", example="")
|
||||
private String remarks;
|
||||
@ -21,4 +21,4 @@ public class ShareFileDTO {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,9 @@ import lombok.Data;
|
||||
@Data
|
||||
@Schema(name = "分享列表DTO",required = true)
|
||||
public class ShareListDTO {
|
||||
@Schema(description="是否共享列表 0否1是")
|
||||
private Integer sharedFlag;
|
||||
|
||||
@Schema(description="分享文件路径")
|
||||
private String shareFilePath;
|
||||
@Schema(description="批次号")
|
||||
|
@ -0,0 +1,24 @@
|
||||
package com.qiwenshare.file.dto.user;
|
||||
|
||||
import com.qiwenshare.common.constant.RegexConstant;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@Data
|
||||
@Schema(name = "用户注册DTO",required = true)
|
||||
public class EditPassWordDTO {
|
||||
|
||||
@Schema(description = "原密码", required = true, example = "password123")
|
||||
@NotBlank(message = "原密码")
|
||||
@Pattern(regexp = RegexConstant.PASSWORD_REGEX, message = "密码长度6-20位,不允许中文")
|
||||
private String oldPassword;
|
||||
|
||||
@Schema(description = "新密码", required = true, example = "password123")
|
||||
@NotBlank(message = "密码不能为空")
|
||||
@Pattern(regexp = RegexConstant.PASSWORD_REGEX, message = "密码长度6-20位,不允许中文")
|
||||
private String password;
|
||||
}
|
@ -6,8 +6,9 @@ import com.qiwenshare.file.vo.share.ShareListVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ShareMapper extends BaseMapper<Share> {
|
||||
public interface ShareMapper extends BaseMapper<Share> {
|
||||
|
||||
List<ShareListVO> selectShareList(String shareFilePath,String shareBatchNum, Long beginCount, Long pageCount, String userId);
|
||||
int selectShareListTotalCount(String shareFilePath,String shareBatchNum, String userId);
|
||||
List<ShareListVO> selectShareList(String shareFilePath, Integer sharedFlag, String shareBatchNum, Long beginCount, Long pageCount, String userId);
|
||||
|
||||
int selectShareListTotalCount(String shareFilePath, String shareBatchNum, String userId);
|
||||
}
|
||||
|
@ -2,13 +2,9 @@ package com.qiwenshare.file.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.qiwenshare.file.api.IShareService;
|
||||
import com.qiwenshare.file.domain.RecoveryFile;
|
||||
import com.qiwenshare.file.domain.Share;
|
||||
import com.qiwenshare.file.domain.ShareFile;
|
||||
import com.qiwenshare.file.dto.sharefile.ShareListDTO;
|
||||
import com.qiwenshare.file.mapper.RecoveryFileMapper;
|
||||
import com.qiwenshare.file.mapper.ShareMapper;
|
||||
import com.qiwenshare.file.vo.share.ShareFileListVO;
|
||||
import com.qiwenshare.file.vo.share.ShareListVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -28,6 +24,7 @@ public class ShareService extends ServiceImpl<ShareMapper, Share> implements ISh
|
||||
public List<ShareListVO> selectShareList(ShareListDTO shareListDTO, String userId) {
|
||||
Long beginCount = (shareListDTO.getCurrentPage() - 1) * shareListDTO.getPageCount();
|
||||
return shareMapper.selectShareList(shareListDTO.getShareFilePath(),
|
||||
shareListDTO.getSharedFlag(),
|
||||
shareListDTO.getShareBatchNum(),
|
||||
beginCount, shareListDTO.getPageCount(), userId);
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class UserFileService extends ServiceImpl<UserFileMapper, UserFile> imple
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<FileListVO> userFileList(String userId, String filePath, Long currentPage, Long pageCount) {
|
||||
public IPage<FileListVO> userFileList(Integer sysFlag, String userId, String filePath, Long currentPage, Long pageCount,String fileName) {
|
||||
Page<FileListVO> page = new Page<>(currentPage, pageCount);
|
||||
UserFile userFile = new UserFile();
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
@ -79,7 +79,11 @@ public class UserFileService extends ServiceImpl<UserFileMapper, UserFile> imple
|
||||
} else {
|
||||
userFile.setUserId(userId);
|
||||
}
|
||||
|
||||
//文件管理员不限制用户
|
||||
if (sysFlag != null && sysFlag == 1) {
|
||||
userFile.setUserId(null);
|
||||
}
|
||||
userFile.setFileName(fileName);
|
||||
userFile.setFilePath(URLDecoder.decodeForPath(filePath, StandardCharsets.UTF_8));
|
||||
|
||||
return userFileMapper.selectPageVo(page, userFile, null);
|
||||
@ -170,11 +174,16 @@ public class UserFileService extends ServiceImpl<UserFileMapper, UserFile> imple
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<FileListVO> getFileByFileType(Integer fileTypeId, Long currentPage, Long pageCount, String userId) {
|
||||
public IPage<FileListVO> getFileByFileType(Integer sysFlag, Integer fileTypeId, Long currentPage, Long pageCount, String userId,String fileName) {
|
||||
Page<FileListVO> page = new Page<>(currentPage, pageCount);
|
||||
|
||||
UserFile userFile = new UserFile();
|
||||
userFile.setUserId(userId);
|
||||
userFile.setFileName(fileName);
|
||||
//文件管理员不限制用户
|
||||
if (sysFlag != null && sysFlag == 1) {
|
||||
userFile.setUserId(null);
|
||||
}
|
||||
return userFileMapper.selectPageVo(page, userFile, fileTypeId);
|
||||
}
|
||||
|
||||
@ -241,7 +250,7 @@ public class UserFileService extends ServiceImpl<UserFileMapper, UserFile> imple
|
||||
List<UserFile> fileList = selectUserFileByLikeRightFilePath(filePath, userId);
|
||||
List<String> userFileIds = fileList.stream().map(UserFile::getUserFileId).collect(Collectors.toList());
|
||||
|
||||
//标记删除标志
|
||||
//标记删除标志
|
||||
if (CollectionUtils.isNotEmpty(userFileIds)) {
|
||||
LambdaUpdateWrapper<UserFile> userFileLambdaUpdateWrapper1 = new LambdaUpdateWrapper<>();
|
||||
userFileLambdaUpdateWrapper1.set(UserFile::getDeleteFlag, RandomUtil.randomInt(FileConstant.deleteFileRandomSize))
|
||||
|
@ -9,12 +9,14 @@ import com.qiwenshare.common.util.DateUtil;
|
||||
import com.qiwenshare.common.util.HashUtils;
|
||||
import com.qiwenshare.common.util.PasswordUtil;
|
||||
import com.qiwenshare.common.util.security.JwtUser;
|
||||
import com.qiwenshare.common.util.security.SessionUtil;
|
||||
import com.qiwenshare.file.api.IUserService;
|
||||
import com.qiwenshare.file.component.JwtComp;
|
||||
import com.qiwenshare.file.component.UserDealComp;
|
||||
import com.qiwenshare.file.controller.UserController;
|
||||
import com.qiwenshare.file.domain.user.Role;
|
||||
import com.qiwenshare.file.domain.user.UserBean;
|
||||
import com.qiwenshare.file.dto.user.EditPassWordDTO;
|
||||
import com.qiwenshare.file.mapper.UserMapper;
|
||||
import io.jsonwebtoken.Claims;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -32,7 +34,7 @@ import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class UserService extends ServiceImpl<UserMapper, UserBean> implements IUserService, UserDetailsService {
|
||||
|
||||
@Resource
|
||||
@ -83,7 +85,7 @@ public class UserService extends ServiceImpl<UserMapper, UserBean> implements IU
|
||||
if (userDealComp.isUserNameExit(userBean)) {
|
||||
return RestResult.fail().message("用户名已存在!");
|
||||
}
|
||||
if (!userDealComp.isPhoneFormatRight(userBean.getTelephone())){
|
||||
if (!userDealComp.isPhoneFormatRight(userBean.getTelephone())) {
|
||||
return RestResult.fail().message("手机号格式不正确!");
|
||||
}
|
||||
if (userDealComp.isPhoneExit(userBean)) {
|
||||
@ -143,9 +145,28 @@ public class UserService extends ServiceImpl<UserMapper, UserBean> implements IU
|
||||
|
||||
return userMapper.selectSaltByTelephone(telephone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserBean selectUserByTelephoneAndPassword(String username, String password) {
|
||||
return userMapper.selectUserByTelephoneAndPassword(username, password);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public RestResult<String> editPassword(EditPassWordDTO dto) {
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
UserBean userBean = this.getById(sessionUserBean.getUserId());
|
||||
|
||||
String oldPassword = HashUtils.hashHex("MD5", dto.getOldPassword(), userBean.getSalt(), 1024);
|
||||
if (!oldPassword.equals(userBean.getPassword())) {
|
||||
return RestResult.fail().message("密码错误!");
|
||||
}
|
||||
String salt = PasswordUtil.getSaltValue();
|
||||
String newPassword = HashUtils.hashHex("MD5", dto.getPassword(), salt, 1024);
|
||||
userBean.setSalt(salt);
|
||||
userBean.setPassword(newPassword);
|
||||
userMapper.updateById(userBean);
|
||||
return RestResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -42,5 +42,6 @@ public class FileListVO {
|
||||
|
||||
private Integer imageWidth;
|
||||
private Integer imageHeight;
|
||||
private String creator;
|
||||
|
||||
}
|
||||
|
@ -32,4 +32,6 @@ public class ShareListVO {
|
||||
private String fileUrl;
|
||||
private Long fileSize;
|
||||
private Integer storageType;
|
||||
private String creator;
|
||||
|
||||
}
|
||||
|
@ -6,6 +6,6 @@ import lombok.Data;
|
||||
@Data
|
||||
@Schema(description="分享类型VO")
|
||||
public class ShareTypeVO {
|
||||
@Schema(description="0公共,1私密,2好友")
|
||||
@Schema(description="0公共,1私密,2好友,3共享")
|
||||
private Integer shareType;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
server.port=8080
|
||||
server.port=8099
|
||||
|
||||
#环境切换 dev/prod
|
||||
spring.profiles.active=dev
|
||||
@ -14,16 +14,16 @@ logging.file.name=/qiwenshare/qiwen-file/log/web.log
|
||||
logging.level.root=info
|
||||
|
||||
#jpa配置 create/update
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
spring.jpa.hibernate.ddl-a·uto=update
|
||||
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
|
||||
spring.jpa.show-sql=true
|
||||
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
|
||||
|
||||
#jdbc连接-mysql数据库
|
||||
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.url = jdbc:mysql://localhost:3306/file?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
|
||||
spring.datasource.url = jdbc:mysql://rm-bp1yloyj508qld78jno.mysql.rds.aliyuncs.com:3306/file?allowMultiQueries=true&useUnicode=true&useSSL=false&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true&nullCatalogMeansCurrent=true
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=ma123456
|
||||
spring.datasource.password=Znalyrds2024
|
||||
|
||||
#静态资源指定
|
||||
spring.mvc.static-path-pattern=/**
|
||||
@ -76,13 +76,13 @@ fdfs.tracker-list=127.0.0.1:22122
|
||||
|
||||
|
||||
# Redis数据库索引(默认为0)
|
||||
spring.redis.database=0
|
||||
spring.redis.database=1
|
||||
# Redis服务器地址
|
||||
spring.redis.host=127.0.0.1
|
||||
# Redis服务器连接端口
|
||||
spring.redis.port=6379
|
||||
# Redis服务器连接密码(默认为空)
|
||||
spring.redis.password=ma123456
|
||||
spring.redis.password=ZNredis2024!
|
||||
# 连接池最大连接数(使用负值表示没有限制) 默认 8
|
||||
spring.redis.lettuce.pool.max-active=8
|
||||
# 连接池最大阻塞等待时间(使用负值表示没有限制) 默认 -1
|
||||
@ -129,7 +129,7 @@ jwt.payload.registerd-claims.aud = qiwenshare
|
||||
qiwen.file.version=1.1.2
|
||||
|
||||
# 当前部署外网IP,用于office预览
|
||||
deployment.host=192.168.1.6
|
||||
deployment.host=47.97.8.94
|
||||
|
||||
|
||||
|
||||
@ -145,7 +145,7 @@ files.docservice.convert-docs=.docm|.dotx|.dotm|.dot|.doc|.odt|.fodt|.ott|.xlsm|
|
||||
files.docservice.timeout=120000
|
||||
files.docservice.history.postfix=-hist
|
||||
|
||||
files.docservice.url.site=http://192.168.1.6:80/
|
||||
files.docservice.url.site=http://47.97.8.94:80/
|
||||
files.docservice.url.converter=ConvertService.ashx
|
||||
files.docservice.url.command=coauthoring/CommandService.ashx
|
||||
files.docservice.url.api=web-apps/apps/api/documents/api.js
|
||||
|
@ -35,7 +35,7 @@
|
||||
and a.userFileId = #{userFile.userFileId}
|
||||
</if>
|
||||
<if test="userFile.fileName != null">
|
||||
and a.fileName = #{userFile.fileName}
|
||||
and a.fileName like concat('%', #{userFile.fileName}, '%')
|
||||
</if>
|
||||
and a.deleteFlag = 0
|
||||
</where>
|
||||
@ -53,4 +53,4 @@
|
||||
WHERE userfile.userId = #{userId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user