mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-01 02:38:43 +08:00 
			
		
		
		
	promotion:完善砍价 API ~ 提交下,准备出门吃饭!!!!
This commit is contained in:
		| @@ -1,6 +1,8 @@ | ||||
| package cn.iocoder.yudao.module.trade.api.order; | ||||
|  | ||||
| import cn.iocoder.yudao.module.trade.api.order.dto.TradeOrderRespDTO; | ||||
| 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.dal.dataobject.order.TradeOrderDO; | ||||
| import cn.iocoder.yudao.module.trade.service.order.TradeOrderQueryService; | ||||
| import org.springframework.stereotype.Service; | ||||
| @@ -9,6 +11,8 @@ import org.springframework.validation.annotation.Validated; | ||||
| import javax.annotation.Resource; | ||||
|  | ||||
| import java.time.LocalDateTime; | ||||
| import java.util.Collection; | ||||
| import java.util.List; | ||||
|  | ||||
| import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | ||||
| import static cn.iocoder.yudao.module.trade.enums.ErrorCodeConstants.ORDER_NOT_FOUND; | ||||
| @@ -25,6 +29,11 @@ public class TradeOrderApiImpl implements TradeOrderApi { | ||||
|     @Resource | ||||
|     private TradeOrderQueryService tradeOrderQueryService; | ||||
|  | ||||
|     @Override | ||||
|     public List<TradeOrderRespDTO> getOrderList(Collection<Long> ids) { | ||||
|         return TradeOrderConvert.INSTANCE.convertList04(tradeOrderQueryService.getOrderList(ids)); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public Integer getOrderStatus(Long id) { | ||||
|         TradeOrderDO order = tradeOrderQueryService.getOrder(id); | ||||
|   | ||||
| @@ -261,4 +261,6 @@ public interface TradeOrderConvert { | ||||
|         return bo; | ||||
|     } | ||||
|  | ||||
|     List<TradeOrderRespDTO> convertList04(List<TradeOrderDO> list); | ||||
|  | ||||
| } | ||||
|   | ||||
| @@ -40,6 +40,14 @@ public interface TradeOrderQueryService { | ||||
|      */ | ||||
|     TradeOrderDO getOrder(Long userId, Long id); | ||||
|  | ||||
|     /** | ||||
|      * 获得订单列表 | ||||
|      * | ||||
|      * @param ids 订单编号数组 | ||||
|      * @return 订单列表 | ||||
|      */ | ||||
|     List<TradeOrderDO> getOrderList(Collection<Long> ids); | ||||
|  | ||||
|     /** | ||||
|      * 【管理员】获得交易订单分页 | ||||
|      * | ||||
|   | ||||
| @@ -69,6 +69,14 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService { | ||||
|         return order; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public List<TradeOrderDO> getOrderList(Collection<Long> ids) { | ||||
|         if (CollUtil.isEmpty(ids)) { | ||||
|             return Collections.emptyList(); | ||||
|         } | ||||
|         return tradeOrderMapper.selectBatchIds(ids); | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public PageResult<TradeOrderDO> getOrderPage(TradeOrderPageReqVO reqVO) { | ||||
|         // 获得 userId 相关的查询 | ||||
|   | ||||
| @@ -86,7 +86,9 @@ public class TradePriceCalculatorHelper { | ||||
|         if (param.getCombinationActivityId() != null) { | ||||
|             return TradeOrderTypeEnum.COMBINATION.getType(); | ||||
|         } | ||||
|         // TODO 砍价敬请期待 | ||||
|         if (param.getBargainRecordId() != null) { | ||||
|             return TradeOrderTypeEnum.BARGAIN.getType(); | ||||
|         } | ||||
|         return TradeOrderTypeEnum.NORMAL.getType(); | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 YunaiV
					YunaiV