class FilesController {
    private ExecutorService cachedThreadPool = Executors.newCachedThreadPool();
    @Autowired
    private FileTool fileTool;

    /**
     * @param day 文件保留天数
     * @return org.cloud.sonic.common.http.RespModel
     * @author ZhouYiXun
     * @des 删除本地文件
     * @date 2021/8/21 21:47
     */
    @WebAspect
    @DeleteMapping
    public RespModel<String> delete(@RequestParam(name = "day") int day) {<FILL_FUNCTION_BODY>}
}

        long timeMillis = Calendar.getInstance().getTimeInMillis();
        SimpleDateFormat sf = new SimpleDateFormat("yyyyMMdd");
        List<String> fileList = Arrays.asList("imageFiles", "recordFiles", "logFiles", "packageFiles");
        cachedThreadPool.execute(() -> {
            for (String fileType : fileList) {
                File f = new File(fileType);
                File[] type = f.listFiles();
                if (type != null) {
                    for (File dateFile : type) {
                        try {
                            if (timeMillis - sf.parse(dateFile.getName()).getTime()
                                    > day * 86400000L) {
                                log.info("clean begin! " + dateFile.getPath());
                                fileTool.deleteDir(dateFile);
                            }
                        } catch (ParseException e) {
                            log.info("Parse file name error, cause: " + dateFile.getPath());
                            log.error(e.getMessage());
                        }
                    }
                }
            }
        });
        return new RespModel<>(2000, "file.clean");
    
<no_super_class>