feat: 优化为批量更新结果类的 toString 方法实现
- 为BatchUpdateErrorInfo类实现toString方法 - 重构BatchUpdateResult类的toString方法,调整字段顺序
This commit is contained in:
@@ -78,4 +78,17 @@ public class BatchUpdateErrorInfo {
|
||||
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
|
||||
public String toString() {
|
||||
return "BatchUpdateResult ["
|
||||
+ "total=" + total
|
||||
+ ", batchCount=" + batchCount
|
||||
+ "status=" + status
|
||||
+ ", total=" + total
|
||||
+ ", batchSize=" + batchSize
|
||||
+ ", status=" + status
|
||||
+ ", batchCount=" + batchCount
|
||||
+ ", completeBatchCount=" + completeBatchCount
|
||||
+ ", successBatchCount=" + successBatchCount
|
||||
+ ", errorBatchCount=" + getErrorBatchCount()
|
||||
|
||||
Reference in New Issue
Block a user