From 84146bee17fe882e71800235f4c8c5476fcb60cd Mon Sep 17 00:00:00 2001 From: duzhichao <1098974448@qq.com> Date: Wed, 24 Jun 2026 20:25:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=94=AF=E4=BB=98=E5=AE=9D=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E6=8C=89=E7=A7=9F=E6=88=B7=E6=9F=A5=E8=AF=A2=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../central/order/constants/PayTypeConstants.java | 12 +++++++++++- .../service/impl/AlipayConfigServiceImpl.java | 14 ++++++++++++++ .../pages/orders/Order/components/buildColumns.tsx | 11 +++++++++-- .../src/pages/orders/Order/components/constants.ts | 1 + 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/zlt-business/order-center/src/main/java/com/central/order/constants/PayTypeConstants.java b/zlt-business/order-center/src/main/java/com/central/order/constants/PayTypeConstants.java index e2ad1f9c..27a8befb 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/constants/PayTypeConstants.java +++ b/zlt-business/order-center/src/main/java/com/central/order/constants/PayTypeConstants.java @@ -17,7 +17,17 @@ public class PayTypeConstants { * 优惠券支付 */ public static final Integer COUPON_PAY = 2; - + + /** + * 第三方聚到核销 + */ + public static final Integer FEIPAI_VERIFY = 3; + + /** + * 支付宝支付 + */ + public static final Integer ALIPAY_PAY = 4; + private PayTypeConstants() { // 私有构造函数,防止实例化 } diff --git a/zlt-business/order-center/src/main/java/com/central/order/service/impl/AlipayConfigServiceImpl.java b/zlt-business/order-center/src/main/java/com/central/order/service/impl/AlipayConfigServiceImpl.java index 7ecb4987..13c44d2b 100644 --- a/zlt-business/order-center/src/main/java/com/central/order/service/impl/AlipayConfigServiceImpl.java +++ b/zlt-business/order-center/src/main/java/com/central/order/service/impl/AlipayConfigServiceImpl.java @@ -39,6 +39,20 @@ public class AlipayConfigServiceImpl @Override public AlipayConfig getConfigByTypeAndTenantId(String type, String tenantId) { + // 1. 先按当前租户查询 + AlipayConfig config = queryByTypeAndTenantId(type, tenantId); + if (config != null) { + return config; + } + // 2. 查不到时降级到 webApp 默认配置 + if (!"webApp".equals(tenantId)) { + log.info("当前租户[{}]未配置支付宝[{}],降级使用 webApp 默认配置", tenantId, type); + config = queryByTypeAndTenantId(type, "webApp"); + } + return config; + } + + private AlipayConfig queryByTypeAndTenantId(String type, String tenantId) { LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); wrapper.eq(AlipayConfig::getType, type) .eq(AlipayConfig::getTenantId, tenantId) diff --git a/zlt-web/react-web-next/src/pages/orders/Order/components/buildColumns.tsx b/zlt-web/react-web-next/src/pages/orders/Order/components/buildColumns.tsx index 47ea59f7..15d59935 100644 --- a/zlt-web/react-web-next/src/pages/orders/Order/components/buildColumns.tsx +++ b/zlt-web/react-web-next/src/pages/orders/Order/components/buildColumns.tsx @@ -25,6 +25,7 @@ const PAY_TYPE = { WECHAT: 1, // 微信支付 COUPON: 2, // 优惠券支付 THIRD_PARTY: 3, // 第三方支付 + ALIPAY: 4, // 支付宝支付 }; // 资源列表操作组件 @@ -43,8 +44,10 @@ const ResourcesActionCell: React.FC<{ record: OrderItem; onReload?: () => void; const isThirdPartyPay = record.payType === PAY_TYPE.THIRD_PARTY; // 判断是否为优惠券支付(携程不支持退款接口) const isCouponPay = record.payType === PAY_TYPE.COUPON; - // 是否可以创建退款(任务完成 且 非第三方支付 且 非优惠券支付) - const canCreateRefund = isTaskComplete && !isThirdPartyPay && !isCouponPay; + // 判断是否为支付宝支付(暂不支持退款) + const isAlipayPay = record.payType === PAY_TYPE.ALIPAY; + // 是否可以创建退款(任务完成 且 非第三方支付 且 非优惠券支付 且 非支付宝支付) + const canCreateRefund = isTaskComplete && !isThirdPartyPay && !isCouponPay && !isAlipayPay; return ( <> @@ -60,6 +63,10 @@ const ResourcesActionCell: React.FC<{ record: OrderItem; onReload?: () => void; 创建退款 + ) : isAlipayPay ? ( + + 创建退款 + ) : ( setCreateRefundModalVisible(true)}>创建退款 ) diff --git a/zlt-web/react-web-next/src/pages/orders/Order/components/constants.ts b/zlt-web/react-web-next/src/pages/orders/Order/components/constants.ts index 9dde1867..47f6f3fb 100644 --- a/zlt-web/react-web-next/src/pages/orders/Order/components/constants.ts +++ b/zlt-web/react-web-next/src/pages/orders/Order/components/constants.ts @@ -5,6 +5,7 @@ export const PAY_TYPE_OPTIONS: { label: string; value: number; color?: string }[ { label: '微信支付', value: 1, color: 'green' }, { label: '优惠券支付', value: 2, color: 'blue' }, { label: '第三方支付', value: 3, color: 'purple' }, + { label: '支付宝支付', value: 4, color: 'geekblue' }, ]; export const ORDER_STATUS_OPTIONS: { label: string; value: number; color?: string }[] = [