feat: There is no way the, 重置ES
This commit is contained in:
+18
-4
@@ -236,7 +236,7 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
fullTextSearchEO.put("textItems",textItemContent.toString());
|
||||
|
||||
if (null != attrInfoMap.get("issueTime") && !"".equals(attrInfoMap.get("issueTime")) && !"null".equals(attrInfoMap.get("issueTime"))) {
|
||||
fullTextSearchEO.put("issue_time", attrInfoMap.get("issueTime"));
|
||||
fullTextSearchEO.put("issue_time", dateFormatToStr(String.valueOf(attrInfoMap.get("issueTime"))));
|
||||
}else {
|
||||
fullTextSearchEO.put("issue_time", "--");
|
||||
}
|
||||
@@ -298,7 +298,7 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
fullTextSearchEO.put("textContent",textContent.toString());
|
||||
|
||||
if (null != attrInfoMap.get("issueTime") && !"".equals(attrInfoMap.get("issueTime")) && !"null".equals(attrInfoMap.get("issueTime"))) {
|
||||
fullTextSearchEO.put("issue_time", attrInfoMap.get("issueTime"));
|
||||
fullTextSearchEO.put("issue_time", dateFormatToStr(String.valueOf(attrInfoMap.get("issueTime"))));
|
||||
}else {
|
||||
fullTextSearchEO.put("issue_time", "--");
|
||||
}
|
||||
@@ -349,14 +349,28 @@ public class StandLawsSearchServiceImpl implements StandLawsSearchService {
|
||||
StringBuilder textContent = replaceAll(contentBuilder, "null", "--");
|
||||
fullTextSearchEO.put("textContent",textContent.toString());
|
||||
if (null != attrInfoMap.get("issueTime") && !"".equals(attrInfoMap.get("issueTime")) && !"null".equals(attrInfoMap.get("issueTime"))) {
|
||||
fullTextSearchEO.put("issue_time", attrInfoMap.get("issueTime"));
|
||||
fullTextSearchEO.put("issue_time", dateFormatToStr(String.valueOf(attrInfoMap.get("issueTime"))));
|
||||
}else {
|
||||
fullTextSearchEO.put("issue_time", "");
|
||||
fullTextSearchEO.put("issue_time", "--");
|
||||
}
|
||||
}
|
||||
return fullTextSearchEO;
|
||||
}
|
||||
|
||||
private String dateFormatToStr(String dateStr){
|
||||
if(dateStr == null || dateStr.equals("")){
|
||||
return "";
|
||||
}
|
||||
String dateToStr = "";
|
||||
try {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
dateToStr = dateFormat.format(dateFormat.parse(dateStr.trim().substring(0,10)));
|
||||
}catch (Exception e){
|
||||
e.getMessage();
|
||||
}
|
||||
return dateToStr;
|
||||
}
|
||||
|
||||
FullTextSearchEO getFullTextSearch(StandLawsEO standLawsEO){
|
||||
FullTextSearchEO fullTextSearchEO = new FullTextSearchEO();
|
||||
fullTextSearchEO.setId(standLawsEO.getId());
|
||||
|
||||
Reference in New Issue
Block a user