From 1721ee0f9bf4cf05d604e5f374e504164a8dcd42 Mon Sep 17 00:00:00 2001 From: wuweida <2918581207@qq.com> Date: Tue, 7 Jun 2022 16:40:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=BA=E6=B5=81=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=82=B9=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PassengerFlowController.java | 30 ---------------- .../controller/PassengerTestController.java | 36 +++++++++++++++++++ .../monitormanage/entity/PassengerTest.java | 15 ++++++++ .../mapper/PassengerTestMapper.java | 7 ++++ .../resources/mapper/PassengerTestMapper.xml | 5 +++ 5 files changed, 63 insertions(+), 30 deletions(-) delete mode 100644 src/main/java/com/hisense/monitormanage/controller/PassengerFlowController.java create mode 100644 src/main/java/com/hisense/monitormanage/controller/PassengerTestController.java create mode 100644 src/main/java/com/hisense/monitormanage/entity/PassengerTest.java create mode 100644 src/main/java/com/hisense/monitormanage/mapper/PassengerTestMapper.java create mode 100644 src/main/resources/mapper/PassengerTestMapper.xml diff --git a/src/main/java/com/hisense/monitormanage/controller/PassengerFlowController.java b/src/main/java/com/hisense/monitormanage/controller/PassengerFlowController.java deleted file mode 100644 index f7bd332..0000000 --- a/src/main/java/com/hisense/monitormanage/controller/PassengerFlowController.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.hisense.monitormanage.controller; - -import com.hisense.monitormanage.entity.Result; -import com.hisense.monitormanage.service.PassengerFlowService; -import io.swagger.annotations.Api; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.ArrayList; -import java.util.List; - -@RestController -@Api("实时人流") -@RequestMapping("api/project/passenger") -public class PassengerFlowController { - - @Autowired - private PassengerFlowService passengerFlowService; - - @GetMapping("selectPassengerFlow") - public Result selectPassengerFlow(List vertX, List vertY,String timeId){ - List list = new ArrayList<>(); - - Integer integer = passengerFlowService.pnpolyAlgorithm(vertX, vertY, timeId); - Result success = Result.success(integer); - return success; - } -} diff --git a/src/main/java/com/hisense/monitormanage/controller/PassengerTestController.java b/src/main/java/com/hisense/monitormanage/controller/PassengerTestController.java new file mode 100644 index 0000000..b0da773 --- /dev/null +++ b/src/main/java/com/hisense/monitormanage/controller/PassengerTestController.java @@ -0,0 +1,36 @@ +package com.hisense.monitormanage.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.hisense.monitormanage.entity.PassengerTest; +import com.hisense.monitormanage.entity.Result; +import com.hisense.monitormanage.mapper.PassengerTestMapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@RestController +@Api("人流测试点") +@RequestMapping("api/project/passenger") +public class PassengerTestController { + + @Autowired + private PassengerTestMapper passengerTestMapper; + + /** + * 查询全部人流测试点 + * @return + */ + @GetMapping("selectPassengerTest") + @ApiOperation("查询全部人流测试点") + public Result selectPassengerTest(){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + List passengerTests = passengerTestMapper.selectList(queryWrapper); + Result success = Result.success(passengerTests); + return success; + } +} diff --git a/src/main/java/com/hisense/monitormanage/entity/PassengerTest.java b/src/main/java/com/hisense/monitormanage/entity/PassengerTest.java new file mode 100644 index 0000000..e1f9878 --- /dev/null +++ b/src/main/java/com/hisense/monitormanage/entity/PassengerTest.java @@ -0,0 +1,15 @@ +package com.hisense.monitormanage.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +@Data +@TableName("t_passenger_test") +public class PassengerTest { + @TableId + private Integer id; + private double longitude; + private double latitude; + private String label; +} diff --git a/src/main/java/com/hisense/monitormanage/mapper/PassengerTestMapper.java b/src/main/java/com/hisense/monitormanage/mapper/PassengerTestMapper.java new file mode 100644 index 0000000..998115b --- /dev/null +++ b/src/main/java/com/hisense/monitormanage/mapper/PassengerTestMapper.java @@ -0,0 +1,7 @@ +package com.hisense.monitormanage.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hisense.monitormanage.entity.PassengerTest; + +public interface PassengerTestMapper extends BaseMapper { +} diff --git a/src/main/resources/mapper/PassengerTestMapper.xml b/src/main/resources/mapper/PassengerTestMapper.xml new file mode 100644 index 0000000..8d90dc8 --- /dev/null +++ b/src/main/resources/mapper/PassengerTestMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file