|
|
@@ -783,21 +783,23 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
Map<String, Integer> liveFlagWithCache = liveWatchUserService.getLiveFlagWithCache(order.getLiveId());
|
|
|
if (liveFlagWithCache != null && liveFlagWithCache.containsKey("liveFlag") && 1 == liveFlagWithCache.get("liveFlag")) {
|
|
|
try {
|
|
|
- LiveWatchLog queryLog = new LiveWatchLog();
|
|
|
- queryLog.setLiveId(order.getLiveId());
|
|
|
- queryLog.setUserId(Long.valueOf(order.getUserId()));
|
|
|
- queryLog.setCompanyId(order.getCompanyId());
|
|
|
- queryLog.setCompanyUserId(order.getCompanyUserId());
|
|
|
-
|
|
|
- List<LiveWatchLog> logs = liveWatchLogService.selectLiveWatchLogList(queryLog);
|
|
|
- if (logs != null && !logs.isEmpty()) {
|
|
|
- for (LiveWatchLog log : logs) {
|
|
|
- if (log.getLogType() == null || log.getLogType() != 2) {
|
|
|
- log.setLiveBuy(1);
|
|
|
- liveWatchLogService.updateLiveWatchLog(log);
|
|
|
+ LiveUserFirstEntry liveUserFirstEntry = liveUserFirstEntryService.selectEntityByLiveIdUserId(order.getLiveId(), Long.parseLong(order.getUserId()));
|
|
|
+ if (liveUserFirstEntry != null && liveUserFirstEntry.getExternalContactId()!=null && liveUserFirstEntry.getExternalContactId() > 0 && liveUserFirstEntry.getQwUserId()!=null && liveUserFirstEntry.getQwUserId() > 0) {
|
|
|
+ LiveWatchLog queryLog = new LiveWatchLog();
|
|
|
+ queryLog.setLiveId(order.getLiveId());
|
|
|
+ queryLog.setQwUserId(String.valueOf(liveUserFirstEntry.getQwUserId()));
|
|
|
+ queryLog.setExternalContactId(liveUserFirstEntry.getExternalContactId());
|
|
|
+ List<LiveWatchLog> logs = liveWatchLogService.selectLiveWatchLogList(queryLog);
|
|
|
+ if (logs != null && !logs.isEmpty()) {
|
|
|
+ for (LiveWatchLog log : logs) {
|
|
|
+ if (log.getLogType() == null || log.getLogType() != 2) {
|
|
|
+ log.setLiveBuy(1);
|
|
|
+ liveWatchLogService.updateLiveWatchLog(log);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
log.error("更新 updateLiveWatchLog LiveWatchLog logType 异常(连接时):liveId={}, userId={}, error={}",
|
|
|
order.getLiveId(), order.getUserId(), e.getMessage(), e);
|