|
@@ -13,6 +13,8 @@ import com.yohoufo.dal.order.model.BuyerOrder; |
|
@@ -13,6 +13,8 @@ import com.yohoufo.dal.order.model.BuyerOrder; |
13
|
import com.yohoufo.dal.order.model.QiniuLiveRecord;
|
13
|
import com.yohoufo.dal.order.model.QiniuLiveRecord;
|
14
|
import org.apache.commons.collections.CollectionUtils;
|
14
|
import org.apache.commons.collections.CollectionUtils;
|
15
|
import org.apache.commons.lang3.StringUtils;
|
15
|
import org.apache.commons.lang3.StringUtils;
|
|
|
16
|
+import org.slf4j.Logger;
|
|
|
17
|
+import org.slf4j.LoggerFactory;
|
16
|
import org.springframework.beans.factory.annotation.Autowired;
|
18
|
import org.springframework.beans.factory.annotation.Autowired;
|
17
|
import org.springframework.stereotype.Service;
|
19
|
import org.springframework.stereotype.Service;
|
18
|
|
20
|
|
|
@@ -27,6 +29,7 @@ import java.util.stream.Collectors; |
|
@@ -27,6 +29,7 @@ import java.util.stream.Collectors; |
27
|
*/
|
29
|
*/
|
28
|
@Service
|
30
|
@Service
|
29
|
public class QiniuLiveRecordService {
|
31
|
public class QiniuLiveRecordService {
|
|
|
32
|
+ private final Logger LOG = LoggerFactory.getLogger(QiniuLiveRecordService.class);
|
30
|
|
33
|
|
31
|
public static final String LIVE_VIDEO_DOMAIN = QNliveConstants.LIVE_VIDEO_DOMAIN;
|
34
|
public static final String LIVE_VIDEO_DOMAIN = QNliveConstants.LIVE_VIDEO_DOMAIN;
|
32
|
public static final String MP4_FILEKEY_PRE = QNliveConstants.MP4_FILEKEY_PRE; // mp4文件路径
|
35
|
public static final String MP4_FILEKEY_PRE = QNliveConstants.MP4_FILEKEY_PRE; // mp4文件路径
|
|
@@ -97,12 +100,16 @@ public class QiniuLiveRecordService { |
|
@@ -97,12 +100,16 @@ public class QiniuLiveRecordService { |
97
|
return resps;
|
100
|
return resps;
|
98
|
}
|
101
|
}
|
99
|
|
102
|
|
|
|
103
|
+ LOG.info("method queryOrderVideos in orderCodeList is {}, productId is {}", orderCodeList, productId);
|
|
|
104
|
+
|
100
|
Map<Long, QiniuLiveRecord> recordMap = qiNiuLiveRecords.stream().collect(Collectors.toMap(QiniuLiveRecord::getOrderCode, item -> item));
|
105
|
Map<Long, QiniuLiveRecord> recordMap = qiNiuLiveRecords.stream().collect(Collectors.toMap(QiniuLiveRecord::getOrderCode, item -> item));
|
101
|
|
106
|
|
102
|
|
107
|
|
103
|
List<BuyerOrder> buyerOrders = buyerOrderMapper.selectByOrderCodes(orderCodeList, Lists.newArrayList(OrderStatus.WAITING_RECEIVE.getCode(),
|
108
|
List<BuyerOrder> buyerOrders = buyerOrderMapper.selectByOrderCodes(orderCodeList, Lists.newArrayList(OrderStatus.WAITING_RECEIVE.getCode(),
|
104
|
OrderStatus.DONE.getCode()));
|
109
|
OrderStatus.DONE.getCode()));
|
105
|
|
110
|
|
|
|
111
|
+ LOG.info("method selectByOrderCodes in buyerOrders size is {}, productId is {}", buyerOrders.size(), productId);
|
|
|
112
|
+
|
106
|
buyerOrders.stream().forEach(item -> {
|
113
|
buyerOrders.stream().forEach(item -> {
|
107
|
OrderVideoResp orderVideoResp = new OrderVideoResp();
|
114
|
OrderVideoResp orderVideoResp = new OrderVideoResp();
|
108
|
QiniuLiveRecord qiniuLiveRecord = recordMap.get(item.getOrderCode());
|
115
|
QiniuLiveRecord qiniuLiveRecord = recordMap.get(item.getOrderCode());
|