Authored by qinchao

物流查看兼容:多订单一个物流号

@@ -11,7 +11,7 @@ import com.yoho.order.model.ExpressInfo; @@ -11,7 +11,7 @@ import com.yoho.order.model.ExpressInfo;
11 */ 11 */
12 public interface ExpressInfoMapper { 12 public interface ExpressInfoMapper {
13 13
14 - //List<ExpressInfo> selectByOrderCodeAndType(@Param("orderCode") String orderCode, @Param("expressTypeList") List<Integer> expressTypeList); 14 + List<ExpressInfo> selectByOrderCodeAndType(@Param("orderCode") String orderCode, @Param("expressTypeList") List<Integer> expressTypeList);
15 15
16 List<ExpressInfo> selectExpressInfoListByWaybillCodeAndLogisticsType(@Param("waybillCode") String waybillCode, @Param("logisticsType") Integer logisticsType); 16 List<ExpressInfo> selectExpressInfoListByWaybillCodeAndLogisticsType(@Param("waybillCode") String waybillCode, @Param("logisticsType") Integer logisticsType);
17 } 17 }
@@ -591,6 +591,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -591,6 +591,12 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
591 591
592 private List<ExpressInfo> getExpressInfoListByStage(String orderCode, String expressType){ 592 private List<ExpressInfo> getExpressInfoListByStage(String orderCode, String expressType){
593 LOGGER.info("getExpressInfoListByStage orderCode is {}, expressTypeStr is {}", orderCode, expressType); 593 LOGGER.info("getExpressInfoListByStage orderCode is {}, expressTypeStr is {}", orderCode, expressType);
  594 + //原来的情况,根据订单号直接查询物流,如果存在物流信息,则直接返回,否则有可能是多单一号
  595 + List<ExpressInfo> list = expressInfoMapper.selectByOrderCodeAndType(orderCode, convertExpressType(expressType));
  596 + if(CollectionUtils.isNotEmpty(list)) {
  597 + return list;
  598 + }
  599 +
594 List<String> orderCodeList = Lists.newArrayList(); 600 List<String> orderCodeList = Lists.newArrayList();
595 orderCodeList.add(orderCode); 601 orderCodeList.add(orderCode);
596 List<ExpressRecord> records = expressRecordMapper.selectByOrderCodeListAndType(orderCodeList,convertExpressType(expressType)); 602 List<ExpressRecord> records = expressRecordMapper.selectByOrderCodeListAndType(orderCodeList,convertExpressType(expressType));