Commit ca6a4b2e by RuoYi

批量替换表前缀调整

parent 9247e004
......@@ -5778,7 +5778,7 @@ td.visible-lg {
display: table-cell !important;
}
}
.hidden-xs {
.summernote .hidden-xs {
display: block !important;
}
tr.hidden-xs {
......
......@@ -166,13 +166,33 @@ public class GenUtils
if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix))
{
String[] searchList = StringUtils.split(tablePrefix, ",");
String[] replacementList = emptyList(searchList.length);
tableName = StringUtils.replaceEach(tableName, searchList, replacementList);
tableName = replaceFirst(tableName, searchList);
}
return StringUtils.convertToCamelCase(tableName);
}
/**
* 批量替换前缀
*
* @param replacementm 替换值
* @param searchList 替换列表
* @return
*/
public static String replaceFirst(String replacementm, String[] searchList)
{
String text = replacementm;
for (String searchString : searchList)
{
if (replacementm.startsWith(searchString))
{
text = replacementm.replaceFirst(searchString, "");
break;
}
}
return text;
}
/**
* 关键字替换
*
* @param name 需要被替换的名字
......
......@@ -71,7 +71,7 @@
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="${permissionPrefix}:export">
<i class="fa fa-download"></i> 导出
</a>
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
......
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