Commit 00668107 authored by duanruiming's avatar duanruiming

[add] 实时监控-方案优化日志表

parent f9d9b567
package net.wanji.opt.dao.mapper;
import net.wanji.opt.po.base.CrossPlanOptLogPO;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author duanruiming
* @date 2023/01/31 18:32
*/
@Repository
public interface CrossPlanOptLogMapper {
List<CrossPlanOptLogPO> selectByCrossId();
int insertOne(CrossPlanOptLogPO entity);
}
package net.wanji.opt.po.base;
import lombok.Data;
import java.util.Date;
/**
* @author duanruiming
* @date 2023/01/31 18:20
*/
@Data
public class CrossPlanOptLogPO {
private int id;
private String crossId;
private String planNo;
private int dirType;
private int turnType;
private int offset;
private int ringNo;
private String phaseNo;
private int phaseOrderId;
private int oriGreenTime;
private int optTime;
private String optType;
private String optReason;
private Date startTime;
private Date endTime;
private String isRelation;
private String relationCrossId;
private String optResult;
private String optResultDesc;
private int dataBatchTime;
private String restoreResult;
}
<?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.CrossPlanOptLogMapper">
<!-- 通用查询映射结果 -->
<resultMap type="net.wanji.opt.po.base.CrossPlanOptLogPO" id="BaseResultMap">
<result property="id" column="id"/>
<result property="crossId" column="cross_id"/>
<result property="planNo" column="plan_no"/>
<result property="dirType" column="dir_type"/>
<result property="turnType" column="turn_type"/>
<result property="offset" column="offset"/>
<result property="ringNo" column="ring_no"/>
<result property="phaseNo" column="phase_no"/>
<result property="phaseOrderId" column="phase_order_id"/>
<result property="oriGreenTime" column="ori_green_time"/>
<result property="optTime" column="opt_time"/>
<result property="optType" column="opt_type"/>
<result property="optReason" column="opt_reason"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="isRelation" column="is_relation"/>
<result property="relationCrossId" column="relation_cross_id"/>
<result property="optResult" column="opt_result"/>
<result property="optResultDesc" column="opt_result_desc"/>
<result property="dataBatchTime" column="data_batch_time"/>
<result property="restoreResult" column="restore_result"/>
</resultMap>
<sql id="Base_Column_List">
id, cross_id, plan_no, dir_type, turn_type, offset, ring_no, phase_no, phase_order_id, ori_green_time,
opt_time, opt_type, opt_reason, start_time, end_time, is_relation, relation_cross_id, opt_result, opt_result_desc,
data_batch_time, restore_result
</sql>
<select id="selectByCrossId" parameterType="String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_base_cross_plan_opt_log
<where>
<if test="crossId != null and crossId != ''">
and cross_id = #{crossId}
</if>
</where>
</select>
<insert id="insertOne" parameterType="net.wanji.opt.po.base.CrossPlanOptLogPO">
insert into t_base_cross_plan_opt_log (cross_id, plan_no, dir_type, turn_type, offset, ring_no, phase_no,
phase_order_id, ori_green_time, opt_time, opt_type, opt_reason,
start_time,
end_time, is_relation, relation_cross_id, opt_result, opt_result_desc,
data_batch_time, restore_result)
values (#{crossId}, #{planNo}, #{dirType}, #{turnType}, #{offset}, #{ringNo}, #{phaseNo}, #{phaseOrderId},
#{oriGreenTime}, #{optTime}, #{optType}, #{optReason}, #{startTime}, #{endTime}, #{isRelation},
#{relationCrossId}, #{optResult}, #{optResultDesc}, #{dataBatchTime}, #{restoreResult})
</insert>
</mapper>
\ No newline at end of file
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