新增根据id查询其下自定义文件夹的接口
This commit is contained in:
parent
0df3284e21
commit
d41f0d191a
|
|
@ -122,4 +122,9 @@ public class EdFileInfoController {
|
|||
public ElectromagneticResult<?> detail(@RequestParam String id) {
|
||||
return edFileInfoService.detail(id);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/queryChildFolder", method = RequestMethod.GET)
|
||||
public ElectromagneticResult<?> queryChildFolder(@RequestParam String parentId) {
|
||||
return edFileInfoService.queryChildFolder(parentId);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
package com.electromagnetic.industry.software.manage.pojo.resp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChildFolderVO {
|
||||
private String id;
|
||||
private String fileName;
|
||||
}
|
||||
|
|
@ -157,4 +157,11 @@ public interface EdFileInfoService {
|
|||
* 获取文件的层级Id
|
||||
*/
|
||||
String getCategoryId (String id);
|
||||
|
||||
/**
|
||||
* 根据父id查询其下自定义的文件夹
|
||||
* @param parentId
|
||||
* @return
|
||||
*/
|
||||
ElectromagneticResult<?> queryChildFolder(String parentId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,7 @@ import com.electromagnetic.industry.software.manage.pojo.models.EdFileInfo;
|
|||
import com.electromagnetic.industry.software.manage.pojo.other.FileInfoVO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.other.UploadRecordDTO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.req.*;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.FileInfoQueryPageVO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.FileProjectVO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.FileVersionViewVO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.UploadRecordVO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.*;
|
||||
import com.electromagnetic.industry.software.manage.service.EdFileInfoService;
|
||||
import com.electromagnetic.industry.software.manage.service.FileSystemService;
|
||||
import com.electromagnetic.industry.software.manage.service.PermissionService;
|
||||
|
|
@ -1147,4 +1144,21 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
return file.getFileCode().substring(0, 6);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父id查询其下自定义的文件夹
|
||||
*
|
||||
* @param parentId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ElectromagneticResult<?> queryChildFolder(String parentId) {
|
||||
|
||||
List<EdFileInfo> edFileInfos = this.baseMapper.selectList(Wrappers.lambdaQuery(EdFileInfo.class).select(EdFileInfo::getId, EdFileInfo::getFileName)
|
||||
.eq(EdFileInfo::getPrjDir, Boolean.FALSE)
|
||||
.eq(EdFileInfo::getParentId, parentId)
|
||||
.eq(EdFileInfo::getEffectFlag, EffectFlagEnum.EFFECT.code));
|
||||
List<ChildFolderVO> res = BeanUtil.copyToList(edFileInfos, ChildFolderVO.class);
|
||||
return ElectromagneticResultUtil.success(res);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue