From c581974027cb6ff2123d5a7dd0b39fd3b3217bd4 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期四, 29 二月 2024 18:15:55 +0800 Subject: [PATCH] 使用GetMapping替换RequestMapping --- src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java index 87b839f..717767c 100755 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java @@ -1,6 +1,7 @@ package com.genersoft.iot.vmp.service.impl; import com.alibaba.fastjson2.JSONObject; +import com.baomidou.dynamic.datasource.annotation.DS; import com.genersoft.iot.vmp.common.InviteInfo; import com.genersoft.iot.vmp.common.InviteSessionStatus; import com.genersoft.iot.vmp.common.InviteSessionType; @@ -57,6 +58,7 @@ @SuppressWarnings(value = {"rawtypes", "unchecked"}) @Service +@DS("master") public class PlayServiceImpl implements IPlayService { private final static Logger logger = LoggerFactory.getLogger(PlayServiceImpl.class); @@ -780,11 +782,12 @@ } else { String startTime = inviteInfo.getStreamInfo().getStartTime(); String endTime = inviteInfo.getStreamInfo().getEndTime(); + // 姝ゆ椂start鍜宔nd鍗曚綅鏄 long start = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(startTime); long end = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(endTime); BigDecimal currentCount = new BigDecimal(duration); - BigDecimal totalCount = new BigDecimal(end - start); + BigDecimal totalCount = new BigDecimal((end - start) * 1000); BigDecimal divide = currentCount.divide(totalCount, 2, RoundingMode.HALF_UP); double process = divide.doubleValue(); inviteInfo.getStreamInfo().setProgress(process); -- Gitblit v1.8.0