mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-29 06:53:10 +00:00
update 优化 代码生成表名判断 使用开头判断避免误判
This commit is contained in:
@@ -149,11 +149,11 @@ public class GenTableServiceImpl implements IGenTableService {
|
||||
boolean commentMatches = true;
|
||||
// 进行表名称的模糊查询
|
||||
if (StringUtils.isNotBlank(tableName)) {
|
||||
nameMatches = StringUtils.containsIgnoreCase(x.getName(), tableName);
|
||||
nameMatches = StringUtils.startsWithIgnoreCase(x.getName(), tableName);
|
||||
}
|
||||
// 进行表描述的模糊查询
|
||||
if (StringUtils.isNotBlank(tableComment)) {
|
||||
commentMatches = StringUtils.containsIgnoreCase(x.getComment(), tableComment);
|
||||
commentMatches = StringUtils.startsWithIgnoreCase(x.getComment(), tableComment);
|
||||
}
|
||||
// 同时匹配名称和描述
|
||||
return nameMatches && commentMatches;
|
||||
|
Reference in New Issue
Block a user