mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-11-15 06:59:29 +08:00
✨ 代码优化
This commit is contained in:
parent
2548f082d1
commit
b5efed073b
@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springblade.core.datascope.constant;
|
||||
|
||||
import org.springblade.core.tool.utils.StringUtil;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* 数据权限常量
|
||||
@ -53,12 +53,11 @@ public interface DataScopeConstant {
|
||||
* @return String
|
||||
*/
|
||||
static String buildHolder(int size) {
|
||||
StringBuilder builder = StringUtil.builder();
|
||||
StringJoiner joiner = new StringJoiner(",");
|
||||
for (int i = 0; i < size; i++) {
|
||||
builder.append("?,");
|
||||
joiner.add("?");
|
||||
}
|
||||
return StringUtil.removeSuffix(builder.toString(), ",");
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user