Commit 04d0978b authored by duanruiming's avatar duanruiming

[update] 目录优化,xml文件

parent 03b9c74e
...@@ -2,7 +2,7 @@ package net.wanji.datacenter.cache; ...@@ -2,7 +2,7 @@ package net.wanji.datacenter.cache;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.wanji.common.framework.spring.ServiceBeanContext; import net.wanji.common.framework.spring.ServiceBeanContext;
import net.wanji.datacenter.service.dataconvert.DataProcessService; import net.wanji.datacenter.service.DataProcessService;
import org.springframework.boot.CommandLineRunner; import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -21,6 +21,7 @@ public class DataProcessServiceRegistrator implements CommandLineRunner { ...@@ -21,6 +21,7 @@ public class DataProcessServiceRegistrator implements CommandLineRunner {
/** /**
* 获取注册器 * 获取注册器
* key:主题名/类名,value: bean
* *
* @return * @return
*/ */
......
package net.wanji.datacenter.dao.mapper; package net.wanji.datacenter.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......
package net.wanji.datacenter.dao.mapper; package net.wanji.datacenter.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......
package net.wanji.datacenter.dao.mapper; package net.wanji.datacenter.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......
package net.wanji.datacenter.dao.mapper; package net.wanji.datacenter.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......
package net.wanji.datacenter.dao.mapper; package net.wanji.datacenter.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
......
...@@ -10,6 +10,7 @@ import java.util.Date; ...@@ -10,6 +10,7 @@ import java.util.Date;
* @author duanruiming * @author duanruiming
* @date 2023/03/11 14:04 * @date 2023/03/11 14:04
*/ */
@SuppressWarnings("all")
public class LanePeriodicDataEventListConvert { public class LanePeriodicDataEventListConvert {
public CrossDataRealTimePO convert2CrossDataRealTimePO(LanePeriodicDataDTO.EventList eventList, CrossBaseLaneInfoPO laneInfoPO) { public CrossDataRealTimePO convert2CrossDataRealTimePO(LanePeriodicDataDTO.EventList eventList, CrossBaseLaneInfoPO laneInfoPO) {
......
package net.wanji.datacenter.service.dataconvert.impl; package net.wanji.datacenter.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.wanji.datacenter.dao.mapper.*; import net.wanji.datacenter.dao.mapper.*;
import net.wanji.datacenter.kafka.ConsumerHandler; import net.wanji.datacenter.kafka.ConsumerHandler;
import net.wanji.datacenter.mapper.*;
import net.wanji.datacenter.pojo.convert.LanePeriodicDataEventListConvert; import net.wanji.datacenter.pojo.convert.LanePeriodicDataEventListConvert;
import net.wanji.datacenter.pojo.dto.LanePeriodicDataDTO; import net.wanji.datacenter.pojo.dto.LanePeriodicDataDTO;
import net.wanji.datacenter.pojo.po.*; import net.wanji.datacenter.pojo.po.*;
import net.wanji.datacenter.service.dataconvert.DataProcessService; import net.wanji.datacenter.service.DataProcessService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
......
package net.wanji.datacenter.service.dataconvert.impl; package net.wanji.datacenter.service.impl;
import net.wanji.datacenter.service.dataconvert.DataProcessService; import net.wanji.datacenter.service.DataProcessService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
......
...@@ -4,7 +4,7 @@ import lombok.RequiredArgsConstructor; ...@@ -4,7 +4,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.wanji.common.utils.tool.StringUtils; import net.wanji.common.utils.tool.StringUtils;
import net.wanji.datacenter.cache.DataProcessServiceRegistrator; import net.wanji.datacenter.cache.DataProcessServiceRegistrator;
import net.wanji.datacenter.service.dataconvert.DataProcessService; import net.wanji.datacenter.service.DataProcessService;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
......
<?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">
<mapper namespace="net.wanji.datacenter.mapper.CrossBaseLaneInfoMapper">
</mapper>
\ No newline at end of file
<?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">
<mapper namespace="net.wanji.datacenter.mapper.CrossDataRealTimeMapper">
</mapper>
\ No newline at end of file
<?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">
<mapper namespace="net.wanji.opt.dao.mapper.trend.CrossDataRealtimeMapper">
<select id="selectAbnormalCross" resultType="net.wanji.opt.vo.AbnormalCrossListVO">
select
t2.id, t2.name, t1.unbalance_dirs, t1.congestion_dirs, t1.spillover_dirs, t1.status as realtimeStatus,
t1.start_time, t1.duration, t2.location as locationStr, t1.is_unbalance, t1.is_spillover, t1.is_congestion
from t_cross_data_realtime t1 JOIN t_base_cross_info t2
ON t1.cross_id = t2.id
<where>
<if test="status != null">
and (t1.status = #{status}
<if test="status == 1"> or t1.is_unbalance = 1 </if>
<if test="status == 2"> or t1.is_congestion = 1 </if>
<if test="status == 3"> or t1.is_spillover = 1 </if>)
</if>
<if test="name != null and name != ''">
and t2.name like concat('%',#{name},'%')
</if>
<if test="type != null">
and t1.type = #{type}
</if>
<if test="status == null">
and t1.status in (0, 1, 2, 3)
</if>
</where>
</select>
<select id="selectByCrossId" resultType="net.wanji.opt.po.trend.CrossDataRealtimePO">
select
cross_id,status,type,traffic_index,start_time,duration,is_unbalance,is_spillover,is_congestion,unbalance_index,spillover_index,congestion_index,unbalance_dirs,spillover_dirs,congestion_dirs,flow,flow_rate,speed,queue_length,stop_times,delay_time,sturation,batch_time,gmt_create,gmt_modified
from t_cross_data_realtime
where cross_id = #{crossId}
</select>
</mapper>
<?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">
<mapper namespace="net.wanji.opt.dao.mapper.trend.CrossDirDataHistMapper">
<select id="selectByCrossIdAndTimestamp" resultType="net.wanji.opt.po.trend.CrossDirDataHistPO">
select
id,dir_type,in_out_type,cross_id,length,status,traffic_index,flow,speed,queue_length,stop_times,delay_time,sturation,batch_time,gmt_create,gmt_modified
from t_cross_dir_data_hist
where cross_id = #{crossId} and in_out_type = 1
and batch_time <![CDATA[ >= ]]> #{preSeconds}
order by batch_time
</select>
<select id="selectByCrossIdDirAndTimestamp" resultType="net.wanji.opt.po.trend.CrossDirDataHistPO">
select
id,dir_type,in_out_type,cross_id,length,status,traffic_index,flow,speed,queue_length,stop_times,delay_time,sturation,batch_time,gmt_create,gmt_modified
from t_cross_dir_data_hist
where cross_id = #{crossId} and in_out_type = 1 and dir_type = #{dir}
and batch_time <![CDATA[ >= ]]> #{preSeconds}
order by batch_time
</select>
</mapper>
<?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">
<mapper namespace="net.wanji.datacenter.mapper.CrossDirDataRealTimeMapper">
</mapper>
\ No newline at end of file
<?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">
<mapper namespace="net.wanji.datacenter.mapper.CrossLaneDataRealTimeMapper">
</mapper>
\ No newline at end of file
<?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">
<mapper namespace="net.wanji.datacenter.mapper.CrossTurnDataRealTimeMapper">
</mapper>
\ No newline at end of file
<?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">
<mapper namespace="net.wanji.opt.dao.mapper.trend.CrossTurnDataRealtimeMapper">
<select id="selectByCrossId" resultType="net.wanji.opt.po.trend.CrossTurnDataRealtimePO">
select
id,turn_type,in_dir,out_dir,cross_id,flow,speed,in_speed,out_speed,queue_length,stop_times,delay_time,sturation,vehhead_dist,vehhead_time,quality,batch_time,gmt_create,gmt_modified
from t_cross_turn_data_realtime
where cross_id = #{crossId}
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment