...
|
...
|
@@ -226,12 +226,19 @@ public class UfoLiveService { |
|
|
}
|
|
|
|
|
|
public Integer queryCurrentTime(Long orderCode, String phoneUid) throws PlatformException {
|
|
|
if (StringUtils.isNotEmpty(phoneUid) && null == phoneUidCameraService.selectByphoneUid(phoneUid)) { // 如果启动手机唯一标识来关联摄像头,则走此流程
|
|
|
throw new PlatformException("没有选择摄像头", 400);
|
|
|
if (StringUtils.isNotEmpty(phoneUid)) { // 如果启动手机唯一标识来关联摄像头,则走此流程
|
|
|
if (null == phoneUidCameraService.selectByphoneUid(phoneUid)) {
|
|
|
throw new PlatformException("没有选择摄像头", 400);
|
|
|
} else {
|
|
|
int currentTimeSeconds = DateUtil.getCurrentTimeSeconds();
|
|
|
if (!Objects.isNull(orderCode)) {
|
|
|
liveRecordTimeMapper.insertOrUpdate(new LiveRecordTime(orderCode, currentTimeSeconds));
|
|
|
}
|
|
|
return currentTimeSeconds;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
Integer userId = new UserHelper().getUserId();
|
|
|
|
|
|
RedisKeyBuilder key = RedisKeyBuilder.newInstance().appendFixed(RedisKeyConstants.LIVE_USER).appendVar(userId);
|
|
|
if (redisTemplate.hasKey(key)) {
|
|
|
int currentTimeSeconds = DateUtil.getCurrentTimeSeconds();
|
...
|
...
|
|