🐛修复创建订单的流程,使用到 API Bean 未声明的报错
This commit is contained in:
parent
38e88b02f5
commit
67d365475c
@ -0,0 +1,24 @@
|
||||
package cn.iocoder.yudao.module.market.service.price;
|
||||
|
||||
import cn.iocoder.yudao.module.market.api.price.PriceApi;
|
||||
import cn.iocoder.yudao.module.market.api.price.dto.PriceCalculateReqDTO;
|
||||
import cn.iocoder.yudao.module.market.api.price.dto.PriceCalculateRespDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 价格 API 实现类
|
||||
*
|
||||
* TODO 完善注释
|
||||
*
|
||||
* @author TODO
|
||||
*/
|
||||
@Service
|
||||
public class PriceApiImpl implements PriceApi {
|
||||
|
||||
@Override
|
||||
public PriceCalculateRespDTO calculatePrice(PriceCalculateReqDTO calculateReqDTO) {
|
||||
// TODO fixme:实现逻辑
|
||||
return new PriceCalculateRespDTO();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1 @@
|
||||
package cn.iocoder.yudao.module.product.api;
|
@ -0,0 +1,26 @@
|
||||
package cn.iocoder.yudao.module.product.api.sku;
|
||||
|
||||
import cn.iocoder.yudao.module.product.api.sku.dto.SkuDecrementStockBatchReqDTO;
|
||||
import cn.iocoder.yudao.module.product.api.sku.dto.SkuInfoRespDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* todo 注释
|
||||
*/
|
||||
@Service
|
||||
public class ProductSkuApiImpl implements ProductSkuApi {
|
||||
|
||||
@Override
|
||||
public List<SkuInfoRespDTO> getSkusByIds(Collection<Long> skuIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decrementStockBatch(SkuDecrementStockBatchReqDTO batchReqDTO) {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.product.api.spu;
|
||||
|
||||
import cn.iocoder.yudao.module.product.api.spu.dto.SpuInfoRespDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* todo 注释
|
||||
*/
|
||||
@Service
|
||||
public class ProductSpuApiImpl implements ProductSpuApi {
|
||||
|
||||
@Override
|
||||
public List<SpuInfoRespDTO> getSpusByIds(Collection<Long> spuIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -17,7 +17,7 @@ public class AppTradeOrderCreateReqVO {
|
||||
private Integer addressId;
|
||||
|
||||
@ApiModelProperty(name = "优惠劵编号", example = "1024")
|
||||
private Integer couponId;
|
||||
private Long couponId;
|
||||
|
||||
@ApiModelProperty(name = "备注", example = "1024")
|
||||
private String remark;
|
||||
|
@ -4,6 +4,7 @@ import cn.iocoder.yudao.module.market.api.price.dto.PriceCalculateRespDTO;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderCreateReqVO;
|
||||
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
@ -15,6 +16,6 @@ public interface TradeOrderConvert {
|
||||
|
||||
TradeOrderConvert INSTANCE = Mappers.getMapper(TradeOrderConvert.class);
|
||||
|
||||
|
||||
@Mapping(source = "order.couponId", target = "couponId")
|
||||
TradeOrderDO convert(AppTradeOrderCreateReqVO createReqVO, PriceCalculateRespDTO.Order order);
|
||||
}
|
||||
|
@ -29,5 +29,8 @@ public interface TradeOrderItemConvert {
|
||||
@Mapping(source = "tradeOrder.userId", target = "userId"),
|
||||
@Mapping(source = "tradeOrder.orderId", target = "orderId")
|
||||
})
|
||||
List<TradeOrderItemDO> convertList(TradeOrderDO tradeOrder, List<PriceCalculateRespDTO.Item> items);
|
||||
default List<TradeOrderItemDO> convertList(TradeOrderDO tradeOrder, List<PriceCalculateRespDTO.Item> items) {
|
||||
// TODO @Com: Mapstruct 生成会报错
|
||||
throw new UnsupportedOperationException("无法实现");
|
||||
}
|
||||
}
|
||||
|
@ -2,10 +2,12 @@ package cn.iocoder.yudao.module.trade.dal.mysql.order;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author LeeYan9
|
||||
* @since 2022-08-26
|
||||
*/
|
||||
@Mapper
|
||||
public interface TradeOrderMapper extends BaseMapperX<TradeOrderDO> {
|
||||
}
|
||||
|
@ -2,10 +2,12 @@ package cn.iocoder.yudao.module.trade.dal.mysql.orderitem;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.trade.dal.dataobject.order.TradeOrderItemDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author LeeYan9
|
||||
* @since 2022-08-26
|
||||
*/
|
||||
@Mapper
|
||||
public interface TradeOrderItemMapper extends BaseMapperX<TradeOrderItemDO> {
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.pay.api;
|
||||
|
||||
import cn.iocoder.yudao.module.pay.api.order.PayOrderApi;
|
||||
import cn.iocoder.yudao.module.pay.api.order.PayOrderDataCreateReqDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* TODO 注释
|
||||
*/
|
||||
@Service
|
||||
public class PayOrderApiImpl implements PayOrderApi {
|
||||
|
||||
@Override
|
||||
public Long createPayOrder(PayOrderDataCreateReqDTO reqDTO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user