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