修改字段
This commit is contained in:
@@ -10,7 +10,7 @@ public class BillSyncSnapshot
|
||||
private String responseJson;
|
||||
private String status;
|
||||
private String errorMessage;
|
||||
private String updatedAt;
|
||||
private String updateTime;
|
||||
|
||||
public String getDocId()
|
||||
{
|
||||
@@ -82,13 +82,13 @@ public class BillSyncSnapshot
|
||||
this.errorMessage = errorMessage;
|
||||
}
|
||||
|
||||
public String getUpdatedAt()
|
||||
public String getUpdateTime()
|
||||
{
|
||||
return updatedAt;
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdatedAt(String updatedAt)
|
||||
public void setUpdateTime(String updateTime)
|
||||
{
|
||||
this.updatedAt = updatedAt;
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,9 @@ public class EsBillSearchStore implements IBillSearchStore
|
||||
doc.put("error", StringUtils.isEmpty(errorMessage) ? null : errorMessage);
|
||||
doc.put("request", parseOrRaw(requestJson));
|
||||
doc.put("response", parseOrRaw(responseJson));
|
||||
doc.put("updatedAt", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(now));
|
||||
String ts = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(now);
|
||||
doc.put("updatedAt", ts);
|
||||
doc.put("updateTime", ts);
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||
HttpEntity<String> entity = new HttpEntity<String>(doc.toJSONString(), headers);
|
||||
@@ -218,7 +220,12 @@ public class EsBillSearchStore implements IBillSearchStore
|
||||
}
|
||||
snap.setRequestJson(toJsonString(source.get("request")));
|
||||
snap.setResponseJson(toJsonString(source.get("response")));
|
||||
snap.setUpdatedAt(source.getString("updatedAt"));
|
||||
String time = source.getString("updateTime");
|
||||
if (StringUtils.isEmpty(time))
|
||||
{
|
||||
time = source.getString("updatedAt");
|
||||
}
|
||||
snap.setUpdateTime(time);
|
||||
String status = source.getString("status");
|
||||
snap.setStatus(StringUtils.isEmpty(status) ? EsBizLogSupport.STATUS_SUCCESS : status);
|
||||
snap.setErrorMessage(source.getString("error"));
|
||||
|
||||
Reference in New Issue
Block a user