|
|
@@ -8,6 +8,7 @@ import com.qtzl.alterSales.manager.model.protocol.sales.ChoiceBillsCloseRequest; |
|
|
|
import com.qtzl.alterSales.manager.service.AfterSalesCmd; |
|
|
|
import com.qtzl.alterSales.manager.service.ChoiceBillsOperationService; |
|
|
|
import com.txffp.api.core.manager.comm.annotation.ApiHandler; |
|
|
|
import com.wechat.pay.java.core.exception.ServiceException; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
@@ -40,6 +41,13 @@ public class ChoiceBillsCloseHandler extends AbstractAfterSalesManager<ChoiceBil |
|
|
|
if (e instanceof ServiceHandleException) { |
|
|
|
throw e; |
|
|
|
} |
|
|
|
if (e instanceof ServiceException) { |
|
|
|
if ("ORDERPAID".equals(((ServiceException) e).getErrorCode())){ |
|
|
|
// 订单已支付。注:用户支付成功后直接关闭页面的场景,避免重复支付 |
|
|
|
choiceBillsOperationService.choiceBillsPayQuery(request.getId()); |
|
|
|
return new NoAttributeResponse().toJson(); |
|
|
|
} |
|
|
|
} |
|
|
|
logger.error("选装-用户选择账单-关闭订单:{}", e.getMessage()); |
|
|
|
throw UcServiceError.BUSINESS_VALIDATE_ERR.toHandleException("订单关闭失败"); |
|
|
|
} |