master
chentaisen 2024-09-03 21:05:41 +08:00
parent e474cb3d82
commit e82c31dd70
3 changed files with 15 additions and 14 deletions

View File

@ -79,4 +79,5 @@ public class GenerateConstant {
" }\n" + " }\n" +
"}"; "}";
} }
} }

View File

@ -85,6 +85,7 @@ public class RuleEditionController {
} else { } else {
log.info("没有找到文件"); log.info("没有找到文件");
} }
LambdaQueryWrapper<RuleEdition> queryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<RuleEdition> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq( queryWrapper.eq(
RuleEdition::getRuleKind, ruleEdition.getRuleKind() RuleEdition::getRuleKind, ruleEdition.getRuleKind()

View File

@ -22,48 +22,48 @@ public class JavaCodeScan {
/** /**
* java file * java file
* @param filePath *
* @param filePath
* @return * @return
*/ */
public static File[] javaSourceScanByPath(String filePath){ public static File[] javaSourceScanByPath(String filePath) {
return filterFileBySuf(filePath,JAVA_SOURCE_SUF); return filterFileBySuf(filePath, JAVA_SOURCE_SUF);
} }
/** /**
* java file * java file
* @param filePath *
* @param filePath
* @return * @return
*/ */
public static File[] javaBinaryByPath(String filePath){ public static File[] javaBinaryByPath(String filePath) {
return filterFileBySuf(filePath,JAVA_BINARY_SUF); return filterFileBySuf(filePath, JAVA_BINARY_SUF);
} }
/** /**
* java File * java File
*
* @param filePath * @param filePath
* @return * @return
*/ */
public static File isJavaSourceScanByPath(String filePath){ public static File isJavaSourceScanByPath(String filePath) {
File file = new File(filePath); File file = new File(filePath);
if (file.isFile()){ if (file.isFile()) {
return file; return file;
} }
return null; return null;
} }
/** /**
*
* @param filePath * @param filePath
* @param suf * @param suf
* @return * @return
*/ */
public static File[] filterFileBySuf(String filePath,String suf){ public static File[] filterFileBySuf(String filePath, String suf) {
//创建需要扫描的文件夹 //创建需要扫描的文件夹
File file = new File(filePath); File file = new File(filePath);
//列出所有的筛选suf结尾的文件集 //列出所有的筛选suf结尾的文件集
@ -74,7 +74,6 @@ public class JavaCodeScan {
return false; return false;
} else { } else {
log.info("扫描到{}文件->{}", suf, name); log.info("扫描到{}文件->{}", suf, name);
return true; return true;
} }