Commit fdb213c5 authored by 郝彦辉's avatar 郝彦辉

检测tidb的call_record表数据是否有重复数据工具

parent a2e039f6
......@@ -585,10 +585,10 @@ public class CleanningTransactionLogService {
TransactionLogPO transactionLogPO = transactionLogPOList.get(tran);
String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(transactionLogPO.getTimeCreated());
String key = new StringBuffer(transactionLogPO.getTransactionId())
.append(StringUtils.isNotBlank(transactionLogPO.getUuid()) ? transactionLogPO.getUuid() : "")
.append(transactionLogPO.getUrlType())
.append(transactionLogPO.getCode())
String key = new StringBuffer(transactionLogPO.getTransactionId()).append(",")
.append(StringUtils.isNotBlank(transactionLogPO.getUuid()) ? transactionLogPO.getUuid() : "").append(",")
.append(transactionLogPO.getUrlType()).append(",")
.append(transactionLogPO.getCode()).append(",")
.append(format).toString();
transactionLogPOMap.put(key, transactionLogPO);
}
......@@ -607,10 +607,10 @@ public class CleanningTransactionLogService {
for (int call = 0; call < queryResult.size(); call++) {
CallRecord1 callRecord1 = queryResult.get(call);
String format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(callRecord1.getCreated_at().getTime()));
String key = new StringBuffer(callRecord1.getTransactionId())
.append(StringUtils.isNotBlank(callRecord1.getUuid()) ? callRecord1.getUuid() : "")
.append(callRecord1.getUrlType())
.append(callRecord1.getCode())
String key = new StringBuffer(callRecord1.getTransactionId()).append(",")
.append(StringUtils.isNotBlank(callRecord1.getUuid()) ? callRecord1.getUuid() : "").append(",")
.append(callRecord1.getUrlType()).append(",")
.append(callRecord1.getCode()).append(",")
.append(format).toString();
callRecord1Map.put(key, callRecord1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment