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