|
|
@@ -14,9 +14,11 @@ import com.tuoheng.miniprogram.entity.LiveChannel; |
|
|
|
import com.tuoheng.miniprogram.enums.InspectionStatusEnum; |
|
|
|
import com.tuoheng.miniprogram.enums.MarkEnum; |
|
|
|
import com.tuoheng.miniprogram.enums.code.inspection.QueryVideoServiceEnum; |
|
|
|
import com.tuoheng.miniprogram.utils.CurrentUserUtil; |
|
|
|
import com.tuoheng.miniprogram.vo.InspectionVideoVo; |
|
|
|
import com.tuoheng.miniprogram.vo.LiveChannelVo; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
@@ -42,6 +44,13 @@ public class QueryVideoService { |
|
|
|
if (StringUtils.isEmpty(id)) { |
|
|
|
return JsonResult.error(QueryVideoServiceEnum.INSPECTION_ID_IS_NULL.getCode(), QueryVideoServiceEnum.INSPECTION_ID_IS_NULL.getMsg()); |
|
|
|
} |
|
|
|
|
|
|
|
//获取租户id |
|
|
|
String tenantId = CurrentUserUtil.getTenantId(); |
|
|
|
if (StringUtils.isEmpty(tenantId)) { |
|
|
|
return JsonResult.error("租户id为空"); |
|
|
|
} |
|
|
|
|
|
|
|
//根据id查询对应的任务 |
|
|
|
Inspection inspection = inspectionMapper.selectById(id); |
|
|
|
if (ObjectUtil.isNull(inspection)) { |
|
|
@@ -49,6 +58,7 @@ public class QueryVideoService { |
|
|
|
|
|
|
|
} |
|
|
|
LiveChannelVo liveChannelVo = new LiveChannelVo(); |
|
|
|
BeanUtils.copyProperties(inspection, liveChannelVo); |
|
|
|
//任务状态为任务飞行中10视频直播 |
|
|
|
if (10 == inspection.getStatus()) { |
|
|
|
LiveChannel liveChannel = liveChannelMapper.selectOne(new LambdaQueryWrapper<LiveChannel>() |