1.修改查询视频视频点播巡检结果,在MonitorService中将listChannelPlayStates做成调度任务,每天的6点5分执行一次,查询当前时间截止向前推1天
This commit is contained in:
parent
ae96948655
commit
50fbfd6645
|
@ -11,6 +11,9 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.time.Clock;
|
import java.time.Clock;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZoneOffset;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -235,25 +238,13 @@ public class Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询视频点播巡检结果,只取异常的
|
//查询视频点播巡检结果,只取异常的
|
||||||
@RequestMapping("listChannelPlayStates")
|
// @RequestMapping("listChannelPlayStates")
|
||||||
public Result listChannelPlayStates(
|
// public Result listChannelPlayStates(
|
||||||
@RequestParam(value="page",required = false,defaultValue = "1") Integer page,
|
// @RequestParam(value="page",required = false,defaultValue = "1") Integer page,
|
||||||
@RequestParam(value="pageSize",required = false,defaultValue = "20") String pageSize
|
// @RequestParam(value="pageSize",required = false,defaultValue = "20") Integer pageSize
|
||||||
){
|
// ){
|
||||||
Map<String,Object> condition = new HashMap<>();
|
// return monitorService.listChannelPlayStates();
|
||||||
LocalDateTime localDateTime = LocalDateTime.now(Clock.systemUTC());
|
// }
|
||||||
|
|
||||||
LocalDateTime startTime = localDateTime.minusDays(7);
|
|
||||||
condition.put("diagnoseResultState",0);
|
|
||||||
condition.put("startTime",startTime.toString());
|
|
||||||
condition.put("endTime",localDateTime.toString());
|
|
||||||
|
|
||||||
Map<String,Object> map = new HashMap<>();
|
|
||||||
map.put("condition",condition);
|
|
||||||
map.put("page",page);
|
|
||||||
map.put("pageSize",pageSize);
|
|
||||||
return monitorService.listChannelPlayStates(map);
|
|
||||||
}
|
|
||||||
|
|
||||||
//道路统计数据与排名
|
//道路统计数据与排名
|
||||||
@RequestMapping("roadData")
|
@RequestMapping("roadData")
|
||||||
|
@ -325,16 +316,17 @@ public class Controller {
|
||||||
@RequestParam(value = "end") String end
|
@RequestParam(value = "end") String end
|
||||||
){
|
){
|
||||||
System.out.println("listSedimentTrailByPoints......");
|
System.out.println("listSedimentTrailByPoints......");
|
||||||
List<SedimentTrail> list = sedimentTrailService.listSedimentTrailByPoints(longitude,latitude,raidus,start,end);
|
Map<String,List<SedimentTrail>> map = sedimentTrailService.listSedimentTrailByPoints(longitude,latitude,raidus,start,end);
|
||||||
return Result.success(list);
|
return Result.success(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("passengerFlow")
|
@RequestMapping("passengerFlow")
|
||||||
|
//测试
|
||||||
public List<Map> passengerFlow(){
|
public List<Map> passengerFlow(){
|
||||||
List<Map> list = passengerFlowService.passengerFlow();
|
List<Map> list = passengerFlowService.passengerFlow();
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
//从提供方获取实时客流列表
|
//从提供方获取最新的实时客流列表
|
||||||
@RequestMapping("listPassengerFlow")
|
@RequestMapping("listPassengerFlow")
|
||||||
public List<Map> listPassengerFlow(){
|
public List<Map> listPassengerFlow(){
|
||||||
List<Map> list = passengerFlowService.passengerFlow();
|
List<Map> list = passengerFlowService.passengerFlow();
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.hisense.monitormanage.entity;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author admin
|
||||||
|
* @version 1.0.0
|
||||||
|
* @ClassName CameraCheck.java
|
||||||
|
* @Description 摄像头巡检类
|
||||||
|
* @createTime 2022年05月13日 20:57:00
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class CameraCheck {
|
||||||
|
private String cameraType;
|
||||||
|
private String channelCode;
|
||||||
|
// private String channelName;
|
||||||
|
// private String channelSn;
|
||||||
|
// private String channelType;
|
||||||
|
// private String deviceCode;
|
||||||
|
// private String deviceIp;
|
||||||
|
// private String deviceName;
|
||||||
|
// @JsonFormat(pattern="yyyyMMdd'T'HHmmss'Z'")
|
||||||
|
// private ZonedDateTime checkTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -26,6 +26,7 @@ public class SedimentTrail{
|
||||||
private Integer id;
|
private Integer id;
|
||||||
private double speed;
|
private double speed;
|
||||||
private String simCardNum;
|
private String simCardNum;
|
||||||
|
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||||
private LocalDateTime uploadtime;
|
private LocalDateTime uploadtime;
|
||||||
private double coordinateX;
|
private double coordinateX;
|
||||||
private double coordinateY;
|
private double coordinateY;
|
||||||
|
|
|
@ -10,9 +10,12 @@ import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
public interface CameraChannelMapper extends BaseMapper<CameraChannel> {
|
||||||
|
|
||||||
|
void updateCameraStatus(List<String> list);
|
||||||
|
|
||||||
List<CameraChannelDto> selectAll();
|
List<CameraChannelDto> selectAll();
|
||||||
|
|
||||||
@Select("select cc.*,cp.pic_url from t_camera_channel cc LEFT JOIN t_channel_picture cp ON cc.channel_code=cp.channel_code where cc.channel_id = #{channelId}")
|
@Select("select cc.*,cp.pic_url from t_camera_channel cc LEFT JOIN t_channel_picture cp ON cc.channel_code=cp.channel_code where cc.channel_id = #{channelId}")
|
||||||
|
|
|
@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.http.*;
|
import org.springframework.http.*;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.Base64Utils;
|
import org.springframework.util.Base64Utils;
|
||||||
import org.springframework.util.LinkedMultiValueMap;
|
import org.springframework.util.LinkedMultiValueMap;
|
||||||
import org.springframework.util.MultiValueMap;
|
import org.springframework.util.MultiValueMap;
|
||||||
|
@ -33,9 +34,12 @@ import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.ZoneOffset;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@ -77,7 +81,7 @@ public class MonitorService {
|
||||||
// final private String userName = "chengshiyunnao";
|
// final private String userName = "chengshiyunnao";
|
||||||
// final private String password = "QDyjj@2021";
|
// final private String password = "QDyjj@2021";
|
||||||
|
|
||||||
final private String userName = "yunnaoshuzidizuo";
|
final private String userName = "ynszdz";
|
||||||
final private String password = "Admin@123";
|
final private String password = "Admin@123";
|
||||||
final private String monitorDomain = "http://10.132.191.3:8314";
|
final private String monitorDomain = "http://10.132.191.3:8314";
|
||||||
|
|
||||||
|
@ -507,29 +511,71 @@ public class MonitorService {
|
||||||
}
|
}
|
||||||
|
|
||||||
//查询视频点播巡检结果
|
//查询视频点播巡检结果
|
||||||
public Result listChannelPlayStates(Map<String,Object> map){
|
@Scheduled(cron="0 5 6 * * ?")
|
||||||
|
public Result listChannelPlayStates(){
|
||||||
|
//获取当前时间和前一天的UTC时间
|
||||||
|
Map<String,Object> condition = new HashMap<>();
|
||||||
|
ZonedDateTime endUTC = ZonedDateTime.now(ZoneOffset.UTC);
|
||||||
|
ZonedDateTime startUTC = endUTC.minusDays(1);
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyyMMdd'T'HHmmss'Z'");
|
||||||
|
condition.put("checkStatus",0);
|
||||||
|
condition.put("startTime",startUTC);
|
||||||
|
condition.put("endTime",endUTC);
|
||||||
|
//组装查询条件,经过验证pageSize设置过大也没效果,最大512
|
||||||
|
Map<String,Object> map = new HashMap<>();
|
||||||
|
map.put("condition",condition);
|
||||||
|
map.put("page",1);
|
||||||
|
map.put("pageSize",500);//最多一次512条
|
||||||
|
//查询路径和请求头信息
|
||||||
String url = monitorDomain + "/nms/api/channel/play/list";
|
String url = monitorDomain + "/nms/api/channel/play/list";
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
headers.add("X-Subject-Token",token);
|
headers.add("X-Subject-Token",token);
|
||||||
|
|
||||||
int nextPage = 0;
|
//查询数据的页数
|
||||||
int thisPage = 1;
|
int pageCount = 0;
|
||||||
JSONArray jsonArray = new JSONArray();
|
//查询结果
|
||||||
while(nextPage >= 0){
|
List<Map> list = new ArrayList<>();
|
||||||
map.put("page",thisPage);
|
|
||||||
HttpEntity<Map<String,Object>> request = new HttpEntity<>(map,headers);
|
HttpEntity<Map<String,Object>> request = new HttpEntity<>(map,headers);
|
||||||
ResponseEntity<JSONObject> responseEntity = restTemplate.exchange(url, HttpMethod.POST, request, JSONObject.class );
|
ResponseEntity<JSONObject> responseEntity = restTemplate.exchange(url, HttpMethod.POST, request, JSONObject.class );
|
||||||
JSONObject result = responseEntity.getBody();
|
JSONObject entityBody = responseEntity.getBody();
|
||||||
jsonArray.add(result.get("results"));
|
List<Map> results = (List<Map>) entityBody.get("results");
|
||||||
nextPage = result.getIntValue("nextPage");
|
if(!results.isEmpty()){
|
||||||
thisPage = nextPage;
|
list.addAll(results);
|
||||||
|
pageCount = entityBody.getIntValue("totalCount")/500 + 1;
|
||||||
}
|
}
|
||||||
List<Map> list = JSONObject.parseArray(JSONObject.toJSONString(jsonArray),Map.class);
|
for(int i = 2;i<=pageCount;i++){
|
||||||
|
map.put("page",i);
|
||||||
|
HttpEntity<Map<String,Object>> request2 = new HttpEntity<>(map,headers);
|
||||||
|
ResponseEntity<JSONObject> responseEntity2 = restTemplate.exchange(url, HttpMethod.POST, request, JSONObject.class );
|
||||||
|
JSONObject entityBody2 = responseEntity.getBody();
|
||||||
|
List<Map> results2 = (List<Map>) entityBody.get("results");
|
||||||
|
if(!results2.isEmpty()){
|
||||||
|
list.addAll(results);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// List<CameraCheck> list1 = JSONObject.parseArray(JSONObject.toJSONString(jsonArray),CameraCheck.class);
|
||||||
|
// Map<String, CameraCheck> collect = list.stream().collect(Collectors.groupingBy(
|
||||||
|
// CameraCheck::getChannelCode,
|
||||||
|
// Collectors.collectingAndThen(
|
||||||
|
// Collectors.reducing((c1, c2) -> c1.getCheckTime().compareTo(c2.getCheckTime()) > 0 ? c1 : c2), Optional::get)
|
||||||
|
// )
|
||||||
|
// );
|
||||||
|
//
|
||||||
|
//通过set对channel_code去重
|
||||||
|
Set<String> set = new HashSet<>();
|
||||||
|
|
||||||
List<List<Map>> listMap = Lists.partition(list,500);
|
for(Map m:list){
|
||||||
for(List<Map> ll:listMap){
|
set.add(m.get("channelCode").toString());
|
||||||
cameraChannelMapper.updateState(ll);
|
|
||||||
}
|
}
|
||||||
|
List<String> lists = new ArrayList<>(set.size());
|
||||||
|
lists.addAll(set);
|
||||||
|
//根据channel_code对t_camera_channel表的status字段进行更新(0)
|
||||||
|
List<List<String>> listMap = Lists.partition(lists,100);
|
||||||
|
for(List<String> ll:listMap){
|
||||||
|
cameraChannelMapper.updateCameraStatus(ll);
|
||||||
|
}
|
||||||
|
log.info("{} 查询视频点播巡检成功,发现异常数量:{}",LocalDateTime.now(),set.size());
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -564,7 +610,6 @@ public class MonitorService {
|
||||||
|
|
||||||
//启迪数据中台相关
|
//启迪数据中台相关
|
||||||
//1.登录
|
//1.登录
|
||||||
|
|
||||||
public String qidiToken () {
|
public String qidiToken () {
|
||||||
String url = "http://120.221.95.13:9090/apin/authorization/oauth/token";
|
String url = "http://120.221.95.13:9090/apin/authorization/oauth/token";
|
||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
|
|
|
@ -49,8 +49,9 @@ public class PassengerFlowService {
|
||||||
@Value("7eb78b134e0310904d46039ccea20c32")
|
@Value("7eb78b134e0310904d46039ccea20c32")
|
||||||
private String appSecret;
|
private String appSecret;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 实时客流
|
* 最新的实时客流
|
||||||
* @param
|
* @param
|
||||||
* @return List
|
* @return List
|
||||||
*/
|
*/
|
||||||
|
@ -63,7 +64,7 @@ public class PassengerFlowService {
|
||||||
|
|
||||||
LocalDateTime dateNow = LocalDateTime.now();
|
LocalDateTime dateNow = LocalDateTime.now();
|
||||||
String timeStamp = dateNow.format(dateTimeFormatter1);//yyyyMMddHHmmss
|
String timeStamp = dateNow.format(dateTimeFormatter1);//yyyyMMddHHmmss
|
||||||
String[] tt = this.minusMinutesStr(dateNow,180);
|
String[] tt = this.newMinusMinutesStr(dateNow);
|
||||||
|
|
||||||
String url = "http://15.72.158.72:8081/getway/api/Proxy/HandleByKey/1249fcc8-0466-4897-87b4-d2111a9baf4f";
|
String url = "http://15.72.158.72:8081/getway/api/Proxy/HandleByKey/1249fcc8-0466-4897-87b4-d2111a9baf4f";
|
||||||
map.put("APIKEY",APIKEY);
|
map.put("APIKEY",APIKEY);
|
||||||
|
@ -82,6 +83,7 @@ public class PassengerFlowService {
|
||||||
map.put("ParamJson",para);
|
map.put("ParamJson",para);
|
||||||
|
|
||||||
System.out.println("multimap->"+map.toString());
|
System.out.println("multimap->"+map.toString());
|
||||||
|
log.info("[passengerFlow] ->",map.toString());
|
||||||
ResponseEntity<String> responseEntity;
|
ResponseEntity<String> responseEntity;
|
||||||
List<Map> list = new ArrayList<>();
|
List<Map> list = new ArrayList<>();
|
||||||
try{
|
try{
|
||||||
|
@ -219,6 +221,36 @@ public class PassengerFlowService {
|
||||||
t2 = t1.substring(0,t1.length()-2);
|
t2 = t1.substring(0,t1.length()-2);
|
||||||
System.out.println("t1->"+t1+"...t2->"+t2);
|
System.out.println("t1->"+t1+"...t2->"+t2);
|
||||||
return new String[]{t1,t2};
|
return new String[]{t1,t2};
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询出最新有游客数据的时间点
|
||||||
|
private String[] newMinusMinutesStr(LocalDateTime datetime){
|
||||||
|
String t1,t2;//t1 yyyyMMddHHmm t2 yyyyMMddHH
|
||||||
|
LocalDateTime minus = datetime.minus(125, ChronoUnit.MINUTES);
|
||||||
|
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyyMMddHHmm");
|
||||||
|
DateTimeFormatter dateTimeFormatter2 = DateTimeFormatter.ofPattern("yyyyMMddHH");
|
||||||
|
String time1 = minus.format(dateTimeFormatter);
|
||||||
|
System.out.println(time1);
|
||||||
|
String mm = time1.substring(time1.length() -2,time1.length());
|
||||||
|
System.out.println(mm);
|
||||||
|
|
||||||
|
Integer i = Integer.parseInt(mm)/15;
|
||||||
|
if(i == 0){
|
||||||
|
t1 = time1.substring(0,time1.length() -2)+"00";
|
||||||
|
}else{
|
||||||
|
t1 = time1.substring(0,time1.length() -2)+String.valueOf(15*i);
|
||||||
|
}
|
||||||
|
// if(0 < Integer.parseInt(mm) &&Integer.parseInt(mm)<=30){
|
||||||
|
// t1 = time1.substring(0,time1.length() -2)+"00";
|
||||||
|
// }else if(Integer.parseInt(mm) > 30){
|
||||||
|
// LocalDateTime lastHour = LocalDateTime.parse(time1,dateTimeFormatter).plus(1,ChronoUnit.HOURS);
|
||||||
|
// t1 = lastHour.format(dateTimeFormatter2)+"30";
|
||||||
|
// }else{
|
||||||
|
// t1 = time1;
|
||||||
|
// }
|
||||||
|
|
||||||
|
t2 = t1.substring(0,t1.length()-2);
|
||||||
|
System.out.println("t1->"+t1+"...t2->"+t2);
|
||||||
|
return new String[]{t1,t2};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,12 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collector;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
|
@ -50,10 +54,20 @@ public class SedimentTrailService {
|
||||||
* @param longitude(经度) latitude(纬度) raidus(米) start(时间) end(时间)
|
* @param longitude(经度) latitude(纬度) raidus(米) start(时间) end(时间)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public List<SedimentTrail> listSedimentTrailByPoints(double longitude, double latitude, Integer raidus,String start,String end){
|
public Map<String,List<SedimentTrail>> listSedimentTrailByPoints(double longitude, double latitude, Integer raidus,String start,String end){
|
||||||
double[] points = LongLatUtil.getAround(longitude,latitude,raidus);
|
double[] points = LongLatUtil.getAround(longitude,latitude,raidus);
|
||||||
QueryWrapper<SedimentTrail> wrapper = new QueryWrapper<>();
|
QueryWrapper<SedimentTrail> wrapper = new QueryWrapper<>();
|
||||||
wrapper.between("update_time",start,end).between("longitude",points[0],points[2]).between("latitude",points[1],points[3]);
|
wrapper.between("update_time",start,end).between("longitude",points[0],points[2]).between("latitude",points[1],points[3])
|
||||||
return sedimentTrailMapper.selectList(wrapper);
|
.orderByAsc("sim_card_num","record_time");
|
||||||
|
List<Map> maps = new ArrayList<>();
|
||||||
|
Map<String, List<SedimentTrail>> map = new HashMap<>();
|
||||||
|
try{
|
||||||
|
List<SedimentTrail> list = sedimentTrailMapper.selectList(wrapper);
|
||||||
|
map = list.stream().collect(Collectors.groupingBy(SedimentTrail::getSimCardNum));
|
||||||
|
|
||||||
|
}catch (Exception e){
|
||||||
|
log.error("[listSedimentTrailByPoints] Exception:",e.getMessage());
|
||||||
|
}
|
||||||
|
return map;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,9 @@ import net.sf.ehcache.CacheManager;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import net.sf.ehcache.Cache;
|
import net.sf.ehcache.Cache;
|
||||||
import net.sf.ehcache.Element;
|
import net.sf.ehcache.Element;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import javax.xml.ws.Action;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author admin
|
* @author admin
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.hisense.monitormanage.mapper.CameraChannelMapper">
|
<mapper namespace="com.hisense.monitormanage.mapper.CameraChannelMapper">
|
||||||
<update id="updateState" parameterType="java.util.List">
|
<!-- <update id="updateState" parameterType="java.util.List">-->
|
||||||
<foreach collection="list" item="item" index="index" open="begin" close=";end;" separator=";">
|
<!-- <foreach collection="list" item="item" index="index" open="begin" close=";end;" separator=";">-->
|
||||||
update CameraChannel set state =#{item.estAmount,jdbcType=NUMERIC}
|
<!-- update CameraChannel set state =#{item.estAmount,jdbcType=NUMERIC}-->
|
||||||
where t.licai_id = #{item.licaiId,jdbcType=NUMERIC}
|
<!-- where t.licai_id = #{item.licaiId,jdbcType=NUMERIC}-->
|
||||||
</foreach>
|
<!-- </foreach>-->
|
||||||
|
|
||||||
</update>
|
<!-- </update>-->
|
||||||
|
|
||||||
<select id="selectAll" resultType="com.hisense.monitormanage.dto.CameraChannelDto">
|
<select id="selectAll" resultType="com.hisense.monitormanage.dto.CameraChannelDto">
|
||||||
select c.* from t_camera_channel c
|
select c.* from t_camera_channel c
|
||||||
|
@ -17,4 +17,11 @@
|
||||||
<!-- limit #{page},#{pageSize}-->
|
<!-- limit #{page},#{pageSize}-->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateCameraStatus" parameterType="java.util.List">
|
||||||
|
<foreach collection="list" item="item" index="index" separator=";">
|
||||||
|
update t_camera_channel set check_status = 0
|
||||||
|
where channel_code = #{item,jdbcType=VARCHAR}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue