Merge remote-tracking branch 'origin/test' into dev

# Conflicts:
#	scripts/admin-test-env-modules/phase4-overseas-pda.mjs
This commit is contained in:
2026-09-02 16:04:08 +08:00
4 changed files with 30 additions and 20 deletions
@@ -115,7 +115,9 @@ public class OrderRepository {
.eq(OutboxEventEntity::getPublishStatus, "PENDING")
.and(v -> v.isNull(OutboxEventEntity::getNextRetryAt)
.or().le(OutboxEventEntity::getNextRetryAt, LocalDateTime.now()))
.orderByAsc(OutboxEventEntity::getCreatedAt)
// Approval and its first declaration update can share the same DB timestamp.
// Keep the insertion order deterministic so the inbound exists before its update is delivered.
.orderByAsc(OutboxEventEntity::getCreatedAt, OutboxEventEntity::getId)
.last("LIMIT " + Math.min(Math.max(limit, 1), 100)));
}
public void markOutboxPublished(long tenantId, long id, LocalDateTime publishedAt) {