fix(oppo): remap audit_status=5 to UNDER_REVIEW; restore REJECTED→UNDER_REVIEW in poll
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 <noreply@anthropic.com>
这个提交包含在:
父节点
4d2faa33de
当前提交
4432c7dc28
@ -554,15 +554,19 @@ public class StoreSubmissionService {
|
|||||||
String onlineVersionName = appData.path("versionName").asText("");
|
String onlineVersionName = appData.path("versionName").asText("");
|
||||||
int auditInt = appData.path("audit_status").asInt(appData.path("auditStatus").asInt(-1));
|
int auditInt = appData.path("audit_status").asInt(appData.path("auditStatus").asInt(-1));
|
||||||
String submittedCode = String.valueOf(v.getVersionCode());
|
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));
|
boolean isLive = auditInt == 111 || List.of("2", "3", "4").contains(String.valueOf(auditInt));
|
||||||
StoreRemoteState.ReviewState reviewState;
|
StoreRemoteState.ReviewState reviewState;
|
||||||
if (auditInt == 444 || "5".equals(String.valueOf(auditInt))) {
|
if (auditInt == 444) {
|
||||||
reviewState = StoreRemoteState.ReviewState.REJECTED;
|
reviewState = StoreRemoteState.ReviewState.REJECTED;
|
||||||
} else if (isLive) {
|
} else if (isLive) {
|
||||||
reviewState = StoreRemoteState.ReviewState.ONLINE;
|
reviewState = StoreRemoteState.ReviewState.ONLINE;
|
||||||
} else {
|
} else {
|
||||||
reviewState = StoreRemoteState.ReviewState.UNDER_REVIEW;
|
reviewState = StoreRemoteState.ReviewState.UNDER_REVIEW;
|
||||||
}
|
}
|
||||||
|
log.info("OPPO remote state: versionId={} auditInt={} onlineCode={} submittedCode={} reviewState={}",
|
||||||
|
v.getId(), auditInt, onlineVersionCode, submittedCode, reviewState);
|
||||||
return StoreRemoteState.ok(
|
return StoreRemoteState.ok(
|
||||||
AppStoreConfigEntity.StoreType.OPPO,
|
AppStoreConfigEntity.StoreType.OPPO,
|
||||||
reviewState,
|
reviewState,
|
||||||
@ -728,6 +732,14 @@ public class StoreSubmissionService {
|
|||||||
storeService.updateStoreReview(v.getId(), storeType,
|
storeService.updateStoreReview(v.getId(), storeType,
|
||||||
AppVersionEntity.StoreReviewState.UNDER_REVIEW,
|
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
|
// otherwise leave REJECTED as-is
|
||||||
}
|
}
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户