批量替换表前缀调整

dep_wangsr
RuoYi 5 years ago committed by Limy
parent 3483db5a45
commit a8e07dbe15

@ -5778,7 +5778,7 @@ td.visible-lg {
display: table-cell !important; display: table-cell !important;
} }
} }
.hidden-xs { .summernote .hidden-xs {
display: block !important; display: block !important;
} }
tr.hidden-xs { tr.hidden-xs {

@ -166,12 +166,32 @@ public class GenUtils
if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix)) if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix))
{ {
String[] searchList = StringUtils.split(tablePrefix, ","); String[] searchList = StringUtils.split(tablePrefix, ",");
String[] replacementList = emptyList(searchList.length); tableName = replaceFirst(tableName, searchList);
tableName = StringUtils.replaceEach(tableName, searchList, replacementList);
} }
return StringUtils.convertToCamelCase(tableName); 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;
}
/** /**
* *
* *

@ -71,7 +71,7 @@
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="${permissionPrefix}:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="${permissionPrefix}:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>

Loading…
Cancel
Save