fix(private): 私有化模式下存量 PENDING 服务申请自动开通
之前的自动开通逻辑在重复申请检查之后,导致已有 PENDING 记录时 直接抛 400 而不进入自动开通流程。 现在私有化模式下检测到 PENDING 记录时直接 approveRequest, 不再返回"请等待运营人员处理"错误。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
这个提交包含在:
父节点
f9957143da
当前提交
6ca0dcbe74
@ -86,12 +86,14 @@ public class FeatureServiceManager {
|
|||||||
String applyReason) {
|
String applyReason) {
|
||||||
|
|
||||||
if (isAppWideService(serviceType)) {
|
if (isAppWideService(serviceType)) {
|
||||||
requestRepository.findFirstByAppKeyAndServiceTypeOrderByCreatedAtDesc(appKey, serviceType)
|
var existing = requestRepository.findFirstByAppKeyAndServiceTypeOrderByCreatedAtDesc(appKey, serviceType);
|
||||||
.ifPresent(req -> {
|
if (existing.isPresent() && existing.get().getStatus() == Status.PENDING) {
|
||||||
if (req.getStatus() == Status.PENDING) {
|
if (deploymentProperties.isPrivate()) {
|
||||||
|
// 私有化模式:存量 PENDING 请求直接自动开通
|
||||||
|
return approveRequest(existing.get().getId(), "私有化部署自动开通");
|
||||||
|
}
|
||||||
throw new BusinessException(400, "已有待审核的开通申请,请等待运营人员处理");
|
throw new BusinessException(400, "已有待审核的开通申请,请等待运营人员处理");
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ServiceActivationRequestEntity req = new ServiceActivationRequestEntity();
|
ServiceActivationRequestEntity req = new ServiceActivationRequestEntity();
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户