From 4432c7dc28eb83eb2fd5bfb4295963bff643f013 Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Wed, 20 May 2026 10:59:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(oppo):=20remap=20audit=5Fstatus=3D5=20to=20?= =?UTF-8?q?UNDER=5FREVIEW;=20restore=20REJECTED=E2=86=92UNDER=5FREVIEW=20i?= =?UTF-8?q?n=20poll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OPPO returns audit_status=5 for versions currently under review (审核中); previously this was mapped to REJECTED causing a state mismatch. Only 444 is now treated as the rejected aggregate code. Also extend the scheduled poll to restore REJECTED→UNDER_REVIEW for any store (not just Xiaomi) when the vendor API reports the version is under review, covering cases where the submission succeeded after our platform recorded an exception. Co-Authored-By: Claude Sonnet 4.6 --- .../update/service/StoreSubmissionService.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/update-service/src/main/java/com/xuqm/update/service/StoreSubmissionService.java b/update-service/src/main/java/com/xuqm/update/service/StoreSubmissionService.java index cd146c3..3eacc15 100644 --- a/update-service/src/main/java/com/xuqm/update/service/StoreSubmissionService.java +++ b/update-service/src/main/java/com/xuqm/update/service/StoreSubmissionService.java @@ -554,15 +554,19 @@ public class StoreSubmissionService { String onlineVersionName = appData.path("versionName").asText(""); int auditInt = appData.path("audit_status").asInt(appData.path("auditStatus").asInt(-1)); String submittedCode = String.valueOf(v.getVersionCode()); + // OPPO audit_status: 2/3/4/111 = online variants, 444 = rejected aggregate. + // 5 is NOT rejected — it maps to "审核中" (under review) per observed API behavior. boolean isLive = auditInt == 111 || List.of("2", "3", "4").contains(String.valueOf(auditInt)); StoreRemoteState.ReviewState reviewState; - if (auditInt == 444 || "5".equals(String.valueOf(auditInt))) { + if (auditInt == 444) { reviewState = StoreRemoteState.ReviewState.REJECTED; } else if (isLive) { reviewState = StoreRemoteState.ReviewState.ONLINE; } else { reviewState = StoreRemoteState.ReviewState.UNDER_REVIEW; } + log.info("OPPO remote state: versionId={} auditInt={} onlineCode={} submittedCode={} reviewState={}", + v.getId(), auditInt, onlineVersionCode, submittedCode, reviewState); return StoreRemoteState.ok( AppStoreConfigEntity.StoreType.OPPO, reviewState, @@ -728,6 +732,14 @@ public class StoreSubmissionService { storeService.updateStoreReview(v.getId(), storeType, AppVersionEntity.StoreReviewState.UNDER_REVIEW, "小米应用商店当前提交版本审核中"); + } else if (polled.getReviewState() == StoreRemoteState.ReviewState.UNDER_REVIEW) { + // Submission may have succeeded after our platform recorded an exception. + // Remote shows under review — restore from REJECTED. + log.info("Store review poll: {}/{} was REJECTED but remote shows UNDER_REVIEW — restoring", + v.getId(), storeType); + storeService.updateStoreReview(v.getId(), storeType, + AppVersionEntity.StoreReviewState.UNDER_REVIEW, + "厂商审核状态轮询检测:商店显示审核中"); } // otherwise leave REJECTED as-is }