添加日志
This commit is contained in:
parent
d0002418bd
commit
36f00afd9f
@ -111,10 +111,12 @@ public class ShareController {
|
||||
UserFile userFile = userFileService.getById(shareFile.getUserFileId());
|
||||
if (userFile.getIsDir() == 1) {
|
||||
List<UserFile> userfileList = userFileService.selectFileListLikeRightFilePath(userFile.getFilePath(), userFile.getUserId());
|
||||
log.info("查询文件列表:" + JSON.toJSONString(userfileList));
|
||||
for (UserFile userFile1 : userfileList) {
|
||||
userFile1.setUserId(sessionUserBean.getUserId());
|
||||
userFile1.setFilePath(saveShareFileDTO.getFilePath());
|
||||
saveUserFileList.add(userFile1);
|
||||
log.info("当前文件:" + JSON.toJSONString(userFile1));
|
||||
if (userFile1.getIsDir() == 0) {
|
||||
fileService.increaseFilePointCount(userFile1.getFileId());
|
||||
}
|
||||
|
@ -20,6 +20,10 @@ public class FileService extends ServiceImpl<FileMapper, FileBean> implements IF
|
||||
@Override
|
||||
public void increaseFilePointCount(Long fileId) {
|
||||
FileBean fileBean = fileMapper.selectById(fileId);
|
||||
if (fileBean == null) {
|
||||
log.error("文件不存在,fileId : {}", fileId );
|
||||
return;
|
||||
}
|
||||
fileBean.setPointCount(fileBean.getPointCount()+1);
|
||||
fileMapper.updateById(fileBean);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user