1;店铺数据-复制模版 replaceAll特殊字符报错 Matcher.quoteReplacement处理
This commit is contained in:
parent
dda73772cb
commit
49396391c6
|
@ -31,6 +31,7 @@ import java.time.LocalDate;
|
|||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
@ -204,7 +205,7 @@ public class BusStoreInfoController extends BaseController {
|
|||
String content = busTemplateInfo.getTemplateContent();
|
||||
// for(BusTemplateAttrInfo busTemplateAttrInfo:busTemplateInfo.getAttrInfoList()){
|
||||
// if(content.contains(busTemplateAttrInfo.getAttrValue())){
|
||||
content = content.replaceAll("#name",busStoreInfo.getStoreName());
|
||||
content = content.replaceAll("#name", Matcher.quoteReplacement(busStoreInfo.getStoreName()));
|
||||
content = content.replaceAll("#from", "1".equals(busStoreInfo.getPlatformType())?"美团":"饿了么");
|
||||
content = content.replaceAll("#date", LocalDate.now().minusDays(1).toString());
|
||||
content = content.replaceAll("#count",busStoreDayInfo1.getLastOrderNum()+"");
|
||||
|
|
Loading…
Reference in New Issue