优化字符串替换方法replaceAll替换为replace
This commit is contained in:
@@ -24,7 +24,7 @@ public class IdGenerate {
|
|||||||
* 生成UUID, 中间无-分割.
|
* 生成UUID, 中间无-分割.
|
||||||
*/
|
*/
|
||||||
public static String uuid() {
|
public static String uuid() {
|
||||||
return UUID.randomUUID().toString().replaceAll("-", "");
|
return StringUtils.replace(UUID.randomUUID().toString(),"-", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ package com.jeesite.common.utils.excel.fieldtype;
|
|||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 金额类型转换(保留两位)
|
* 金额类型转换(保留两位)
|
||||||
@@ -19,7 +21,7 @@ public class MoneyType {
|
|||||||
* 获取对象值(导入)
|
* 获取对象值(导入)
|
||||||
*/
|
*/
|
||||||
public static Object getValue(String val) {
|
public static Object getValue(String val) {
|
||||||
return val == null ? "" : val.replaceAll(",", "");
|
return val == null ? "" : StringUtils.replace(val, ",", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user