Authored by qinchao

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

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