This commit is contained in:
parent
6c7e9af962
commit
c4e2c861d3
|
@ -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<WaterPoint> waterPoints = waterPointMapper.selectWaterPoint();
|
||||
|
@ -28,9 +24,9 @@ public class WaterPointController {
|
|||
return success;
|
||||
}
|
||||
|
||||
@GetMapping("selectWaterCamera")
|
||||
public Result selectWaterCamera(){
|
||||
List<WaterCamera> waterCameras = waterCameraMapper.selectWaterCamera();
|
||||
@GetMapping("selectCameraByName")
|
||||
public Result selectCameraByName(String waterPointName){
|
||||
List<WaterCameraDto> waterCameras = waterPointMapper.selectCameraByName(waterPointName);
|
||||
Result success = Result.success(waterCameras);
|
||||
return success;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
|
||||
}
|
|
@ -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<WaterCamera> {
|
||||
|
||||
@Select("select * from water_camera")
|
||||
List<WaterCamera> selectWaterCamera();
|
||||
}
|
|
@ -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<WaterPoint> {
|
||||
@Select("select * from water_point where audit_flag = '2' and disp_flag in (0,1)")
|
||||
List<WaterPoint> 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<WaterCameraDto> selectCameraByName(String waterPointName);
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue