支付title 字符串过滤
This commit is contained in:
parent
383dbb2d4e
commit
897600335e
@ -226,6 +226,7 @@ lili:
|
||||
WALLET_PASSWORD: SMS_205755301
|
||||
system:
|
||||
isDemoSite: false
|
||||
isTestModel: true
|
||||
statistics:
|
||||
# 在线人数统计 X 小时。这里设置48,即统计过去48小时每小时在线人数
|
||||
onlineMember: 48
|
||||
|
@ -12,6 +12,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* 字串工具类
|
||||
@ -250,6 +252,18 @@ public class StringUtils extends StrUtil {
|
||||
}
|
||||
return str.concat(appendStr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤特殊字符串
|
||||
* @param str
|
||||
* @return
|
||||
*/
|
||||
public static String filterSpecialChart(String str){
|
||||
String regEx="[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]";
|
||||
Pattern p = Pattern.compile(regEx);
|
||||
Matcher m = p.matcher(str);
|
||||
return m.replaceAll("").trim();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.lili.modules.payment.kit.params.dto;
|
||||
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
@ -41,4 +42,11 @@ public class CashierParam {
|
||||
|
||||
@ApiModelProperty(value = "剩余余额")
|
||||
private Double walletValue;
|
||||
|
||||
public String getDetail() {
|
||||
if (StringUtils.isEmpty(detail)) {
|
||||
return "清单详细";
|
||||
}
|
||||
return StringUtils.filterSpecialChart(detail);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user