commit
ab68e1bfe1
@ -11,8 +11,6 @@ import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class ElasticSearchConfig {
|
||||
|
||||
//注入IOC容器
|
||||
@Bean
|
||||
public ElasticsearchClient elasticsearchClient(){
|
||||
RestClient client = RestClient.builder(new HttpHost("localhost", 9200,"http")).build();
|
||||
|
@ -44,7 +44,7 @@ public class CommonFileController {
|
||||
@Resource
|
||||
IUserFileService userFileService;
|
||||
|
||||
@Operation(summary = "共享文件", description = "共享文件统一接口", tags = {"common"})
|
||||
@Operation(summary = "将文件共享给他人", description = "共享文件统一接口", tags = {"common"})
|
||||
@PostMapping(value = "/commonfile")
|
||||
@MyLog(operation = "共享文件", module = CURRENT_MODULE)
|
||||
@ResponseBody
|
||||
@ -68,11 +68,11 @@ public class CommonFileController {
|
||||
return RestResult.success();
|
||||
}
|
||||
|
||||
@Operation(summary = "共享文件用户", description = "共享文件用户接口", tags = {"common"})
|
||||
@Operation(summary = "获取共享空间的全量用户列表", description = "共享文件用户接口", tags = {"common"})
|
||||
@GetMapping(value = "/commonfileuser")
|
||||
@MyLog(operation = "共享文件用户", module = CURRENT_MODULE)
|
||||
@ResponseBody
|
||||
public RestResult<List<CommonFileUser>> commonFileUser() {
|
||||
public RestResult<List<CommonFileUser>> commonFileUserList() {
|
||||
|
||||
JwtUser sessionUserBean = SessionUtil.getSession();
|
||||
List<CommonFileUser> list = commonFileService.selectCommonFileUser(sessionUserBean.getUserId());
|
||||
@ -91,7 +91,7 @@ public class CommonFileController {
|
||||
|
||||
}
|
||||
|
||||
@Operation(summary = "获取共享用户文件列表", description = "用来做前台列表展示", tags = {"file"})
|
||||
@Operation(summary = "获取共享空间中某个用户的文件列表", description = "用来做前台列表展示", tags = {"file"})
|
||||
@RequestMapping(value = "/commonFileList", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public RestResult<FileListVo> commonFileList(
|
||||
|
@ -27,7 +27,7 @@ public class FilePermission {
|
||||
public String commonFileId;
|
||||
@Column(columnDefinition="bigint(20) comment '用户id'")
|
||||
public Long userId;
|
||||
@Column(columnDefinition="int(2) comment '文件权限码'")
|
||||
@Column(columnDefinition="int(2) comment '用户对文件的权限码'")
|
||||
public Integer filePermissionCode;
|
||||
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public class UserFile {
|
||||
@Column(columnDefinition="int(1) comment '是否是目录(0-否,1-是)'")
|
||||
private Integer isDir;
|
||||
|
||||
@Column(columnDefinition="varchar(25) comment '上传时间'")
|
||||
@Column(columnDefinition="varchar(25) comment '修改时间'")
|
||||
private String uploadTime;
|
||||
|
||||
@Column(columnDefinition="int(11) comment '删除标识(0-未删除,1-已删除)'")
|
||||
|
@ -124,14 +124,16 @@ public class FileService extends ServiceImpl<FileMapper, FileBean> implements IF
|
||||
@Override
|
||||
public void updateFileDetail(String userFileId, String identifier, long fileSize, long modifyUserId) {
|
||||
UserFile userFile = userFileMapper.selectById(userFileId);
|
||||
|
||||
String currentTime = DateUtil.getCurrentTime();
|
||||
FileBean fileBean = new FileBean();
|
||||
fileBean.setIdentifier(identifier);
|
||||
fileBean.setFileSize(fileSize);
|
||||
fileBean.setModifyTime(DateUtil.getCurrentTime());
|
||||
fileBean.setModifyTime(currentTime);
|
||||
fileBean.setModifyUserId(modifyUserId);
|
||||
fileBean.setFileId(userFile.getFileId());
|
||||
fileMapper.updateById(fileBean);
|
||||
userFile.setUploadTime(currentTime);
|
||||
userFileMapper.updateById(userFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user