From 212773e679c28abf289b3656f52e7be85df2ca8b Mon Sep 17 00:00:00 2001 From: thesai <1021828630@qq.com> Date: Tue, 11 Jun 2024 20:15:21 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BF=AE=E6=94=B9]gitea=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=9E=84=E5=BB=BA/=E5=8F=91=E5=B8=83=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/CICD_local_test.yaml | 7 +++++++ .gitea/workflows/CI_release_build.yaml | 7 +++++++ src/main/java/club/joylink/rtss/bo/cgy/CgyStatsBO.java | 2 +- .../club/joylink/rtss/services/cgy/CgyStatsService.java | 4 ++-- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/CICD_local_test.yaml b/.gitea/workflows/CICD_local_test.yaml index 882177066..7fd46ee92 100644 --- a/.gitea/workflows/CICD_local_test.yaml +++ b/.gitea/workflows/CICD_local_test.yaml @@ -24,6 +24,13 @@ jobs: uses: https://gitea.joylink.club/actions/local-setup-maven@v0.1.1 with: maven-version: 3.8.8 + mirrors: | + + aliyun + aliyun maven + https://maven.aliyun.com/repository/public + central + - name: 构建 run: | mvn -Dmaven.test.skip=true clean package diff --git a/.gitea/workflows/CI_release_build.yaml b/.gitea/workflows/CI_release_build.yaml index c07dab7c9..46aebf5bc 100644 --- a/.gitea/workflows/CI_release_build.yaml +++ b/.gitea/workflows/CI_release_build.yaml @@ -23,6 +23,13 @@ jobs: uses: https://gitea.joylink.club/actions/local-setup-maven@v0.1.1 with: maven-version: 3.8.8 + mirrors: | + + aliyun + aliyun maven + https://maven.aliyun.com/repository/public + central + - name: 构建 run: | mvn -Dmaven.test.skip=true clean package diff --git a/src/main/java/club/joylink/rtss/bo/cgy/CgyStatsBO.java b/src/main/java/club/joylink/rtss/bo/cgy/CgyStatsBO.java index 64ae32a69..87dacf746 100644 --- a/src/main/java/club/joylink/rtss/bo/cgy/CgyStatsBO.java +++ b/src/main/java/club/joylink/rtss/bo/cgy/CgyStatsBO.java @@ -27,6 +27,6 @@ public class CgyStatsBO { private AtomicLong visitor; //实训人数 private final Set userSet = new HashSet<>(); - //实训时长 + //实训时长/s private AtomicLong duration; } diff --git a/src/main/java/club/joylink/rtss/services/cgy/CgyStatsService.java b/src/main/java/club/joylink/rtss/services/cgy/CgyStatsService.java index f3398a9a8..890c5d50d 100644 --- a/src/main/java/club/joylink/rtss/services/cgy/CgyStatsService.java +++ b/src/main/java/club/joylink/rtss/services/cgy/CgyStatsService.java @@ -98,7 +98,7 @@ public class CgyStatsService { + "app_secret=" + statsBO.getAppSecret(); body.put("sign", EncryptUtil.md5(sb).toLowerCase()); //扩展字段 - body.put("duration", statsBO.getDuration().get()); + body.put("duration", statsBO.getDuration().get() / 60); //分钟 SimulationInfoQueryVO queryVO = new SimulationInfoQueryVO(); queryVO.setFunctionId(statsBO.getFunctionId()); List sims = simulationService.listAllSimulation(queryVO); @@ -108,7 +108,7 @@ public class CgyStatsService { httpHeaders.setContentType(MediaType.APPLICATION_JSON); HttpEntity> httpEntity = new HttpEntity<>(body, httpHeaders); Map resBody = restTemplate.postForObject( - "https://common-dev.educloudxr.com/api/applicationCenter/openapi/summary", httpEntity, + "http://gdjtapp.cdivtc.edu.cn/api/applicationCenter/openapi/summary", httpEntity, Map.class); if (resBody != null && Objects.equals(resBody.get("code"), "100001")) { log.error(String.format("成工院虚仿平台同步数据失败:[%s][%s]", resBody.get("msg"),