From e09f07475a9d02590bd51ae57229c7f17d624fb9 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 9 Oct 2023 16:11:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E4=BF=9D=E5=AD=98-=E5=BE=AA=E7=8E=AF=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/bargain/AppBargainRecordController.java | 14 ++++++++++---- .../module/trade/api/order/TradeOrderApiImpl.java | 6 ++++-- .../order/handler/TradeCombinationHandler.java | 8 ++++++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/bargain/AppBargainRecordController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/bargain/AppBargainRecordController.java index d37163356..e09e9fdb8 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/bargain/AppBargainRecordController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/bargain/AppBargainRecordController.java @@ -27,6 +27,7 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.context.annotation.Lazy; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -46,18 +47,23 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti public class AppBargainRecordController { @Resource + private BargainHelpService bargainHelpService; + @Resource + @Lazy private BargainRecordService bargainRecordService; @Resource + @Lazy private BargainActivityService bargainActivityService; - @Resource - private BargainHelpService bargainHelpService; + @Resource + private TradeOrderApi tradeOrderApi; + @Resource + @Lazy private MemberUserApi memberUserApi; @Resource + @Lazy private ProductSpuApi productSpuApi; - @Resource - private TradeOrderApi tradeOrderApi; @GetMapping("/get-summary") @Operation(summary = "获得砍价记录的概要信息", description = "用于小程序首页") diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApiImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApiImpl.java index 1013ae71f..e872b5507 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApiImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/api/order/TradeOrderApiImpl.java @@ -5,6 +5,7 @@ import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderSummaryRespDTO; import cn.iocoder.yudao.module.trade.convert.order.TradeOrderConvert; import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService; import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -22,10 +23,11 @@ import java.util.List; @Validated public class TradeOrderApiImpl implements TradeOrderApi { - @Resource - private TradeOrderQueryService tradeOrderQueryService; @Resource private TradeOrderUpdateService tradeOrderUpdateService; + @Resource + @Lazy + private TradeOrderQueryService tradeOrderQueryService; @Override public List getOrderList(Collection ids) { diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeCombinationHandler.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeCombinationHandler.java index 5ed8f0977..c83615bda 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeCombinationHandler.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeCombinationHandler.java @@ -10,6 +10,7 @@ import cn.iocoder.yudao.module.trade.enums.order.TradeOrderStatusEnum; import cn.iocoder.yudao.module.trade.enums.order.TradeOrderTypeEnum; import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService; import cn.iocoder.yudao.module.trade.service.order.TradeOrderUpdateService; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import javax.annotation.Resource; @@ -27,11 +28,14 @@ import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.ORDER_CREAT public class TradeCombinationHandler implements TradeOrderHandler { @Resource - private TradeOrderQueryService orderQueryService; - @Resource + @Lazy private TradeOrderUpdateService orderUpdateService; + @Resource + @Lazy + private TradeOrderQueryService orderQueryService; @Resource + @Lazy private CombinationRecordApi combinationRecordApi; @Override