feat: 优化为批量更新结果类的 toString 方法实现
- 为BatchUpdateErrorInfo类实现toString方法 - 重构BatchUpdateResult类的toString方法,调整字段顺序
This commit is contained in:
@@ -78,4 +78,17 @@ public class BatchUpdateErrorInfo {
|
|||||||
return errorType;
|
return errorType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回该错误信息的字符串表示,包含批次索引、错误类型和错误消息。
|
||||||
|
*
|
||||||
|
* @return 格式为 {@code "BatchUpdateErrorInfo{batchIndex=..., errorType=..., message=...}"} 的字符串
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "BatchUpdateErrorInfo{"
|
||||||
|
+ "batchIndex=" + batchIndex
|
||||||
|
+ ", errorType=" + errorType.getName()
|
||||||
|
+ ", message=" + cause.getMessage()
|
||||||
|
+ "}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -230,10 +230,10 @@ public class BatchUpdateResult {
|
|||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "BatchUpdateResult ["
|
return "BatchUpdateResult ["
|
||||||
+ "total=" + total
|
+ "status=" + status
|
||||||
+ ", batchCount=" + batchCount
|
+ ", total=" + total
|
||||||
+ ", batchSize=" + batchSize
|
+ ", batchSize=" + batchSize
|
||||||
+ ", status=" + status
|
+ ", batchCount=" + batchCount
|
||||||
+ ", completeBatchCount=" + completeBatchCount
|
+ ", completeBatchCount=" + completeBatchCount
|
||||||
+ ", successBatchCount=" + successBatchCount
|
+ ", successBatchCount=" + successBatchCount
|
||||||
+ ", errorBatchCount=" + getErrorBatchCount()
|
+ ", errorBatchCount=" + getErrorBatchCount()
|
||||||
|
|||||||
Reference in New Issue
Block a user