diff --git a/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java b/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java index a6b9bb2..6d39d40 100644 --- a/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java +++ b/src/main/java/com/hisense/monitormanage/controller/WaterPointController.java @@ -1,9 +1,8 @@ package com.hisense.monitormanage.controller; +import com.hisense.monitormanage.dto.WaterCameraDto; import com.hisense.monitormanage.entity.Result; -import com.hisense.monitormanage.entity.WaterCamera; import com.hisense.monitormanage.entity.WaterPoint; -import com.hisense.monitormanage.mapper.WaterCameraMapper; import com.hisense.monitormanage.mapper.WaterPointMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -18,9 +17,6 @@ public class WaterPointController { @Autowired private WaterPointMapper waterPointMapper; - @Autowired - private WaterCameraMapper waterCameraMapper; - @GetMapping("selectWaterPoint") public Result selectWaterPoint(){ List waterPoints = waterPointMapper.selectWaterPoint(); @@ -28,9 +24,9 @@ public class WaterPointController { return success; } - @GetMapping("selectWaterCamera") - public Result selectWaterCamera(){ - List waterCameras = waterCameraMapper.selectWaterCamera(); + @GetMapping("selectCameraByName") + public Result selectCameraByName(String waterPointName){ + List waterCameras = waterPointMapper.selectCameraByName(waterPointName); Result success = Result.success(waterCameras); return success; } diff --git a/src/main/java/com/hisense/monitormanage/dto/WaterCameraDto.java b/src/main/java/com/hisense/monitormanage/dto/WaterCameraDto.java new file mode 100644 index 0000000..f9248b4 --- /dev/null +++ b/src/main/java/com/hisense/monitormanage/dto/WaterCameraDto.java @@ -0,0 +1,14 @@ +package com.hisense.monitormanage.dto; + +import lombok.Data; + +@Data +public class WaterCameraDto { + private String waterPointName; + private String ssqy; + private String illustrate; + private String videoSurveillance; + private String videoCapture; + private String channelName; + private String channelCode; +} diff --git a/src/main/java/com/hisense/monitormanage/entity/WaterCamera.java b/src/main/java/com/hisense/monitormanage/entity/WaterCamera.java deleted file mode 100644 index 2bc6a06..0000000 --- a/src/main/java/com/hisense/monitormanage/entity/WaterCamera.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.hisense.monitormanage.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -@Data -@TableName("water_camera") -public class WaterCamera { - private String waterPointName; - private String ssqy; - private String longitude; - private String latitude; - private String channelName; - private String channelCode; - private String gpsX; - private String gpsy; - private String illustrate; - private String videoSurveillance; - private String videoCapture; - -} diff --git a/src/main/java/com/hisense/monitormanage/mapper/WaterCameraMapper.java b/src/main/java/com/hisense/monitormanage/mapper/WaterCameraMapper.java deleted file mode 100644 index 2080301..0000000 --- a/src/main/java/com/hisense/monitormanage/mapper/WaterCameraMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.hisense.monitormanage.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.hisense.monitormanage.entity.WaterCamera; -import org.apache.ibatis.annotations.Select; -import org.springframework.stereotype.Repository; - -import java.util.List; - -@Repository -public interface WaterCameraMapper extends BaseMapper { - - @Select("select * from water_camera") - List selectWaterCamera(); -} diff --git a/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java b/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java index 94321b3..81511a4 100644 --- a/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java +++ b/src/main/java/com/hisense/monitormanage/mapper/WaterPointMapper.java @@ -1,6 +1,7 @@ package com.hisense.monitormanage.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hisense.monitormanage.dto.WaterCameraDto; import com.hisense.monitormanage.entity.WaterPoint; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; @@ -11,4 +12,7 @@ import java.util.List; public interface WaterPointMapper extends BaseMapper { @Select("select * from water_point where audit_flag = '2' and disp_flag in (0,1)") List selectWaterPoint(); + + @Select("SELECT * FROM w_camera w RIGHT JOIN water_camera wc ON w.water_id = wc.water_id where wc.water_point_name = #{waterPointName}") + List selectCameraByName(String waterPointName); } diff --git a/src/main/java/com/hisense/monitormanage/service/QidiService.java b/src/main/java/com/hisense/monitormanage/service/QidiService.java index d90db50..55c9b14 100644 --- a/src/main/java/com/hisense/monitormanage/service/QidiService.java +++ b/src/main/java/com/hisense/monitormanage/service/QidiService.java @@ -38,7 +38,7 @@ public class QidiService { MultiValueMap map = new LinkedMultiValueMap(); map.add("username", "dlwr"); - map.add("password", "C61026E841A2F96E17564AB7333D92E8");//dlwr123!,需要MD5加密 + map.add("password", "aa20f6046b76fa7bb7566d8fd3445d4d");//Dlwr@123456,需要MD5加密 map.add("scope", "read"); map.add("grant_type", "password"); map.add("vc", "NO");