|
@@ -10,6 +10,7 @@ import org.springblade.core.cache.utils.CacheUtil;
|
|
|
import org.springblade.core.log.exception.ServiceException;
|
|
|
import org.springblade.core.mp.support.Condition;
|
|
|
import org.springblade.core.secure.BladeUser;
|
|
|
+import org.springblade.core.secure.utils.AuthUtil;
|
|
|
import org.springblade.core.tool.api.R;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.manager.dto.ArchiveTreeDTO;
|
|
@@ -108,13 +109,12 @@ public class ArchiveTreeController extends BladeController {
|
|
|
*/
|
|
|
@GetMapping("/lazy-tree")
|
|
|
@ApiOperationSupport(order = 6)
|
|
|
- @ApiOperation(value = "懒加载树形结构", notes = "传入父级id,租户id,token")
|
|
|
+ @ApiOperation(value = "懒加载树形结构", notes = "传入父级id")
|
|
|
@ApiImplicitParams(value = {
|
|
|
- @ApiImplicitParam(name = "parentId", value = "父级id", required = true),
|
|
|
- @ApiImplicitParam(name = "token", value = "token", required = true)
|
|
|
+ @ApiImplicitParam(name = "parentId", value = "父级id", required = true)
|
|
|
})
|
|
|
- public R<List<ArchiveTreeVO>> lazyTree(Long parentId, BladeUser bladeUser) {
|
|
|
- List<ArchiveTreeVO> tree = archiveTreeService.lazyTree(bladeUser.getTenantId(), parentId);
|
|
|
+ public R<List<ArchiveTreeVO>> lazyTree(Long parentId) {
|
|
|
+ List<ArchiveTreeVO> tree = archiveTreeService.lazyTree(AuthUtil.getTenantId(), parentId);
|
|
|
if (tree != null && tree.size() > 0) {
|
|
|
return R.data(tree);
|
|
|
}
|
|
@@ -126,14 +126,13 @@ public class ArchiveTreeController extends BladeController {
|
|
|
*/
|
|
|
@GetMapping("/tree")
|
|
|
@ApiOperationSupport(order = 7)
|
|
|
- @ApiOperation(value = "全加载树形结构/显示树", notes = "token、或disPlayTree=1加载显示树、nodeType")
|
|
|
+ @ApiOperation(value = "全加载树形结构/显示树", notes = "disPlayTree、nodeType")
|
|
|
@ApiImplicitParams(value = {
|
|
|
- @ApiImplicitParam(name = "token", value = "token", required = true),
|
|
|
@ApiImplicitParam(name = "disPlayTree", value = "是否加载显示树 'null'=不加载 '1'=加载"),
|
|
|
@ApiImplicitParam(name = "nodeType", value = "'null'=全加载 '1'=关联电子原生文件类型树 '2'=文件上传类型树")
|
|
|
})
|
|
|
- public R<List<ArchiveTreeVO>> tree(BladeUser bladeUser, Integer disPlayTree, Integer nodeType) {
|
|
|
- List<ArchiveTreeVO> tree = archiveTreeService.tree(bladeUser.getTenantId(), disPlayTree, nodeType);
|
|
|
+ public R<List<ArchiveTreeVO>> tree(Integer disPlayTree, Integer nodeType) {
|
|
|
+ List<ArchiveTreeVO> tree = archiveTreeService.tree(AuthUtil.getTenantId(), disPlayTree, nodeType);
|
|
|
if (tree != null && tree.size() > 0) {
|
|
|
return R.data(tree);
|
|
|
}
|