Commit a0cb123f authored by 杨郁彬's avatar 杨郁彬

多个目录jiam

parent 9f3d4d46
......@@ -34,7 +34,7 @@ public class CisController {
/**
* 目录(文件)加密调试
* @param dir 目录(文件)路径 如:20240304 或者 20240304/123.ofd
* @param dir 目录(文件)路径 如:20240304 或者 20240304/123.ofd 若传多个用-分隔 如:20240304-20240305-20240306
* @param request
* @return
*/
......@@ -47,9 +47,13 @@ public class CisController {
request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE).toString();
path = path.replace("/cis/encrypted/","");
path = path.replace("\\","/");
String filePath = fileBasePath + path;
String[] filePaths = path.split("-");
List<String> failFiles = new ArrayList<>();
this.recursiveEncrypted(new File(filePath),failFiles);
for(int i=0;i<filePaths.length;i++){
StringBuffer filePath = new StringBuffer(fileBasePath);
filePath.append(filePaths[i]);
this.recursiveEncrypted(new File(filePath.toString()),failFiles);
}
if(failFiles.size()>0){
mm.put("status", "fail");
ObjectMapper objectMapper = new ObjectMapper();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment