From f4256509d4d4b96ee0d17b6cfb0cf7a1091d3d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E7=8E=89=E4=B8=9C?= <129883742+liyudong2018@users.noreply.github.com> Date: Sat, 13 Sep 2025 15:12:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E6=AC=A1=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/workspace.xml | 143 +++--------------- pom.xml | 10 ++ .../hivekion/statistic/bean/PersonInfo.java | 20 +++ .../statistic/bean/StatisticBean.java | 18 +++ .../com/hivekion/statistic/bean/TeamInfo.java | 21 +++ .../controller/StatisticController.java | 27 ++++ .../mapper/tbl/UnitMaterialStationMapper.xml | 4 +- 7 files changed, 115 insertions(+), 128 deletions(-) create mode 100644 src/main/java/com/hivekion/statistic/bean/PersonInfo.java create mode 100644 src/main/java/com/hivekion/statistic/bean/StatisticBean.java create mode 100644 src/main/java/com/hivekion/statistic/bean/TeamInfo.java create mode 100644 src/main/java/com/hivekion/statistic/controller/StatisticController.java diff --git a/.idea/workspace.xml b/.idea/workspace.xml index d894b1d..6cb816e 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,132 +5,13 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + diff --git a/pom.xml b/pom.xml index f36692c..7a605a3 100644 --- a/pom.xml +++ b/pom.xml @@ -280,6 +280,16 @@ true + + org.apache.maven.plugins + maven-compiler-plugin + 3.11.0 + + 8 + 8 + + + diff --git a/src/main/java/com/hivekion/statistic/bean/PersonInfo.java b/src/main/java/com/hivekion/statistic/bean/PersonInfo.java new file mode 100644 index 0000000..ca25377 --- /dev/null +++ b/src/main/java/com/hivekion/statistic/bean/PersonInfo.java @@ -0,0 +1,20 @@ +package com.hivekion.statistic.bean; + +import lombok.Data; + +/** + * [类的简要说明] + *

+ * [详细描述,可选] + *

+ * + * @author LiDongYU + * @since 2025/7/22 + */ +@Data +public class PersonInfo { + private int total; + private int current; + private int death; + private int injured; +} diff --git a/src/main/java/com/hivekion/statistic/bean/StatisticBean.java b/src/main/java/com/hivekion/statistic/bean/StatisticBean.java new file mode 100644 index 0000000..30373cf --- /dev/null +++ b/src/main/java/com/hivekion/statistic/bean/StatisticBean.java @@ -0,0 +1,18 @@ +package com.hivekion.statistic.bean; + +import lombok.Data; + +/** + * [类的简要说明] + *

+ * [详细描述,可选] + *

+ * + * @author LiDongYU + * @since 2025/7/22 + */ +@Data +public class StatisticBean { + private TeamInfo team = new TeamInfo(); + private PersonInfo person = new PersonInfo(); +} diff --git a/src/main/java/com/hivekion/statistic/bean/TeamInfo.java b/src/main/java/com/hivekion/statistic/bean/TeamInfo.java new file mode 100644 index 0000000..af46583 --- /dev/null +++ b/src/main/java/com/hivekion/statistic/bean/TeamInfo.java @@ -0,0 +1,21 @@ +package com.hivekion.statistic.bean; + +import lombok.Data; + +/** + * [类的简要说明] + *

+ * [详细描述,可选] + *

+ * + * @author LiDongYU + * @since 2025/7/22 + */ +@Data +public class TeamInfo { + + private String teamName; + private int type = 0; + private String lng; + private String lat; +} diff --git a/src/main/java/com/hivekion/statistic/controller/StatisticController.java b/src/main/java/com/hivekion/statistic/controller/StatisticController.java new file mode 100644 index 0000000..5567d8e --- /dev/null +++ b/src/main/java/com/hivekion/statistic/controller/StatisticController.java @@ -0,0 +1,27 @@ +package com.hivekion.statistic.controller; + +import com.hivekion.common.entity.ResponseData; +import com.hivekion.statistic.bean.StatisticBean; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * [类的简要说明] + *

+ * [详细描述,可选] + *

+ * + * @author LiDongYU + * @since 2025/7/22 + */ +@RestController +@RequestMapping("/statistic") +public class StatisticController { + @GetMapping("/info") + //todo + public ResponseData statistic(String resourceId) { + + return ResponseData.success(new StatisticBean()); + } +} diff --git a/src/main/resources/mapper/tbl/UnitMaterialStationMapper.xml b/src/main/resources/mapper/tbl/UnitMaterialStationMapper.xml index a6d1d99..3401ebf 100644 --- a/src/main/resources/mapper/tbl/UnitMaterialStationMapper.xml +++ b/src/main/resources/mapper/tbl/UnitMaterialStationMapper.xml @@ -3,8 +3,8 @@