clean code
This commit is contained in:
parent
10439890d5
commit
8556f5ae4a
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import cn.hutool.core.io.FileUtil;
|
|||
import cn.hutool.json.JSONConfig;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.electromagnetic.industry.software.backup.pojo.BackupPro;
|
||||
import com.electromagnetic.industry.software.common.pojo.BackupFileResLog;
|
||||
import com.electromagnetic.industry.software.backup.service.FileService;
|
||||
import com.electromagnetic.industry.software.common.pojo.BackupFileResLog;
|
||||
import com.electromagnetic.industry.software.common.resp.ElectromagneticResult;
|
||||
import com.electromagnetic.industry.software.common.util.ElectromagneticResultUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
ele:
|
||||
backup:
|
||||
saveFolder: "/szsd/ele/data/backup/"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import org.aspectj.lang.annotation.Aspect;
|
|||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
@Aspect
|
||||
@Component
|
||||
|
|
|
|||
|
|
@ -38,6 +38,30 @@ public class LoginInterceptor implements HandlerInterceptor {
|
|||
@Resource
|
||||
private UserAccessLogMapper userAccessLogMapper;
|
||||
|
||||
private static String getRealIp(HttpServletRequest request) {
|
||||
String ipAddress = request.getHeader("X-Forwarded-For");
|
||||
if (ipAddress == null || ipAddress.isEmpty() || "unknown".equalsIgnoreCase(ipAddress)) {
|
||||
// 回退到X-Real-IP或直接RemoteAddr
|
||||
ipAddress = request.getHeader("X-Real-IP");
|
||||
}
|
||||
if (ipAddress == null || ipAddress.isEmpty() || "unknown".equalsIgnoreCase(ipAddress)) {
|
||||
ipAddress = request.getRemoteAddr();
|
||||
}
|
||||
// 处理多级代理的情况(取第一个IP)
|
||||
if (ipAddress.contains(",")) {
|
||||
ipAddress = ipAddress.split(",")[0].trim();
|
||||
}
|
||||
return ipAddress;
|
||||
}
|
||||
|
||||
private static String parseIpFromUrl(String url) {
|
||||
|
||||
int start = url.indexOf("//");
|
||||
url = url.substring(start + 2);
|
||||
int end = url.indexOf("/");
|
||||
return url.substring(0, end);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
request.getSession().setAttribute("accessStartTime", System.currentTimeMillis());
|
||||
|
|
@ -150,28 +174,4 @@ public class LoginInterceptor implements HandlerInterceptor {
|
|||
return token != null && now.before(token.getExpireAt());
|
||||
}
|
||||
|
||||
private static String getRealIp(HttpServletRequest request) {
|
||||
String ipAddress = request.getHeader("X-Forwarded-For");
|
||||
if (ipAddress == null || ipAddress.isEmpty() || "unknown".equalsIgnoreCase(ipAddress)) {
|
||||
// 回退到X-Real-IP或直接RemoteAddr
|
||||
ipAddress = request.getHeader("X-Real-IP");
|
||||
}
|
||||
if (ipAddress == null || ipAddress.isEmpty() || "unknown".equalsIgnoreCase(ipAddress)) {
|
||||
ipAddress = request.getRemoteAddr();
|
||||
}
|
||||
// 处理多级代理的情况(取第一个IP)
|
||||
if (ipAddress.contains(",")) {
|
||||
ipAddress = ipAddress.split(",")[0].trim();
|
||||
}
|
||||
return ipAddress;
|
||||
}
|
||||
|
||||
private static String parseIpFromUrl(String url) {
|
||||
|
||||
int start = url.indexOf("//");
|
||||
url = url.substring(start + 2);
|
||||
int end = url.indexOf("/");
|
||||
return url.substring(0, end);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ public class EdFileInfoController {
|
|||
|
||||
/**
|
||||
* 添加进收藏夹
|
||||
*
|
||||
* @param id 文件id
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -178,6 +179,7 @@ public class EdFileInfoController {
|
|||
|
||||
/**
|
||||
* 从收藏夹移除
|
||||
*
|
||||
* @param id 文件id
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -190,6 +192,7 @@ public class EdFileInfoController {
|
|||
|
||||
/**
|
||||
* 展示当前用户收藏夹文件
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/listCollection")
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.electromagnetic.industry.software.manage.pojo.req.TagCreateDTO;
|
|||
import com.electromagnetic.industry.software.manage.service.EdTagLibraryService;
|
||||
import com.electromagnetic.industry.software.manage.service.FileTagRelationService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@ import com.electromagnetic.industry.software.common.enums.UserOperationModuleEnu
|
|||
import com.electromagnetic.industry.software.common.resp.ElectromagneticResult;
|
||||
import com.electromagnetic.industry.software.common.util.ElectromagneticResultUtil;
|
||||
import com.electromagnetic.industry.software.manage.service.serviceimpl.FileFormatService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import com.electromagnetic.industry.software.common.resp.ElectromagneticResult;
|
|||
import com.electromagnetic.industry.software.common.util.ElectromagneticResultUtil;
|
||||
import com.electromagnetic.industry.software.common.util.UserThreadLocal;
|
||||
import com.electromagnetic.industry.software.manage.service.PermissionService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import com.electromagnetic.industry.software.common.util.ElectromagneticResultUt
|
|||
import com.electromagnetic.industry.software.common.util.UserThreadLocal;
|
||||
import com.electromagnetic.industry.software.manage.pojo.req.*;
|
||||
import com.electromagnetic.industry.software.manage.service.UserService;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -126,6 +125,7 @@ public class UserController {
|
|||
return ElectromagneticResultUtil.success(adminType);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/validateOldPassword")
|
||||
@UserOperation(value = "校验原始密码", modelName = UserOperationModuleEnum.USER)
|
||||
public ElectromagneticResult<?> validateOldPassword(@RequestBody ValidateOldPasswordRequest request) {
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ public class UserEdFileInfoController {
|
|||
|
||||
/**
|
||||
* 添加进收藏夹
|
||||
*
|
||||
* @param id 文件id
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -167,6 +168,7 @@ public class UserEdFileInfoController {
|
|||
|
||||
/**
|
||||
* 从收藏夹移除
|
||||
*
|
||||
* @param id 文件id
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ public interface EdFileInfoMapper extends BaseMapper<EdFileInfo> {
|
|||
|
||||
/**
|
||||
* 收藏页 数据查询
|
||||
*
|
||||
* @param page
|
||||
* @param ids
|
||||
* @param queryDTO
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.electromagnetic.industry.software.manage.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.electromagnetic.industry.software.common.enums.TagTypeEnum;
|
||||
import com.electromagnetic.industry.software.manage.pojo.models.EdTagLibrary;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.electromagnetic.industry.software.manage.mapper;
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.electromagnetic.industry.software.manage.pojo.models.FileFormat;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
@Mapper
|
||||
public interface FileFormatMapper extends BaseMapper<FileFormat> {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ public interface TokenMapper extends BaseMapper<Token> {
|
|||
* @param token
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
int insert(Token token);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ public interface UserMapper extends BaseMapper<User> {
|
|||
* @param user
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
int insert(User user);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -116,7 +116,9 @@ public class EdFileInfo extends BaseModel {
|
|||
@TableField(value = "prj_dir")
|
||||
private Integer dataOwn;
|
||||
|
||||
/** 当一个文件作废时,其所有的历史文件也会跟着作废,此时该文件及其历史文件的all_deleted=true**/
|
||||
/**
|
||||
* 当一个文件作废时,其所有的历史文件也会跟着作废,此时该文件及其历史文件的all_deleted=true
|
||||
**/
|
||||
@TableField(value = "all_deleted")
|
||||
private Boolean allDeleted;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
package com.electromagnetic.industry.software.manage.pojo.models;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("ed_file_format")
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
@Data
|
||||
@TableName("ed_role_permission")
|
||||
@AllArgsConstructor
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.electromagnetic.industry.software.manage.pojo.models;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,8 @@
|
|||
package com.electromagnetic.industry.software.manage.pojo.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.electromagnetic.industry.software.manage.pojo.models.EdTagLibrary;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package com.electromagnetic.industry.software.manage.service;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.electromagnetic.industry.software.common.resp.ElectromagneticResult;
|
||||
import com.electromagnetic.industry.software.manage.pojo.other.FileInfoVO;
|
||||
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.req.CreateFolderDTO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.req.FileChunkDTO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.req.FileInfoQueryDTO;
|
||||
|
|
@ -165,6 +165,7 @@ public interface EdFileInfoService {
|
|||
|
||||
/**
|
||||
* 根据父id查询其下自定义的文件夹
|
||||
*
|
||||
* @param parentId
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -173,6 +174,7 @@ public interface EdFileInfoService {
|
|||
|
||||
/**
|
||||
* 文件预览
|
||||
*
|
||||
* @param id
|
||||
* @param response
|
||||
*/
|
||||
|
|
@ -180,6 +182,7 @@ public interface EdFileInfoService {
|
|||
|
||||
/**
|
||||
* 收藏页 数据查询
|
||||
*
|
||||
* @param page
|
||||
* @param ids
|
||||
* @param queryDTO
|
||||
|
|
@ -189,12 +192,14 @@ public interface EdFileInfoService {
|
|||
|
||||
/**
|
||||
* 处理重名文件,文件名后+_1
|
||||
*
|
||||
* @param fileInfo
|
||||
*/
|
||||
void resetFileInfoName(EdFileInfo fileInfo);
|
||||
|
||||
/**
|
||||
* 判断是否是文件夹
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -202,6 +207,7 @@ public interface EdFileInfoService {
|
|||
|
||||
/**
|
||||
* 添加收藏
|
||||
*
|
||||
* @param userId
|
||||
* @param fileId
|
||||
* @return
|
||||
|
|
@ -210,6 +216,7 @@ public interface EdFileInfoService {
|
|||
|
||||
/**
|
||||
* 判断是否已收藏
|
||||
*
|
||||
* @param userId
|
||||
* @param fileId
|
||||
* @return
|
||||
|
|
@ -218,6 +225,7 @@ public interface EdFileInfoService {
|
|||
|
||||
/**
|
||||
* 移除收藏
|
||||
*
|
||||
* @param userId
|
||||
* @param fileId
|
||||
* @return
|
||||
|
|
@ -226,6 +234,7 @@ public interface EdFileInfoService {
|
|||
|
||||
/**
|
||||
* 查询当前用户收藏文件信息
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param fileInfoQueryDTO 分页信息
|
||||
* @return
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.electromagnetic.industry.software.manage.service;
|
||||
|
||||
import com.electromagnetic.industry.software.common.enums.DataOwnEnum;
|
||||
import com.electromagnetic.industry.software.common.resp.ElectromagneticResult;
|
||||
import com.electromagnetic.industry.software.manage.pojo.req.FolderResortDTO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.req.QueryPublishStatus;
|
||||
|
|
|
|||
|
|
@ -6,14 +6,13 @@ import com.electromagnetic.industry.software.manage.pojo.models.EdTagLibrary;
|
|||
import com.electromagnetic.industry.software.manage.pojo.resp.FileTagInfo;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.TagListVO;
|
||||
|
||||
import javax.swing.text.html.HTML;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface EdTagLibraryService extends IService<EdTagLibrary> {
|
||||
|
||||
/**
|
||||
* 新建分组
|
||||
*
|
||||
* @param tagName
|
||||
* @param createdBy
|
||||
*/
|
||||
|
|
@ -21,6 +20,7 @@ public interface EdTagLibraryService extends IService<EdTagLibrary> {
|
|||
|
||||
/**
|
||||
* 新建标签
|
||||
*
|
||||
* @param parentId
|
||||
* @param tagName
|
||||
* @param createdBy
|
||||
|
|
@ -29,6 +29,7 @@ public interface EdTagLibraryService extends IService<EdTagLibrary> {
|
|||
|
||||
/**
|
||||
* 拖拽标签顺序
|
||||
*
|
||||
* @param tagId
|
||||
* @param newOrderBy
|
||||
*/
|
||||
|
|
@ -36,11 +37,14 @@ public interface EdTagLibraryService extends IService<EdTagLibrary> {
|
|||
|
||||
/**
|
||||
* 发布标签
|
||||
*
|
||||
* @param tagGroupIds
|
||||
*/
|
||||
Boolean batchPublishTagGroups(List<String> tagGroupIds);
|
||||
|
||||
/** 废除标签
|
||||
/**
|
||||
* 废除标签
|
||||
*
|
||||
* @param tagId
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -48,12 +52,14 @@ public interface EdTagLibraryService extends IService<EdTagLibrary> {
|
|||
|
||||
/**
|
||||
* 标签数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<TagListVO> listTagsWithGroups();
|
||||
|
||||
/**
|
||||
* 更新标签信息
|
||||
*
|
||||
* @param tagId
|
||||
* @param tagName
|
||||
* @return 更新结果
|
||||
|
|
@ -62,12 +68,14 @@ public interface EdTagLibraryService extends IService<EdTagLibrary> {
|
|||
|
||||
/**
|
||||
* 构建标签树
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<TreeNode> listTagTree();
|
||||
|
||||
/**
|
||||
* 获取所有标签
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<FileTagInfo> listAllTags();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.electromagnetic.industry.software.manage.service;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.electromagnetic.industry.software.manage.pojo.models.FileTagRelation;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.FileTagInfo;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.TagListVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -11,6 +10,7 @@ public interface FileTagRelationService extends IService<FileTagRelation> {
|
|||
|
||||
/**
|
||||
* 批量添加标签到文件
|
||||
*
|
||||
* @param fileId
|
||||
* @param tagIds
|
||||
* @param createdBy
|
||||
|
|
@ -20,6 +20,7 @@ public interface FileTagRelationService extends IService<FileTagRelation> {
|
|||
|
||||
/**
|
||||
* 获取文件标签
|
||||
*
|
||||
* @param fileId
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -27,6 +28,7 @@ public interface FileTagRelationService extends IService<FileTagRelation> {
|
|||
|
||||
/**
|
||||
* 根据标签id获取文件id
|
||||
*
|
||||
* @param tagIds
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package com.electromagnetic.industry.software.manage.service;
|
||||
|
||||
import com.electromagnetic.industry.software.common.enums.FilePermission;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -9,6 +7,7 @@ public interface PermissionService {
|
|||
|
||||
/**
|
||||
* 用户对个人数据拥有所有权限
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Map<String, Boolean> getPersonalPermission();
|
||||
|
|
@ -48,6 +47,7 @@ public interface PermissionService {
|
|||
|
||||
/**
|
||||
* 过滤有导出权限的文件id
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
Map<String, Boolean> filterExportIds(String[] ids);
|
||||
|
|
@ -59,6 +59,7 @@ public interface PermissionService {
|
|||
|
||||
/**
|
||||
* 判断用户有无权限
|
||||
*
|
||||
* @param permissionCode 权限
|
||||
* @param userId 用户编码
|
||||
* @param fileId 文件编码
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
import com.electromagnetic.industry.software.manage.pojo.models.EdFileInfo;
|
||||
import com.electromagnetic.industry.software.manage.pojo.models.RolePermission;
|
||||
import com.electromagnetic.industry.software.manage.pojo.req.PublishedFileDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -13,6 +11,7 @@ public interface RolePermissionService extends IService<RolePermission> {
|
|||
|
||||
/**
|
||||
* 同步新权限
|
||||
*
|
||||
* @param currentPermission
|
||||
* @param infoId
|
||||
*/
|
||||
|
|
@ -20,6 +19,7 @@ public interface RolePermissionService extends IService<RolePermission> {
|
|||
|
||||
/**
|
||||
* 获取新权限
|
||||
*
|
||||
* @param publishedFileDTO
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -27,6 +27,7 @@ public interface RolePermissionService extends IService<RolePermission> {
|
|||
|
||||
/**
|
||||
* 在树形结构变动后同步权限
|
||||
*
|
||||
* @param prjId
|
||||
*/
|
||||
void syncPermissionsAfterTreeUpdate(List<EdFileInfo> files, String prjId);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ public interface UserAccessLogService {
|
|||
|
||||
/**
|
||||
* 分页查询操作记录(审计)
|
||||
*
|
||||
* @param accessLogQueryDTO
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ public interface UserService {
|
|||
Boolean resetPassword(String userId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @param newPassword
|
||||
* @return
|
||||
|
|
|
|||
|
|
@ -58,6 +58,58 @@ public class CommonService {
|
|||
@Resource
|
||||
private FileFormatService fileFormatService;
|
||||
|
||||
private static String createTree(List<EdFileInfo> edFileInfos, Object object) {
|
||||
|
||||
TreeNodeConfig config = new TreeNodeConfig();
|
||||
if (object instanceof ProjectVO) {
|
||||
// 转换为树
|
||||
config.setIdKey(EdFileInfo.Fields.id);
|
||||
config.setParentIdKey(EdFileInfo.Fields.parentId);
|
||||
config.setWeightKey(EdFileInfo.Fields.sort);
|
||||
List<Tree<String>> trees = TreeUtil.build(edFileInfos, PRJ_PARENT_ID, config, ((obj, treeNode) -> {
|
||||
treeNode.putExtra(ProjectVO.Fields.id, obj.getId());
|
||||
treeNode.putExtra(ProjectVO.Fields.parentId, obj.getParentId());
|
||||
treeNode.putExtra(ProjectVO.Fields.sort, obj.getSort());
|
||||
treeNode.putExtra(ProjectVO.Fields.fileName, obj.getFileName());
|
||||
treeNode.putExtra(ProjectVO.Fields.title, obj.getFileName());
|
||||
treeNode.putExtra(ProjectVO.Fields.dataStatus, obj.getDataStatus());
|
||||
}));
|
||||
return JSONUtil.toJsonStr(trees);
|
||||
}
|
||||
|
||||
config.setIdKey(FileProjectVO.Fields.categoryId);
|
||||
config.setParentIdKey(FileProjectVO.Fields.parentId);
|
||||
config.setWeightKey(FileProjectVO.Fields.sort);
|
||||
List<Tree<String>> fileTrees = TreeUtil.build(edFileInfos, PRJ_PARENT_ID, config, ((obj, treeNode) -> {
|
||||
treeNode.putExtra(FileProjectVO.Fields.categoryId, obj.getId());
|
||||
treeNode.putExtra(FileProjectVO.Fields.parentId, obj.getParentId());
|
||||
treeNode.putExtra(FileProjectVO.Fields.sort, obj.getSort());
|
||||
treeNode.putExtra(FileProjectVO.Fields.categoryName, obj.getFileName());
|
||||
treeNode.putExtra(FileProjectVO.Fields.dataStatus, obj.getDataStatus());
|
||||
}));
|
||||
return JSONUtil.toJsonStr(fileTrees);
|
||||
|
||||
}
|
||||
|
||||
private static List<FileProjectVO> getLeafNodes(FileProjectVO root) {
|
||||
List<FileProjectVO> leafNodes = new ArrayList<>();
|
||||
if (root == null) {
|
||||
return leafNodes;
|
||||
}
|
||||
findLeafNodes(root, leafNodes);
|
||||
return leafNodes;
|
||||
}
|
||||
|
||||
private static void findLeafNodes(FileProjectVO node, List<FileProjectVO> leafNodes) {
|
||||
if (node.getChildren().isEmpty()) {
|
||||
leafNodes.add(node);
|
||||
} else {
|
||||
for (FileProjectVO child : node.getChildren()) {
|
||||
findLeafNodes(child, leafNodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public String getEleDataPath(int dataOwnCode) {
|
||||
return PATH_MAP.get(dataOwnCode);
|
||||
}
|
||||
|
|
@ -204,9 +256,9 @@ public class CommonService {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 1.询管理员从层级定义处查。2.用户从数据库管理界面查询。
|
||||
*
|
||||
* @param querySource 0:询管理员从层级定义处查。 2.用户从数据库管理界面查询。
|
||||
* @param accessibleIds
|
||||
* @param obj
|
||||
|
|
@ -310,40 +362,6 @@ public class CommonService {
|
|||
return map;
|
||||
}
|
||||
|
||||
private static String createTree(List<EdFileInfo> edFileInfos, Object object) {
|
||||
|
||||
TreeNodeConfig config = new TreeNodeConfig();
|
||||
if (object instanceof ProjectVO) {
|
||||
// 转换为树
|
||||
config.setIdKey(EdFileInfo.Fields.id);
|
||||
config.setParentIdKey(EdFileInfo.Fields.parentId);
|
||||
config.setWeightKey(EdFileInfo.Fields.sort);
|
||||
List<Tree<String>> trees = TreeUtil.build(edFileInfos, PRJ_PARENT_ID, config, ((obj, treeNode) -> {
|
||||
treeNode.putExtra(ProjectVO.Fields.id, obj.getId());
|
||||
treeNode.putExtra(ProjectVO.Fields.parentId, obj.getParentId());
|
||||
treeNode.putExtra(ProjectVO.Fields.sort, obj.getSort());
|
||||
treeNode.putExtra(ProjectVO.Fields.fileName, obj.getFileName());
|
||||
treeNode.putExtra(ProjectVO.Fields.title, obj.getFileName());
|
||||
treeNode.putExtra(ProjectVO.Fields.dataStatus, obj.getDataStatus());
|
||||
}));
|
||||
return JSONUtil.toJsonStr(trees);
|
||||
}
|
||||
|
||||
config.setIdKey(FileProjectVO.Fields.categoryId);
|
||||
config.setParentIdKey(FileProjectVO.Fields.parentId);
|
||||
config.setWeightKey(FileProjectVO.Fields.sort);
|
||||
List<Tree<String>> fileTrees = TreeUtil.build(edFileInfos, PRJ_PARENT_ID, config, ((obj, treeNode) -> {
|
||||
treeNode.putExtra(FileProjectVO.Fields.categoryId, obj.getId());
|
||||
treeNode.putExtra(FileProjectVO.Fields.parentId, obj.getParentId());
|
||||
treeNode.putExtra(FileProjectVO.Fields.sort, obj.getSort());
|
||||
treeNode.putExtra(FileProjectVO.Fields.categoryName, obj.getFileName());
|
||||
treeNode.putExtra(FileProjectVO.Fields.dataStatus, obj.getDataStatus());
|
||||
}));
|
||||
return JSONUtil.toJsonStr(fileTrees);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public ElectromagneticResult<?> deleteFolder(String id, int dataOwnCode) {
|
||||
// 如果文件夹下存在文件(包括文件夹和已经逻辑删除的文件),则不允许删除。后面管理员选择会有物理删除文件夹和文件的功能,此时MySQL和文件系统则会进行物理删除该文件。
|
||||
EdFileInfo srcFileInfo = edFileInfoMapper.selectById(id);
|
||||
|
|
@ -443,25 +461,6 @@ public class CommonService {
|
|||
return res;
|
||||
}
|
||||
|
||||
private static List<FileProjectVO> getLeafNodes(FileProjectVO root) {
|
||||
List<FileProjectVO> leafNodes = new ArrayList<>();
|
||||
if (root == null) {
|
||||
return leafNodes;
|
||||
}
|
||||
findLeafNodes(root, leafNodes);
|
||||
return leafNodes;
|
||||
}
|
||||
|
||||
private static void findLeafNodes(FileProjectVO node, List<FileProjectVO> leafNodes) {
|
||||
if (node.getChildren().isEmpty()) {
|
||||
leafNodes.add(node);
|
||||
} else {
|
||||
for (FileProjectVO child : node.getChildren()) {
|
||||
findLeafNodes(child, leafNodes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void deletePrjSysDir(List<String> paths) {
|
||||
for (String path : paths) {
|
||||
String preDirName = new File(path).getParentFile().getName();
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.electromagnetic.industry.software.common.enums.*;
|
||||
import com.electromagnetic.industry.software.common.enums.FilePermission;
|
||||
import com.electromagnetic.industry.software.common.exception.BizException;
|
||||
import com.electromagnetic.industry.software.common.exception.PermissionDeniedException;
|
||||
import com.electromagnetic.industry.software.common.resp.ElectromagneticResult;
|
||||
|
|
@ -99,7 +98,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
}
|
||||
|
||||
LambdaQueryWrapper<EdFileInfo> queryWrapper = Wrappers.lambdaQuery(EdFileInfo.class)
|
||||
.select(EdFileInfo.class, file -> !file.getColumn().equals("file_content"))
|
||||
.select(EdFileInfo.class, file -> !StrUtil.equals(file.getColumn(), "file_content"))
|
||||
.eq(EdFileInfo::getSaveStatus, EleDataSaveStatusEnum.SUCCESS.code)
|
||||
.eq(EdFileInfo::getEffectFlag, EffectFlagEnum.EFFECT.code)
|
||||
.eq(EdFileInfo::getParentId, pars.getParentId())
|
||||
|
|
@ -180,7 +179,6 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 项目层级结构查询
|
||||
*
|
||||
* @return
|
||||
|
|
@ -1238,6 +1236,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
|
||||
/**
|
||||
* 获取文件的层级Id
|
||||
*
|
||||
* @param id 文件id
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -1329,6 +1328,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
|
||||
/**
|
||||
* 收藏页 数据查询
|
||||
*
|
||||
* @param page
|
||||
* @param ids
|
||||
* @param queryDTO
|
||||
|
|
@ -1341,6 +1341,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
|
||||
/**
|
||||
* 判断是否是文件夹
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -1353,6 +1354,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
|
||||
/**
|
||||
* 添加收藏
|
||||
*
|
||||
* @param userId
|
||||
* @param fileId
|
||||
* @return
|
||||
|
|
@ -1381,6 +1383,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
|
||||
/**
|
||||
* 判断是否已收藏
|
||||
*
|
||||
* @param userId
|
||||
* @param fileId
|
||||
* @return
|
||||
|
|
@ -1395,6 +1398,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
|
||||
/**
|
||||
* 移除收藏
|
||||
*
|
||||
* @param userId
|
||||
* @param fileId
|
||||
* @return
|
||||
|
|
@ -1413,6 +1417,7 @@ public class EdFileInfoServiceImpl extends ServiceImpl<EdFileInfoMapper, EdFileI
|
|||
|
||||
/**
|
||||
* 查询当前用户收藏文件信息
|
||||
*
|
||||
* @param userId 用户id
|
||||
* @param fileInfoQueryDTO 分页信息
|
||||
* @return
|
||||
|
|
|
|||
|
|
@ -23,9 +23,7 @@ import com.electromagnetic.industry.software.manage.pojo.req.CheckNameUniqueRequ
|
|||
import com.electromagnetic.industry.software.manage.pojo.resp.FileRelationViewVO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.FileSimpleInfoVO;
|
||||
import com.electromagnetic.industry.software.manage.service.EdFileRelationService;
|
||||
import com.electromagnetic.industry.software.manage.service.FileSystemService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 新建标签组
|
||||
*
|
||||
* @param tagName
|
||||
* @param createdBy
|
||||
* @return
|
||||
|
|
@ -56,6 +57,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 新建标签
|
||||
*
|
||||
* @param parentId
|
||||
* @param tagName
|
||||
* @param createdBy
|
||||
|
|
@ -82,6 +84,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 更新标签顺序
|
||||
*
|
||||
* @param tagId
|
||||
* @param newOrderBy
|
||||
*/
|
||||
|
|
@ -144,6 +147,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 发布标签批量
|
||||
*
|
||||
* @param tagGroupIds
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -166,6 +170,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 废除标签
|
||||
*
|
||||
* @param tagId
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -188,6 +193,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 标签数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -220,6 +226,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 更新标签信息
|
||||
*
|
||||
* @param tagId
|
||||
* @param tagName
|
||||
* @param updatedBy
|
||||
|
|
@ -263,6 +270,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 构建标签树
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -308,6 +316,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 获取所有标签
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -325,6 +334,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 校验名字是否重复
|
||||
*
|
||||
* @param tagName
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -336,6 +346,7 @@ public class EdTagLibraryServiceImpl extends ServiceImpl<EdTagLibraryMapper, EdT
|
|||
|
||||
/**
|
||||
* 计算顺序
|
||||
*
|
||||
* @return maxOrder
|
||||
*/
|
||||
private int selectMaxOrder(int typeCode, String parentId) {
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import com.electromagnetic.industry.software.common.enums.FileBackupSource;
|
|||
import com.electromagnetic.industry.software.common.resp.ElectromagneticResult;
|
||||
import com.electromagnetic.industry.software.common.util.ElectromagneticResultUtil;
|
||||
import com.electromagnetic.industry.software.manage.mapper.FileBackupLogMapper;
|
||||
import com.electromagnetic.industry.software.manage.pojo.models.FileBackupLog;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.FileBackLogVO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.RespPageVO;
|
||||
import com.electromagnetic.industry.software.manage.service.FileBackLogService;
|
||||
import com.electromagnetic.industry.software.manage.pojo.models.FileBackupLog;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ public interface FileFormatService extends IService<FileFormat> {
|
|||
|
||||
/**
|
||||
* 创建文件格式
|
||||
*
|
||||
* @param suffixName
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -17,6 +18,7 @@ public interface FileFormatService extends IService<FileFormat> {
|
|||
|
||||
/**
|
||||
* 删除文件格式
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -24,12 +26,14 @@ public interface FileFormatService extends IService<FileFormat> {
|
|||
|
||||
/**
|
||||
* 查询文件格式列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<FileFormatVO> getList();
|
||||
|
||||
/**
|
||||
* 更新文件格式
|
||||
*
|
||||
* @param fileFormat
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ public class FileFormatServiceImpl extends ServiceImpl<FileFormatMapper, FileFor
|
|||
|
||||
/**
|
||||
* 创建文件格式
|
||||
*
|
||||
* @param suffixName
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -57,6 +58,7 @@ public class FileFormatServiceImpl extends ServiceImpl<FileFormatMapper, FileFor
|
|||
|
||||
/**
|
||||
* 删除文件格式
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -69,6 +71,7 @@ public class FileFormatServiceImpl extends ServiceImpl<FileFormatMapper, FileFor
|
|||
|
||||
/**
|
||||
* 查询了文件格式列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -81,6 +84,7 @@ public class FileFormatServiceImpl extends ServiceImpl<FileFormatMapper, FileFor
|
|||
|
||||
/**
|
||||
* 更新文件格式
|
||||
*
|
||||
* @param fileFormat
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ import cn.hutool.core.util.StrUtil;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.electromagnetic.industry.software.common.enums.*;
|
||||
import com.electromagnetic.industry.software.common.enums.AdminTypeEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.EffectFlagEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.EleDataTypeEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.FileBackupSource;
|
||||
import com.electromagnetic.industry.software.common.exception.BizException;
|
||||
import com.electromagnetic.industry.software.common.pojo.BackupFileResLog;
|
||||
import com.electromagnetic.industry.software.common.resp.ElectromagneticResult;
|
||||
|
|
@ -66,7 +69,7 @@ public class FileRecycleServiceImpl implements FileRecycleService {
|
|||
public ElectromagneticResult<?> list(RecycleFileQueryDTO pars) {
|
||||
|
||||
LambdaQueryWrapper<EdFileInfo> queryWrapper = Wrappers.lambdaQuery(EdFileInfo.class)
|
||||
.select(EdFileInfo.class, file -> !file.getColumn().equals("file_content"))
|
||||
.select(EdFileInfo.class, file -> !StrUtil.equals(file.getColumn(), "file_content"))
|
||||
.eq(EdFileInfo::getAllDeleted, true)
|
||||
.eq(EdFileInfo::getPermanentDeleted, false)
|
||||
.eq(EdFileInfo::getDataType, EleDataTypeEnum.FILE.code)
|
||||
|
|
@ -125,7 +128,7 @@ public class FileRecycleServiceImpl implements FileRecycleService {
|
|||
|
||||
// 备份该文件
|
||||
List<EdFileInfo> edFileInfos = this.edFileInfoMapper.selectList(Wrappers.lambdaQuery(EdFileInfo.class)
|
||||
.select(EdFileInfo.class, file -> !file.getColumn().equals("file_content"))
|
||||
.select(EdFileInfo.class, file -> !StrUtil.equals(file.getColumn(), "file_content"))
|
||||
.eq(EdFileInfo::getFileId, fileId));
|
||||
List<String> fileSysPaths = new ArrayList<>();
|
||||
for (EdFileInfo edFileInfo : edFileInfos) {
|
||||
|
|
@ -208,7 +211,7 @@ public class FileRecycleServiceImpl implements FileRecycleService {
|
|||
public ElectromagneticResult<?> recover(String fileId) {
|
||||
|
||||
List<EdFileInfo> edFileInfos = this.edFileInfoMapper.selectList(Wrappers.lambdaQuery(EdFileInfo.class)
|
||||
.select(EdFileInfo.class, file -> !file.getColumn().equals("file_content"))
|
||||
.select(EdFileInfo.class, file -> !StrUtil.equals(file.getColumn(), "file_content"))
|
||||
.orderByDesc(EdFileInfo::getUpdatedTime)
|
||||
.eq(EdFileInfo::getFileId, fileId)
|
||||
.last("limit 1"));
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
package com.electromagnetic.industry.software.manage.service.serviceimpl;
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
|
@ -10,11 +11,9 @@ import com.electromagnetic.industry.software.manage.mapper.FileTagRelationMapper
|
|||
import com.electromagnetic.industry.software.manage.pojo.models.EdTagLibrary;
|
||||
import com.electromagnetic.industry.software.manage.pojo.models.FileTagRelation;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.FileTagInfo;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.TagListVO;
|
||||
import com.electromagnetic.industry.software.manage.service.FileTagRelationService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -26,6 +25,7 @@ import java.util.stream.Collectors;
|
|||
public class FileTagRelationServiceImpl extends ServiceImpl<FileTagRelationMapper, FileTagRelation> implements FileTagRelationService {
|
||||
@Autowired
|
||||
private EdTagLibraryMapper edTagLibraryMapper;
|
||||
|
||||
private boolean addTagToFile(String fileId, String tagId, String createdBy) {
|
||||
// 检查标签是否存在并且已发布
|
||||
EdTagLibrary tag = edTagLibraryMapper.selectOne(new LambdaQueryWrapper<EdTagLibrary>()
|
||||
|
|
@ -48,6 +48,7 @@ public class FileTagRelationServiceImpl extends ServiceImpl<FileTagRelationMappe
|
|||
|
||||
/**
|
||||
* 批量添加标签到文件
|
||||
*
|
||||
* @param fileId
|
||||
* @param tagIds
|
||||
* @param createdBy
|
||||
|
|
@ -68,9 +69,11 @@ public class FileTagRelationServiceImpl extends ServiceImpl<FileTagRelationMappe
|
|||
|
||||
/**
|
||||
* 获取文件标签
|
||||
*
|
||||
* @param fileId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<FileTagInfo> getFileTags(String fileId) {
|
||||
LambdaQueryWrapper<FileTagRelation> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(FileTagRelation::getFileId, fileId);
|
||||
|
|
@ -88,6 +91,7 @@ public class FileTagRelationServiceImpl extends ServiceImpl<FileTagRelationMappe
|
|||
|
||||
/**
|
||||
* 根据 tagIds 获取文件 ID 列表
|
||||
*
|
||||
* @param tagIds
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
package com.electromagnetic.industry.software.manage.service.serviceimpl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.electromagnetic.industry.software.common.enums.*;
|
||||
import com.electromagnetic.industry.software.common.enums.DataOwnEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.EffectFlagEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.EleDataStatusEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.FilePermission;
|
||||
import com.electromagnetic.industry.software.common.util.UserThreadLocal;
|
||||
import com.electromagnetic.industry.software.manage.mapper.EdFileInfoMapper;
|
||||
import com.electromagnetic.industry.software.manage.mapper.UserRoleMapper;
|
||||
|
|
@ -31,6 +34,7 @@ public class PermissionServiceImpl implements PermissionService {
|
|||
|
||||
/**
|
||||
* 用户对个人数据拥有所有权限
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -148,6 +152,7 @@ public class PermissionServiceImpl implements PermissionService {
|
|||
|
||||
/**
|
||||
* 过滤有导出权限的文件id
|
||||
*
|
||||
* @param ids
|
||||
*/
|
||||
@Override
|
||||
|
|
@ -213,6 +218,7 @@ public class PermissionServiceImpl implements PermissionService {
|
|||
|
||||
/**
|
||||
* 判断用户有无权限
|
||||
*
|
||||
* @param permissionCode 权限
|
||||
* @param userId 用户编码
|
||||
* @param fileId 文件编码
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper,
|
|||
|
||||
/**
|
||||
* 同步新权限
|
||||
*
|
||||
* @param currentPermission
|
||||
* @param infoId
|
||||
*/
|
||||
|
|
@ -77,6 +78,7 @@ public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper,
|
|||
|
||||
/**
|
||||
* 获取新权限
|
||||
*
|
||||
* @param publishedFileDTO
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -87,6 +89,7 @@ public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper,
|
|||
|
||||
/**
|
||||
* 在树形结构变动后同步权限
|
||||
*
|
||||
* @param prjId
|
||||
*/
|
||||
@Transactional
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import com.electromagnetic.industry.software.manage.pojo.models.UserAccessLog;
|
|||
import com.electromagnetic.industry.software.manage.pojo.req.AccessLogQueryDTO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.AccessLogQueryVO;
|
||||
import com.electromagnetic.industry.software.manage.pojo.resp.RespPageVO;
|
||||
import com.electromagnetic.industry.software.manage.service.PermissionService;
|
||||
import com.electromagnetic.industry.software.manage.service.UserAccessLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.electromagnetic.industry.software.common.cons.UserConstants;
|
||||
import com.electromagnetic.industry.software.common.enums.ActiveEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.EffectFlagEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.ElectromagneticErrorEnum;
|
||||
import com.electromagnetic.industry.software.common.enums.PublishEnum;
|
||||
import com.electromagnetic.industry.software.common.exception.BizException;
|
||||
import com.electromagnetic.industry.software.common.pojo.UserLoginInfo;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import cn.hutool.core.date.DateTime;
|
|||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.text.StrFormatter;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
|
@ -62,7 +63,7 @@ public class BackupTask {
|
|||
List<String> failBackFailFileIds = getFailBackFile();
|
||||
for (String id : failBackFailFileIds) {
|
||||
EdFileInfo fileInfo = this.edFileInfoMapper.selectOne(Wrappers.<EdFileInfo>lambdaQuery()
|
||||
.select(EdFileInfo.class, file -> !file.getColumn().equals("file_content"))
|
||||
.select(EdFileInfo.class, file -> !StrUtil.equals(file.getColumn(), "file_content"))
|
||||
.eq(EdFileInfo::getId, id));
|
||||
String sysFilePath = commonService.getFileSysPath(fileInfo.getFilePath(), fileInfo.getDataOwn());
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
|
@ -83,7 +84,7 @@ public class BackupTask {
|
|||
fileMaxCreateTime = DateUtil.offsetHour(fileMaxCreateTime, -1);
|
||||
// 需要备份的文件
|
||||
List<EdFileInfo> edFileInfos = edFileInfoMapper.selectList(Wrappers.lambdaQuery(EdFileInfo.class)
|
||||
.select(EdFileInfo.class, file -> !file.getColumn().equals("file_content"))
|
||||
.select(EdFileInfo.class, file -> !StrUtil.equals(file.getColumn(), "file_content"))
|
||||
.eq(EdFileInfo::getDataType, EleDataTypeEnum.FILE.code)
|
||||
.gt(EdFileInfo::getCreatedTime, fileMaxCreateTime));
|
||||
for (EdFileInfo edFileInfo : edFileInfos) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ spring.datasource.typd=com.alibaba.druid.pool.DruidDataSource
|
|||
spring.datasource.url=jdbc:mysql://139.196.179.195:3306/em_data_dev?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||
spring.datasource.username=em_user_dev
|
||||
spring.datasource.password=Szsd#2O25$dev
|
||||
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||
mybatis-plus.mapper-locations=classpath:sqlmapper/*.xml
|
||||
|
|
@ -13,35 +12,27 @@ spring.servlet.multipart.max-file-size=500MB
|
|||
spring.servlet.multipart.max-request-size=500MB
|
||||
pagehelper.helperDialect=mysql
|
||||
pagehelper.reasonable=false
|
||||
|
||||
server.port=12396
|
||||
#windows文件存储目录,用于测试
|
||||
data.windows.path=D:/tmp/szsd/data/eleData/dev/project/
|
||||
data.upload.windows.tmp.path=D:/tmp/szsd/data/eleData/dev/upload/
|
||||
data.download.windows.tmp.path=D:/tmp/szsd/data/eleData/dev/download/
|
||||
data.windows.tmp.path=D:/tmp/szsd/data/eleData/dev/tmp
|
||||
|
||||
data.windows.user.path=D:/tmp/szsd/data/eleData/dev/user_project/
|
||||
data.upload.windows.user.tmp.path=D:/tmp/szsd/data/eleData/dev/user_upload/
|
||||
data.download.windows.user.tmp.path=D:/tmp/szsd/data/eleData/dev/usr_download/
|
||||
data.windows.usere.tmp.path=D:/tmp/szsd/data/eleData/dev/user_tmp
|
||||
|
||||
data.linux.path=/szsd/data/eleData/dev/project/
|
||||
data.upload.linux.tmp.path=/szsd/data/eleData/dev/upload/
|
||||
data.download.linux.tmp.path=/szsd/data/eleData/dev/download/
|
||||
data.linux.tmp.path=/szsd/data/eleData/dev/tmp
|
||||
|
||||
# user path
|
||||
data.linux.user.path=/szsd/data/eleData/dev/user_project/
|
||||
data.upload.linux.user.tmp.path=/szsd/data/eleData/dev/user_upload/
|
||||
data.download.linux.user.tmp.path=/szsd/data/eleData/dev/usr_download/
|
||||
data.linux.user.tmp.path=/szsd/data/eleData/dev/user_tmp
|
||||
|
||||
prj.folder.max.length=6
|
||||
|
||||
spring.jackson.time-zone=GMT+8
|
||||
|
||||
tmp.file.store.days=7
|
||||
|
||||
backup.remote.host=127.0.0.1
|
||||
backup.remote.port=1111
|
||||
|
|
@ -9,7 +9,9 @@
|
|||
<result column="role_id" jdbcType="VARCHAR" property="roleId"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getCurrentPermission" parameterType="com.electromagnetic.industry.software.manage.pojo.req.PublishedFileDTO" resultMap="RolePermissionMap">
|
||||
<select id="getCurrentPermission"
|
||||
parameterType="com.electromagnetic.industry.software.manage.pojo.req.PublishedFileDTO"
|
||||
resultMap="RolePermissionMap">
|
||||
SELECT f.parent_id as file_id, rp.permission_code, rp.role_id
|
||||
FROM ed_role_permission rp
|
||||
JOIN ed_file_info f ON rp.file_id = f.id
|
||||
|
|
@ -18,14 +20,12 @@
|
|||
AND f.data_status = #{dataStatus}
|
||||
AND f.effect_flag = #{effectFlag}
|
||||
GROUP BY rp.role_id, rp.permission_code
|
||||
HAVING COUNT(f.id) = (
|
||||
SELECT COUNT(f2.id)
|
||||
HAVING COUNT(f.id) = (SELECT COUNT(f2.id)
|
||||
FROM ed_file_info f2
|
||||
WHERE f2.parent_id = #{fileId}
|
||||
AND f2.prj_dir = #{prjDir}
|
||||
AND f2.data_status = #{dataStatus}
|
||||
AND f2.effect_flag = #{effectFlag}
|
||||
)
|
||||
AND f2.effect_flag = #{effectFlag})
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,203 +0,0 @@
|
|||
package com.electromagnetic.industry.software.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum ElectromagneticErrorEnum implements ErrorEnum {
|
||||
/**
|
||||
* 系统
|
||||
*/
|
||||
SYSTEM_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "000", "SYSTEM_ERROR", "系统异常"),
|
||||
PARAMS_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "001", "PARAMS_ERROR", "参数异常"),
|
||||
/*****************业务级*****************/
|
||||
|
||||
|
||||
//111
|
||||
INPUT_PARAMETER_IS_EMPTY(ErrorLevels.ERROR, ErrorTypes.BIZ, "53001", "INPUT_PARAMETER_IS_EMPTY", "入参为空"),
|
||||
NAME_IS_EMPTY(ErrorLevels.ERROR, ErrorTypes.BIZ, "53002", "NAME_IS_EMPTY", "名字为空"),
|
||||
CREATOR_IS_EMPTY(ErrorLevels.ERROR, ErrorTypes.BIZ, "53003", "CREATOR_IS_EMPTY", "创建人不能为空"),
|
||||
NAME_IS_REPEAT(ErrorLevels.ERROR, ErrorTypes.BIZ, "53004", "NAME_IS_REPEAT", "名字重复"),
|
||||
NAME_FORM_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53005", "NAME_FORM_ERROR", "名字格式不正确"),
|
||||
PARENT_CATEGORY_NOT_EXIST(ErrorLevels.ERROR, ErrorTypes.BIZ, "53006", "PARENT_CATEGORY_NOT_EXIST", "父类目不存在"),
|
||||
DEPT_NOT_EXIST(ErrorLevels.ERROR, ErrorTypes.BIZ, "53007", "DEPT_NOT_EXIST", "属主部门不存在"),
|
||||
|
||||
CATEGORY_BUILD_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53008", "CATEGORY_BUILD_ERROR", "类目代码生成失败"),
|
||||
CATEGORY_INSERT_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53009", "CATEGORY_INSERT_ERROR", "类目新增异常"),
|
||||
CATEGORY_NOT_EXIST_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53010", "CATEGORY_NOT_EXIST_ERROR", "类目不存在"),
|
||||
CATEGORY_DELETE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53011", "CATEGORY_DELETE_ERROR", "类目删除异常"),
|
||||
REPORT_STATUS_CREATE(ErrorLevels.ERROR, ErrorTypes.BIZ, "53012", "REPORT_STATUS_CREATE", "新建状态可以编辑"),
|
||||
REPORT_STATUS_DELETE(ErrorLevels.ERROR, ErrorTypes.BIZ, "53013", "REPORT_STATUS_CREATE", "新建状态可以删除"),
|
||||
REPORT_DELETE(ErrorLevels.ERROR, ErrorTypes.BIZ, "53014", "REPORT_DELETE", "删除失败"),
|
||||
REPORT_UPDATE(ErrorLevels.ERROR, ErrorTypes.BIZ, "53015", "REPORT_UPDATE", "更新失败"),
|
||||
REPORT_CREATE(ErrorLevels.ERROR, ErrorTypes.BIZ, "53016", "REPORT_CREATE", "创建失败"),
|
||||
REPORT_STATUS(ErrorLevels.ERROR, ErrorTypes.BIZ, "53017", "REPORT_STATUS",
|
||||
"传入对应更新状态:●状态为“新增”,可操作“上架:3”;●状态为“使用中”,可传入“下架:4”;●状态为“将下架”,可操作“取消下架:6”"),
|
||||
REPORT_GINSENG_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53018", "REPORT_GINSENG_NULL", "入参为空"),
|
||||
REPORT_CHECK_NAME(ErrorLevels.ERROR, ErrorTypes.BIZ, "53019", "REPORT_GINSENG_NULL", "名称重复,请重新输入"),
|
||||
GETSEQUENCEID_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53020", "GETSEQUENCEID_ERROR", "序列化ID生成错误"),
|
||||
GET_DEPT_CODE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53020", "GET_DEPT_CODE_ERROR", "部门编码获取异常"),
|
||||
REPORT_NO_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53021", "REPORT_NO_ERROR", "ID生成不能为空"),
|
||||
DEPT_INSERT_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53022", "DEPT_INSERT_ERROR", "新增异常"),
|
||||
DEPT_EXIST(ErrorLevels.ERROR, ErrorTypes.BIZ, "53023", "DEPT_EXIST", "属主部门已存在"),
|
||||
DEPT_ENUM_NOT_EXIST(ErrorLevels.ERROR, ErrorTypes.BIZ, "53024", "DEPT_ENUM_NOT_EXIST", "属主部门枚举映射不存在"),
|
||||
DEPT_DELETE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53025", "DEPT_DELETE_ERROR", "部门删除异常"),
|
||||
REPORT_UN_SHELVE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53026", "REPORT_UN_SHELVE_ERROR", "下架數據为空"),
|
||||
|
||||
REPORT_ID_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53027", "REPORT_ID_NULL", "ID对应数据不存在"),
|
||||
REPORT_UN_SHELVE_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53028", "REPORT_ID_NULL", "沒有下架數據"),
|
||||
REPORT_CATEOGRYLV1_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53029", "REPORT_ID_NULL", "一級類目为空"),
|
||||
REPORT_CATEOGRYLV2_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53030", "REPORT_ID_NULL", "二級類目为空"),
|
||||
CATEGORY_EXIST(ErrorLevels.ERROR, ErrorTypes.BIZ, "53031", "CATEGORY_EXIST", "类目已存在"),
|
||||
CATEGORY_EXIST_REPORT(ErrorLevels.ERROR, ErrorTypes.BIZ, "53032", "CATEGORY_EXIST_REPORT", "类目下已挂在数据"),
|
||||
REPORT_URL_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53033", "REPORT_URL_ERROR", "FR报表地址错误"),
|
||||
REPORT_OFF_DESC_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53034", "REPORT_URL_ERROR", "下架原因不能为空"),
|
||||
REPORT_CANCEL_OFF_DESC_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53035", "REPORT_URL_ERROR", "取消下架原因不能为空"),
|
||||
DEPT_EXIST_REPORT(ErrorLevels.ERROR, ErrorTypes.BIZ, "53036", "DEPT_EXIST_REPORT", "部门下已挂在数据"),
|
||||
FINE_CREATE_USER_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53037", "FINE_CREATE_USER_ERROR", "创建用户失败"),
|
||||
FINE_CONNECT_LIST_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53038", "FINE_CONNECT_LIST_ERROR", "获取finebi数据库连接列表错误"),
|
||||
FINE_CONNECT_TABLE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53039", "FINE_CONNECT_TABLE_ERROR", "获取finebi数据库对应表列表错误"),
|
||||
FINE_ADD_GROUP_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53040", "FINE_ADD_GROUP_ERROR", "添加分组报错"),
|
||||
FINE_ADD_PACK_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53041", "FINE_ADD_PACK_ERROR", "添加业务包报错"),
|
||||
FINE_DELETE_USER_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53042", "FINE_DELETE_USER_ERROR", "删除用户失败"),
|
||||
FINE_ADD_DB_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53043", "FINE_ADD_DB_ERROR", "数据集已存在,请不要重复添加"),
|
||||
FINE_GET_TABLE_INFO_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53044", "FINE_GET_TABLE_INFO_ERROR", "数据集表信息错误"),
|
||||
LABEL_OBJNAME_IS_CHINESE(ErrorLevels.ERROR, ErrorTypes.BIZ, "53045", "LABEL_OSS_ANALYSIS_FAIL", "名称不能包含特殊字符(下划线,横杠,加号 除外)"),
|
||||
MEASURE_EXCEL_READ_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53046", "MEASURE_EXCEL_READ_ERROR", "文件读取失败,请按照模板重新上传!(是否有空值或重复数据或数据超过指定长度)"),
|
||||
MEASURE_UPDATE_STATUS_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53047", "MEASURE_UPDATE_STATUS_ERROR", "当前状态不允许更新指标"),
|
||||
FINE_ADD_TABLE_ROW_AUTHORITY_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53048", "FINE_ADD_TABLE_ROW_AUTHORITY_ERROR", "数据集添加行权限错误"),
|
||||
FINE_GET_ENTRY_TREE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53049", "fine_get_entry_tree_error", "bi获取目录报错"),
|
||||
FINE_ENTRY_AUTH_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53050", "FINE_ENTRY_AUTH_ERROR", "目录授权失败"),
|
||||
OAR_ORG_AUTH_LIST_REPEAT(ErrorLevels.ERROR, ErrorTypes.BIZ, "53051", "oar_org_auth_list_repeat", "适用机构重复"),
|
||||
|
||||
ACCOUNT_INFO_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "630005", "ACCOUNT_INFO_BY_ACC_ID_NULL", "调用运营支撑域获取信息为空"),
|
||||
ROLE_CODE_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "630005", "ACCOUNT_INFO_BY_ACC_ID_NULL", "用户对应角色为空"),
|
||||
ROLE_ORG_CODE_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "630005", "ACCOUNT_INFO_BY_ACC_ID_NULL", "工作组对应組员为空"),
|
||||
USER_ROLE_ORG_CODE_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "630008", "ACCOUNT_INFO_BY_ACC_ID_NULL", "角色对应机构为空"),
|
||||
OSS_ANALYSIS_FAIL(ErrorLevels.ERROR, ErrorTypes.BIZ, "50", "OSS_ANALYSIS_FAIL", "excel不能为空"),
|
||||
OAR_OFFLINE_CONFIG_NAME_REPEAT(ErrorLevels.ERROR, ErrorTypes.BIZ, "630009", "OAR_OFFLINE_CONFIG_NAME_REPEAT", "名称重复"),
|
||||
OAR_OFFLINE_CONFIG_DIMENSION_MEASURE_ERROR1(ErrorLevels.ERROR, ErrorTypes.BIZ, "630009", "OAR_OFFLINE_CONFIG_DIMENSION_MEASURE_ERROR1", "统计报表维度和度量不能为空"),
|
||||
OAR_OFFLINE_CONFIG_DIMENSION_MEASURE_ERROR2(ErrorLevels.ERROR, ErrorTypes.BIZ, "630009", "OAR_OFFLINE_CONFIG_DIMENSION_MEASURE_ERROR2", "清单报表维度和度量至少一个不能为空"),
|
||||
OAR_OFFLINE_CONFIG_CONDITION_VALUE_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "6300010", "OAR_OFFLINE_CONFIG_CONDITION_VALUE_NULL", "筛选条件值不能为空"),
|
||||
OAR_OFFLINE_CONFIG_NAME_NOT_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "630006", "OAR_OFFLINE_CONFIG_NAME_NOT_NULL", "任务名称不能为空"),
|
||||
OAR_OFFLINET_SQL_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "6300013", "OAR_OFFLINET_SQL_ERROR", "离线任务运行报错"),
|
||||
|
||||
OFFLINE_ERRORL(ErrorLevels.ERROR, ErrorTypes.BIZ, "630011", "OFFLINE_ERRORL", "更新失敗"),
|
||||
SEND_MESSAGE(ErrorLevels.ERROR, ErrorTypes.BIZ, "630012", "SEND_MESSAGE", "获取对应wrapper 异常"),
|
||||
OAR_OFFLINE_CONFIG_DETAIL_REPEAT(ErrorLevels.ERROR, ErrorTypes.BIZ, "630014", "oar_offline_config_detail_repeat", "该模板所选字段并无更改,请通过原模板 \"离线取数\" 功能提交离线任务!"),
|
||||
|
||||
EXCEL_TYPE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "100", "EXCEL_TYPE_ERROR", "报表类型不正确"),
|
||||
EXCEL_DELETE(ErrorLevels.ERROR, ErrorTypes.BIZ, "101", "EXCEL_DELETE", "行业数据删除失败"),
|
||||
DATA_EXCEL_DELETE(ErrorLevels.ERROR, ErrorTypes.BIZ, "102", "DATA_EXCEL_DELETE", "业务数据删除失败"),
|
||||
IMPORT_DATA_EXCEL(ErrorLevels.ERROR, ErrorTypes.BIZ, "103", "IMPORT_DATA_EXCEL", "业务数据导入失败"),
|
||||
UPDATE_DATA_EXCEL(ErrorLevels.ERROR, ErrorTypes.BIZ, "104", "UPDATE_DATA_EXCEL", "业务数据更新失败"),
|
||||
INSTITUTION_CODE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "105", "INSTITUTION_CODE_ERROR", "行机构编码错误!"),
|
||||
DATA_EMPTY(ErrorLevels.ERROR, ErrorTypes.BIZ, "106", "DATA_EMPTY", "模板存在空值,请检查并补充完整;"),
|
||||
NUMBER_EMPTY(ErrorLevels.ERROR, ErrorTypes.BIZ, "107", "NUMBER_EMPTY", "电融(万元)&网销(万元)&车商(万元)&线下(万元)&中介(万元)&重客(万元)总和不等于该行合计值"),
|
||||
DATA_EXIST(ErrorLevels.ERROR, ErrorTypes.BIZ, "108", "DATA_EXIST", "模板存在重复项,请检查更新!"),
|
||||
VELOCITY_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "109", "VELOCITY_ERROR", "模板转换失败"),
|
||||
PLAN_TYPE_DATE(ErrorLevels.ERROR, ErrorTypes.BIZ, "110", "PLAN_TYPE_DATE", "计划周期格式错误!"),
|
||||
WEEK_XUN_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "111", "WEEK_XUN_ERROR", "你所传的文件不是周旬报"),
|
||||
TOPIC_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "112", "TOPIC_ERROR", "主题不匹配"),
|
||||
CALIBER_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "113", "CALIBER_ERROR", "指标口径不匹配"),
|
||||
DATA_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "114", "DATA_ERROR", "报表缺失月份数据"),
|
||||
DATA_IS_EXIST(ErrorLevels.ERROR, ErrorTypes.BIZ, "115", "DATA_IS_EXIST", "数据已存在"),
|
||||
|
||||
DEPT_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53049", "DEPT_NULL", "当前该账户尚未授权,请联系管理员申请权限!"),
|
||||
MEMBER_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53050", "MEMBER_NULL", "对应组员为空"),
|
||||
ORG_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53050", "MEMBER_NULL", "用戶对应机构权限为空"),
|
||||
DATA_AUTHRIZATION(ErrorLevels.ERROR, ErrorTypes.BIZ, "53051", "DATA_AUTHRIZATION", "数据集授权"),
|
||||
GROUP_FLAG(ErrorLevels.ERROR, ErrorTypes.BIZ, "53052", "DATA_AUTHRIZATION", "工作组失效"),
|
||||
DATA_USER_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53053", "DATA_AUTHRIZATION", "数据为空"),
|
||||
DATA_UPDATE_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53054", "DATA_AUTHRIZATION", "数据为空。"),
|
||||
DATA_COLLECT_AUTH_IS(ErrorLevels.ERROR, ErrorTypes.BIZ, "53055", "DATA_COLLECT_AUTH_IS", "对应数据集和仪表板已经授权完成"),
|
||||
DATA_COLLECT_AUTH_IS_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53056", "DATA_COLLECT_AUTH_IS_NULL", "对应数据为空"),
|
||||
DATA_PRODUCT_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53057", "DATA_PRODUCT_NULL", "产品权限为空"),
|
||||
IMPORT_DATA_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53058", "IMPORT_DATA_NULL", "导入数据为空"),
|
||||
IMPORT_DATA_IS_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53059", "IMPORT_DATA_IS_NULL", "对应数据为空"),
|
||||
IMPORT_REPEAT_DATA(ErrorLevels.ERROR, ErrorTypes.BIZ, "53060", "IMPORT_REPEAT_DATA", "重复数据"),
|
||||
DATA_IS_INVALID(ErrorLevels.ERROR, ErrorTypes.BIZ, "53061", "DATA_IS_INVALID", "对应清单失效,请创建新的模板"),
|
||||
DATA_AUTH_USER_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53062", "data_auth_user_null", "用户组没有匹配到有权限的数据集"),
|
||||
FILE_NOT_EXIST(ErrorLevels.ERROR, ErrorTypes.BIZ, "53063", "FILE_NOT_EXIST", "字段文件下载失败"),
|
||||
EXCEL_FIELD_ANALYTICS_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53066", "EXCEL_FIELD_ANALYTICS_ERROR", "excel解析异常,请检查内容"),
|
||||
TASK_TIME_ROLE(ErrorLevels.ERROR, ErrorTypes.BIZ, "53067", "TASK_TIME_ROLE", "请设置定时任务日期滚动规则后再提交"),
|
||||
TASK_TEMPLATE_CREATE(ErrorLevels.ERROR, ErrorTypes.BIZ, "53067", "TASK_TIME_ROLE", "支持1~50个字符!"),
|
||||
IMPORT_DATA_LENGTH(ErrorLevels.ERROR, ErrorTypes.BIZ, "53068", "IMPORT_DATA_LENGTH", "字段说明长度支持100个字符!"),
|
||||
FILE_NAME_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53069", "FILE_NAME_ERROR", "文件命名错误"),
|
||||
FILE_NAME_REPEAT(ErrorLevels.ERROR, ErrorTypes.BIZ, "53070", "FILE_NAME_REPEAT", "存在相同命名的文件,请检查后重更新上传!"),
|
||||
INDICATORCARD_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53071", "INDICATORCARD_NULL", "指标卡为空!"),
|
||||
INDICATORCARD_DATA_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53072", "INDICATORCARD_DATA_ERROR", "指标数据请求异常!"),
|
||||
ANALYSISITEMPLATE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53073", "ANALYSISITEMPLATE_ERROR", "模板创建DB失败!"),
|
||||
INDICATORCARD_DB_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53074", "INDICATORCARD_DB_ERROR", "指标卡DB操作异常!"),
|
||||
INDICATORCARD_WARNING_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53075", "INDICATORCARD_WARNING_NULL", "预警已存在!"),
|
||||
RESOURCE_NO_GENERATE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53076", "RESOURCE_NO_GENERATE_ERROR", "业务编码生成异常,请联系管理员"),
|
||||
INDICATOR_DATASERVICE_NO_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53077", "INDICATOR_DATASERVICE_NO_NULL", "服务编码不能为空!"),
|
||||
INDICATOR_DT_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53078", "INDICATOR_DT_NULL", "指标数据DT时间为空!"),
|
||||
INDICATOR_HOST_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53079", "INDICATOR_HOST_NULL", "主指标不能为空!"),
|
||||
INDICATOR_CARD_NO_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53080", "INDICATOR_CARD_NO_NULL", "指标卡编码不能为空!"),
|
||||
INDICATOR_CARD_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53081", "INDICATOR_CARD_NULL", "无匹配的指标卡!"),
|
||||
INDICATOR_DATAFILE_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53082", "INDICATOR_DATAFILE_NULL", "返回数据中没有指标字段!"),
|
||||
INDICATOR_DT_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53083", "INDICATOR_DT_ERROR", "请选择正确的DT或者服务编码!"),
|
||||
DRILLINGCONFIG_INDICATOR_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53084", "DRILLINGCONFIG_INDICATOR_NULL", "下钻配置字段未匹配到指标字段!"),
|
||||
DUTIES_UPDATE_IDS_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53085", "DUTIES_UPDATE_IDS_ERROR", "入参ids不能为空"),
|
||||
DUTIES_MEASURES_UPDATE_LIST_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53086", "DUTIES_MEASURES_UPDATE_LIST_ERROR", "举措信息不能为空"),
|
||||
INDICATOR_WARN_CREATE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53087", "INDICATOR_WARN_CREATE_ERROR", "保存指标预警规则失败"),
|
||||
INDICATOR_WARN_UPDATE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53088", "INDICATOR_WARN_UPDATE_ERROR", "指标预警规则更新失败"),
|
||||
INDICATOR_WARN_RESULT_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53089", "INDICATOR_WARN_RESULT_ERROR", "指标预警结果查询失败"),
|
||||
INDICATOR_WARN_DEL_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53090", "INDICATOR_WARN_DEL_ERROR", "指标预警删除失败"),
|
||||
INDICATOR_WARN_NULL_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53091", "INDICATOR_WARN_NULL_ERROR", "请求预警中心参数为空"),
|
||||
MESSAGE_DING_PUSH_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53092", "MESSAGE_DING_PUSH_ERROR", "钉钉消息推送失败"),
|
||||
INDICATORCARD_UPDATESTATUSOREFFECT_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53093", "INDICATORCARD_UPDATESTATUSOREFFECT_ERROR", "指标卡状态更新或删除失败"),
|
||||
INDICATORCARD_INVALID_OPERATION(ErrorLevels.ERROR, ErrorTypes.BIZ, "53094", "INDICATORCARD_INVALID_OPERATION", "指标卡状态更新或删除无效的操作"),
|
||||
DUTIES_CREATE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53095", "DUTIES_CREATE_ERROR", "一键通知失败!"),
|
||||
DUTIES_MEASURES_SOLVETIME_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53096", "DUTIES_MEASURES_SOLVETIME_ERROR", "请选择正确的举措时间"),
|
||||
USER_INFO_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53097", "USER_INFO_NULL", "用户信息不能为空!"),
|
||||
EXIST_GOAL_CONFIG(ErrorLevels.ERROR, ErrorTypes.BIZ, "53098", "EXIST_GOAL_CONFIG", "已存在该年度的目标计划!"),
|
||||
DATASERVICE_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53099", "DATASERVICE_NULL", "数据服务不存在!"),
|
||||
DATASERVICE_NO_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53100", "DATASERVICE_NO_NULL", "服务编码不存在!"),
|
||||
ANALYSISTEMPLATE_NO_NULL(ErrorLevels.ERROR, ErrorTypes.BIZ, "53101", "ANALYSISTEMPLATE_NO_NULL", "模板不存在!"),
|
||||
INDICATORCARWRAINGONE(ErrorLevels.ERROR, ErrorTypes.BIZ, "53102", "INDICATORCARWRAINGONE", "一个指标卡只支持一个预警指标!"),
|
||||
TESTDRILLINGDATA_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53103", "TESTDRILLINGDATA_ERROR", "下钻服务测试失败!"),
|
||||
DRILLINGCONFIG_ORGLEVE_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53104", " DRILLINGCONFIG_ORGLEVE_ERROR", "下钻机构权限勾选不正确!"),
|
||||
BRANCH_ORGANIZATION_ERROR(ErrorLevels.ERROR, ErrorTypes.BIZ, "53105", "BRANCH_ORGANIZATION_ERROR", "获取用户配置机构信息!"),
|
||||
USER_NOT_FOUND(ErrorLevels.ERROR, ErrorTypes.BIZ, "53106", "USER_NOT_FOUND", "用户不存在"),
|
||||
OLD_PASSWORD_INCORRECT(ErrorLevels.ERROR, ErrorTypes.BIZ, "53107", "OLD_PASSWORD_INCORRECT", "旧密码不正确"),
|
||||
;
|
||||
|
||||
|
||||
private String codeType;
|
||||
|
||||
private String codeLevel;
|
||||
|
||||
private String code;
|
||||
|
||||
private String errorMessage;
|
||||
|
||||
private String errorDesc;
|
||||
|
||||
/**
|
||||
* DataplatformLabelErrorEnum
|
||||
*
|
||||
* @param codeLevel
|
||||
* @param codeType
|
||||
* @param code
|
||||
* @param errorMessage
|
||||
* @param errorDesc
|
||||
*/
|
||||
ElectromagneticErrorEnum(String codeLevel, String codeType, String code, String errorMessage, String errorDesc) {
|
||||
|
||||
this.codeType = codeType;
|
||||
this.codeLevel = codeLevel;
|
||||
this.code = code;
|
||||
this.errorMessage = errorMessage;
|
||||
this.errorDesc = errorDesc;
|
||||
}
|
||||
|
||||
public void setErrorDesc(String errorDesc) {
|
||||
this.errorDesc = errorDesc;
|
||||
}
|
||||
|
||||
public ElectromagneticErrorEnum changeErrorDesc(String str) {
|
||||
this.setErrorDesc(str);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package com.electromagnetic.industry.software.common.enums;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -48,13 +50,18 @@ public enum FilePermission {
|
|||
public static List<String> getAllCodesExcludeView() {
|
||||
List<String> codes = new ArrayList<>();
|
||||
for (FilePermission permission : FilePermission.values()) {
|
||||
if (!permission.getCode().equals("view")) {
|
||||
if (StrUtil.equals(permission.getCode(), "view")) {
|
||||
codes.add(permission.getCode());
|
||||
}// 获取每个枚举实例的 code
|
||||
}
|
||||
return codes;
|
||||
}
|
||||
|
||||
// 转换成权限描述
|
||||
public static String toDescription(String code) {
|
||||
return fromCode(code).getDescription();
|
||||
}
|
||||
|
||||
// 获取权限代码
|
||||
public String getCode() {
|
||||
return code;
|
||||
|
|
@ -64,10 +71,5 @@ public enum FilePermission {
|
|||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
// 转换成权限描述
|
||||
public static String toDescription(String code) {
|
||||
return fromCode(code).getDescription();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,5 +27,4 @@ public class TextParse extends FileParse {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
|
|||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -20,6 +20,12 @@ import java.util.regex.Pattern;
|
|||
public final class EleCommonUtil {
|
||||
|
||||
private static final Map<String, FileParse> PARSE_MAP = new HashMap<>();
|
||||
// 正则表达式模式,匹配中文字符、下划线、连字符、加号、数字和英文字符
|
||||
private static final String PATTERN = "^[\\u4e00-\\u9fa5a-zA-Z0-9._\\-+]+$";
|
||||
private static final String TIME_FORMAT1 = "yyMMddHHmmssSSS";
|
||||
// 编译正则表达式
|
||||
private static final Pattern pattern = Pattern.compile(PATTERN);
|
||||
private static EleLog log = new EleLog(EleCommonUtil.class);
|
||||
|
||||
static {
|
||||
PARSE_MAP.put("doc", new WordParse());
|
||||
|
|
@ -39,16 +45,6 @@ public final class EleCommonUtil {
|
|||
PARSE_MAP.put("pdf", new PdfParse());
|
||||
}
|
||||
|
||||
// 正则表达式模式,匹配中文字符、下划线、连字符、加号、数字和英文字符
|
||||
private static final String PATTERN = "^[\\u4e00-\\u9fa5a-zA-Z0-9._\\-+]+$";
|
||||
|
||||
private static final String TIME_FORMAT1 = "yyMMddHHmmssSSS";
|
||||
|
||||
// 编译正则表达式
|
||||
private static final Pattern pattern = Pattern.compile(PATTERN);
|
||||
|
||||
private static EleLog log = new EleLog(EleCommonUtil.class);
|
||||
|
||||
public static boolean isFileNameValid(String fileFullName) {
|
||||
if (StrUtil.isEmpty(fileFullName) || fileFullName.length() > 32) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -15,27 +15,6 @@ public class EleLog {
|
|||
this.logger = LoggerFactory.getLogger(clazz);
|
||||
}
|
||||
|
||||
public void info(String msg, Object... args) {
|
||||
logger.info(format(msg, args));
|
||||
}
|
||||
|
||||
public void debug(String msg, Object... args) {
|
||||
logger.debug(format(msg, args));
|
||||
}
|
||||
|
||||
public void warn(String msg, Object... args) {
|
||||
logger.warn(format(msg, args));
|
||||
}
|
||||
|
||||
public void error(String msg, Object... args) {
|
||||
logger.error(format(msg, args));
|
||||
}
|
||||
|
||||
public void error(String msg, Throwable e, Object... args) {
|
||||
String info = format(msg, args);
|
||||
logger.error(info, e);
|
||||
}
|
||||
|
||||
private static String format(String strPattern, Object... argArray) {
|
||||
if (!StrUtil.isBlank(strPattern) && !StrUtil.isBlank(PLACE_HOLDER) && !ArrayUtil.isEmpty(argArray)) {
|
||||
int strPatternLength = strPattern.length();
|
||||
|
|
@ -78,4 +57,25 @@ public class EleLog {
|
|||
return strPattern;
|
||||
}
|
||||
}
|
||||
|
||||
public void info(String msg, Object... args) {
|
||||
logger.info(format(msg, args));
|
||||
}
|
||||
|
||||
public void debug(String msg, Object... args) {
|
||||
logger.debug(format(msg, args));
|
||||
}
|
||||
|
||||
public void warn(String msg, Object... args) {
|
||||
logger.warn(format(msg, args));
|
||||
}
|
||||
|
||||
public void error(String msg, Object... args) {
|
||||
logger.error(format(msg, args));
|
||||
}
|
||||
|
||||
public void error(String msg, Throwable e, Object... args) {
|
||||
String info = format(msg, args);
|
||||
logger.error(info, e);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,5 +30,4 @@ public class ElectromagneticResultUtil {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|||
import org.apache.poi.xwpf.extractor.XWPFWordExtractor;
|
||||
import org.apache.poi.xwpf.usermodel.XWPFDocument;
|
||||
|
||||
import java.io.*;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Objects;
|
||||
|
|
|
|||
|
|
@ -46,14 +46,14 @@ public class UserThreadLocal {
|
|||
return userThread.get().getResult();
|
||||
}
|
||||
|
||||
public static void setReqArgs(String args) {
|
||||
userThread.get().setReqArgs(args);
|
||||
}
|
||||
|
||||
public static String getReqArgs() {
|
||||
return userThread.get().getReqArgs();
|
||||
}
|
||||
|
||||
public static void setReqArgs(String args) {
|
||||
userThread.get().setReqArgs(args);
|
||||
}
|
||||
|
||||
public static void setSuccessInfo(String parentId, String dataId, String strPattern, Object... argArray) {
|
||||
parentId = StrUtil.isEmpty(parentId) ? "" : parentId;
|
||||
dataId = StrUtil.isEmpty(dataId) ? "" : dataId;
|
||||
|
|
|
|||
Loading…
Reference in New Issue