From 3e64a254550804933633fd88182f20d43dd2e718 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Thu, 25 Sep 2025 21:51:55 +0800
Subject: [PATCH] 订单-汇旺财多账户支付配置
---
oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java
index 5137765..972bccd 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderServiceImpl.java
@@ -6,6 +6,7 @@
import com.oying.modules.hwc.service.SwiftPassService;
import com.oying.modules.pc.product.domain.Product;
import com.oying.modules.pc.product.domain.enums.ProductStatusEnum;
+import com.oying.modules.pc.product.service.ProductInventoryService;
import com.oying.modules.pc.product.service.ProductService;
import com.oying.modules.pc.store.domain.Store;
import com.oying.modules.pc.store.domain.enums.StoreStatusEnum;
@@ -54,6 +55,7 @@
private final RedisUtils redisUtils;
private final StoreService storeService;
private final OrderOperationLogService operationLogService;
+ private final ProductInventoryService productInventoryService;
private static final String DESCRIBE = "哦应:";
private static final String ORDER_KEY = "oying:order";
private static final String ORDER_STORE_KEY = "oying:order:store";
@@ -78,6 +80,7 @@
switch (submit.getPayType()) {
case HWC:
case HWC2:
+ case HWC3:
break;
default:
throw new BadRequestException("支付类型暂未开放");
@@ -100,6 +103,7 @@
List<OrderProductSnapshot> snapshots = new ArrayList<>();
for (ProductInfo productInfo : info.getProducts()) {
Product product = productInfo.getProduct();
+ productInventoryService.decreaseStock(product.getProductId(), productInfo.getCount());
OrderProductSnapshot snapshot = new OrderProductSnapshot();
snapshot.setOrderNum(orderNum);
snapshot.setStoreId(submit.getStoreId());
@@ -136,6 +140,7 @@
order.setOrderTime(submit.getDateTime());
order.setSendPrice(store.getDeliveryFee());
order.setSendType(SendTypeEnum.LY.getKey());
+ order.setPackagingPrice(info.getPackagingPrice());
order.setUserId(SecurityUtils.getCurrentUserId());
order.setUsername(SecurityUtils.getCurrentUsername());
order.setStoreId(submit.getStoreId());
@@ -308,6 +313,7 @@
switch (anEnum) {
case HWC:
case HWC2:
+ case HWC3:
JSONObject object = swiftPassService.query(orderNum, anEnum);
if (!object.getString("trade_state").equals(PayStateEnum.NOTPAY.getKey())) {
throw new BadRequestException(PayStateEnum.getValue(order.getPayState()));
--
Gitblit v1.9.3