...
|
...
|
@@ -13,6 +13,8 @@ import com.yohoufo.dal.order.model.BuyerOrder; |
|
|
import com.yohoufo.dal.order.model.QiniuLiveRecord;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
...
|
...
|
@@ -27,6 +29,7 @@ import java.util.stream.Collectors; |
|
|
*/
|
|
|
@Service
|
|
|
public class QiniuLiveRecordService {
|
|
|
private final Logger LOG = LoggerFactory.getLogger(QiniuLiveRecordService.class);
|
|
|
|
|
|
public static final String LIVE_VIDEO_DOMAIN = QNliveConstants.LIVE_VIDEO_DOMAIN;
|
|
|
public static final String MP4_FILEKEY_PRE = QNliveConstants.MP4_FILEKEY_PRE; // mp4文件路径
|
...
|
...
|
@@ -97,12 +100,16 @@ public class QiniuLiveRecordService { |
|
|
return resps;
|
|
|
}
|
|
|
|
|
|
LOG.info("method queryOrderVideos in orderCodeList is {}, productId is {}", orderCodeList, productId);
|
|
|
|
|
|
Map<Long, QiniuLiveRecord> recordMap = qiNiuLiveRecords.stream().collect(Collectors.toMap(QiniuLiveRecord::getOrderCode, item -> item));
|
|
|
|
|
|
|
|
|
List<BuyerOrder> buyerOrders = buyerOrderMapper.selectByOrderCodes(orderCodeList, Lists.newArrayList(OrderStatus.WAITING_RECEIVE.getCode(),
|
|
|
OrderStatus.DONE.getCode()));
|
|
|
|
|
|
LOG.info("method selectByOrderCodes in buyerOrders size is {}, productId is {}", buyerOrders.size(), productId);
|
|
|
|
|
|
buyerOrders.stream().forEach(item -> {
|
|
|
OrderVideoResp orderVideoResp = new OrderVideoResp();
|
|
|
QiniuLiveRecord qiniuLiveRecord = recordMap.get(item.getOrderCode());
|
...
|
...
|
|