fix(资料中心): 79856

This commit is contained in:
yjz
2024-01-05 15:37:37 +08:00
parent f63a81957f
commit 252c5482a8
2 changed files with 26 additions and 13 deletions
@@ -1,27 +1,21 @@
package com.jero.modules.laws.dataCenter.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import com.jero.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.List;
/**
@@ -95,6 +89,12 @@ public class LawsDataCenterFolder implements Serializable {
@ApiModelProperty(value = "管理权限(用户id逗号拼接)")
@Size(max = 2000, message = "管理权限超出最大限度")
private java.lang.String authManageIds;
/**
* 管理权限(用户id逗号拼接) 翻译"
*/
@ApiModelProperty(value = "管理权限(用户id逗号拼接) 翻译")
@TableField(exist = false)
private java.lang.String authManageIdsDictText;
/**
* 查看权限(用户id逗号拼接)
*/
@@ -102,6 +102,13 @@ public class LawsDataCenterFolder implements Serializable {
@ApiModelProperty(value = "查看权限(用户id逗号拼接)")
@Size(max = 2000, message = "查看权限超出最大限度")
private java.lang.String authViewIds;
/**
* 查看权限(用户id逗号拼接) 翻译
*/
@ApiModelProperty(value = "查看权限(用户id逗号拼接) 翻译")
@TableField(exist = false)
private java.lang.String authViewIdsDictText;
/**
* 文件夹顺序
*/
@@ -13,6 +13,7 @@ import com.jero.modules.laws.dataCenter.entity.LawsDataCenterFolder;
import com.jero.modules.laws.dataCenter.mapper.LawsDataCenterFolderMapper;
import com.jero.modules.laws.dataCenter.service.ILawsDataCenterFileService;
import com.jero.modules.laws.dataCenter.service.ILawsDataCenterFolderService;
import com.jero.modules.system.service.ISysUserService;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -40,7 +41,8 @@ public class LawsDataCenterFolderServiceImpl extends ServiceImpl<LawsDataCenterF
private LawsDataCenterFolderMapper lawsDataCenterFolderMapper;
@Autowired
private ILawsDataCenterFileService lawsDataCenterFileService;
@Autowired
private ISysUserService sysUserService;
/**
* @Author: liao
* @Date: 2023/10/26 17:17
@@ -50,6 +52,11 @@ public class LawsDataCenterFolderServiceImpl extends ServiceImpl<LawsDataCenterF
public List<LawsDataCenterFolder> getTreeList() {
// 获取全部文件夹集合
List<LawsDataCenterFolder> folders = list();
// 翻译
folders.forEach(root -> {
root.setAuthManageIdsDictText(sysUserService.dictByIdsOrUserNames(root.getAuthManageIds(), ""));
root.setAuthViewIdsDictText(sysUserService.dictByIdsOrUserNames(root.getAuthViewIds(), ""));
});
// 创建节点映射,方便查找节点
Map<String, LawsDataCenterFolder> nodeMap = new HashMap<>();
@@ -83,7 +90,6 @@ public class LawsDataCenterFolderServiceImpl extends ServiceImpl<LawsDataCenterF
// 递归构建子节点
roots.forEach(root -> buildChildren(root, nodeMap));
return roots;
}