fix: 金蝶附件同步失败转成功时显式置空失败原因,修复updateById忽略null字段导致历史失败原因残留
This commit is contained in:
+4
-1
@@ -179,7 +179,10 @@ public class KingdeeAttachmentSyncSupport {
|
|||||||
if (record.getId() == null) {
|
if (record.getId() == null) {
|
||||||
attachmentSyncMapper.insert(record);
|
attachmentSyncMapper.insert(record);
|
||||||
} else {
|
} else {
|
||||||
attachmentSyncMapper.updateById(record);
|
// updateById 默认忽略 null 字段,失败转成功时 fail_reason 须显式置空,避免残留历史失败原因
|
||||||
|
attachmentSyncMapper.update(record, Wrappers.<KingdeeAttachmentSync>lambdaUpdate()
|
||||||
|
.eq(KingdeeAttachmentSync::getId, record.getId())
|
||||||
|
.set(KingdeeAttachmentSync::getFailReason, record.getFailReason()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int total = success + failReasons.size();
|
int total = success + failReasons.size();
|
||||||
|
|||||||
Reference in New Issue
Block a user