修复:启动保存-循环依赖

This commit is contained in:
puhui999 2023-10-09 16:11:02 +08:00
parent 53e67c0437
commit e09f07475a
3 changed files with 20 additions and 8 deletions

View File

@ -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 = "用于小程序首页")

View File

@ -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<TradeOrderRespDTO> getOrderList(Collection<Long> ids) {

View File

@ -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