|
|
@ -1,54 +1,108 @@
|
|
|
|
<?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.shxy.xymanager_dao.dao.TerminalStatusDao">
|
|
|
|
<mapper namespace="com.shxy.xymanager_dao.dao.TerminalStatusDao">
|
|
|
|
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalStatus">
|
|
|
|
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.TerminalStatus">
|
|
|
|
<id column="term_id" jdbcType="INTEGER" property="termId"/>
|
|
|
|
<id column="term_id" jdbcType="INTEGER" property="termId" />
|
|
|
|
<result column="last_heartbeat" jdbcType="BIGINT" property="lastHeartbeat"/>
|
|
|
|
<result column="last_heartbeat" jdbcType="BIGINT" property="lastHeartbeat" />
|
|
|
|
<result column="last_heartbeat_ip" jdbcType="VARCHAR" property="lastHeartbeatIp"/>
|
|
|
|
<result column="last_heartbeat_ip" jdbcType="VARCHAR" property="lastHeartbeatIp" />
|
|
|
|
<result column="last_heartbeat_port" jdbcType="SMALLINT" property="lastHeartbeatPort"/>
|
|
|
|
<result column="last_heartbeat_port" jdbcType="SMALLINT" property="lastHeartbeatPort" />
|
|
|
|
<result column="last_frame_no" jdbcType="SMALLINT" property="lastFrameNo"/>
|
|
|
|
<result column="last_frame_no" jdbcType="SMALLINT" property="lastFrameNo" />
|
|
|
|
<result column="battery_voltage" jdbcType="REAL" property="batteryVoltage"/>
|
|
|
|
<result column="battery_voltage" jdbcType="REAL" property="batteryVoltage" />
|
|
|
|
<result column="op_temperature" jdbcType="REAL" property="opTemperature"/>
|
|
|
|
<result column="op_temperature" jdbcType="REAL" property="opTemperature" />
|
|
|
|
<result column="battery_capacity" jdbcType="REAL" property="batteryCapacity"/>
|
|
|
|
<result column="battery_capacity" jdbcType="REAL" property="batteryCapacity" />
|
|
|
|
<result column="floating_charge" jdbcType="TINYINT" property="floatingCharge"/>
|
|
|
|
<result column="floating_charge" jdbcType="TINYINT" property="floatingCharge" />
|
|
|
|
<result column="total_working_time" jdbcType="BIGINT" property="totalWorkingTime"/>
|
|
|
|
<result column="total_working_time" jdbcType="INTEGER" property="totalWorkingTime" />
|
|
|
|
<result column="working_time" jdbcType="BIGINT" property="workingTime"/>
|
|
|
|
<result column="working_time" jdbcType="INTEGER" property="workingTime" />
|
|
|
|
<result column="connection_state" jdbcType="TINYINT" property="connectionState"/>
|
|
|
|
<result column="connection_state" jdbcType="TINYINT" property="connectionState" />
|
|
|
|
<result column="signal_strength_4g" jdbcType="TINYINT" property="signalStrength4g"/>
|
|
|
|
<result column="send_flow" jdbcType="INTEGER" property="sendFlow" />
|
|
|
|
<result column="signal_strength_2g" jdbcType="TINYINT" property="signalStrength2g"/>
|
|
|
|
<result column="recv_flow" jdbcType="INTEGER" property="recvFlow" />
|
|
|
|
<result column="send_flow" jdbcType="BIGINT" property="sendFlow"/>
|
|
|
|
<result column="ws_update_time" jdbcType="BIGINT" property="wsUpdateTime" />
|
|
|
|
<result column="recv_flow" jdbcType="BIGINT" property="recvFlow"/>
|
|
|
|
<result column="signal_strength_4g" jdbcType="TINYINT" property="signalStrength4g" />
|
|
|
|
<result column="ws_update_time" jdbcType="BIGINT" property="wsUpdateTime"/>
|
|
|
|
<result column="signal_strength_2g" jdbcType="TINYINT" property="signalStrength2g" />
|
|
|
|
<result column="remaining_ram" jdbcType="TINYINT" property="remainingRam"/>
|
|
|
|
<result column="remaining_ram" jdbcType="SMALLINT" property="remainingRam" />
|
|
|
|
<result column="remaining_rom" jdbcType="TINYINT" property="remainingRom"/>
|
|
|
|
<result column="remaining_rom" jdbcType="SMALLINT" property="remainingRom" />
|
|
|
|
<result column="boot_time" jdbcType="BIGINT" property="bootTime"/>
|
|
|
|
<result column="boot_time" jdbcType="BIGINT" property="bootTime" />
|
|
|
|
<result column="rs_update_time" jdbcType="BIGINT" property="updateTime"/>
|
|
|
|
<result column="rs_update_time" jdbcType="BIGINT" property="rsUpdateTime" />
|
|
|
|
<result column="gps_status" jdbcType="INTEGER" property="gpsStatus"/>
|
|
|
|
<result column="gps_status" jdbcType="INTEGER" property="gpsStatus" />
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="heartResultMap" type="com.shxy.xymanager_common.dto.TerminalsWithHeart">
|
|
|
|
<resultMap id="heartResultMap" type="com.shxy.xymanager_common.dto.TerminalsWithHeart">
|
|
|
|
<result column="term_id" jdbcType="INTEGER" property="id"/>
|
|
|
|
<result column="term_id" jdbcType="INTEGER" property="id" />
|
|
|
|
<result column="tower_id" jdbcType="INTEGER" property="towerid"/>
|
|
|
|
<result column="tower_id" jdbcType="INTEGER" property="towerid" />
|
|
|
|
<result column="cmdid" jdbcType="VARCHAR" property="cmdid"/>
|
|
|
|
<result column="cmdid" jdbcType="VARCHAR" property="cmdid" />
|
|
|
|
<result column="equip_name" jdbcType="VARCHAR" property="equipname"/>
|
|
|
|
<result column="equip_name" jdbcType="VARCHAR" property="equipname" />
|
|
|
|
<result column="display_name" jdbcType="VARCHAR" property="displayname"/>
|
|
|
|
<result column="display_name" jdbcType="VARCHAR" property="displayname" />
|
|
|
|
<result column="model" jdbcType="VARCHAR" property="model"/>
|
|
|
|
<result column="model" jdbcType="VARCHAR" property="model" />
|
|
|
|
<result column="protocol" jdbcType="INTEGER" property="protocol"/>
|
|
|
|
<result column="protocol" jdbcType="INTEGER" property="protocol" />
|
|
|
|
<result column="last_heartbeat" jdbcType="BIGINT" property="lastheartbeat"/>
|
|
|
|
<result column="last_heartbeat" jdbcType="BIGINT" property="lastheartbeat" />
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
<sql id="Example_Where_Clause">
|
|
|
|
term_id, last_heartbeat,last_heartbeat_ip,last_heartbeat_port, last_frame_no, battery_voltage, op_temperature, battery_capacity,
|
|
|
|
<where>
|
|
|
|
floating_charge, total_working_time, working_time,connection_state, signal_strength_4g,
|
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
|
signal_strength_2g,send_flow, recv_flow,ws_update_time,remaining_ram, remaining_rom, boot_time, rs_update_time, gps_status
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
|
|
|
<choose>
|
|
|
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
|
|
|
#{listItem}
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
</choose>
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
|
|
|
|
|
<if test="criteria.valid">
|
|
|
|
|
|
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
|
|
|
|
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
|
|
|
|
|
|
<choose>
|
|
|
|
|
|
|
|
<when test="criterion.noValue">
|
|
|
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
<when test="criterion.singleValue">
|
|
|
|
|
|
|
|
and ${criterion.condition} #{criterion.value}
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
<when test="criterion.betweenValue">
|
|
|
|
|
|
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
<when test="criterion.listValue">
|
|
|
|
|
|
|
|
and ${criterion.condition}
|
|
|
|
|
|
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
|
|
|
|
|
|
#{listItem}
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</when>
|
|
|
|
|
|
|
|
</choose>
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</foreach>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
|
|
|
term_id, last_heartbeat, last_heartbeat_ip, last_heartbeat_port, last_frame_no, battery_voltage,
|
|
|
|
|
|
|
|
op_temperature, battery_capacity, floating_charge, total_working_time, working_time,
|
|
|
|
|
|
|
|
connection_state, send_flow, recv_flow, ws_update_time, signal_strength_4g, signal_strength_2g,
|
|
|
|
|
|
|
|
remaining_ram, remaining_rom, boot_time, rs_update_time, gps_status
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
|
|
|
|
select
|
|
|
|
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
|
|
|
|
from terminal_status
|
|
|
|
|
|
|
|
where term_id = #{termId,jdbcType=INTEGER}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectByCmdId" resultMap="heartResultMap">
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectByCmdId" resultMap="heartResultMap">
|
|
|
|
select
|
|
|
|
select
|
|
|
|
b.id as term_id,
|
|
|
|
b.id as term_id,
|
|
|
|
b.tower_id as tower_id,
|
|
|
|
b.tower_id as tower_id,
|
|
|
@ -62,199 +116,375 @@
|
|
|
|
terminals b
|
|
|
|
terminals b
|
|
|
|
where a.term_id = b.id and b.cmdid = #{cmdid}
|
|
|
|
where a.term_id = b.id and b.cmdid = #{cmdid}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.TerminalStatusExample" resultMap="BaseResultMap">
|
|
|
|
<select id="selectAll" resultMap="BaseResultMap">
|
|
|
|
select
|
|
|
|
select
|
|
|
|
<if test="distinct">
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
distinct
|
|
|
|
from terminal_status
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
|
|
|
from terminal_status
|
|
|
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<select id="selectTerminalInfo" resultType="com.shxy.xymanager_common.dto.TerminalInfoDto">
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
select
|
|
|
|
</if>
|
|
|
|
ts.term_id termId, ts.battery_voltage batteryVoltage, ts.battery_capacity batteryCapacity, ts.floating_charge floatingCharge, ts.total_working_time totalWorkingTime,
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
ts.working_time workingTime, ts.connection_state connectionState, ts.ws_update_time wsUpdateTime,t.cmdid cmId
|
|
|
|
order by ${orderByClause}
|
|
|
|
from terminal_status ts left join terminals t on ts.term_id = t.id
|
|
|
|
</if>
|
|
|
|
where ts.term_id = #{termId,jdbcType=INTEGER}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
select
|
|
|
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
|
|
|
from terminal_status
|
|
|
|
|
|
|
|
where term_id = #{termId,jdbcType=INTEGER}
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
delete from terminal_status
|
|
|
|
delete from terminal_status
|
|
|
|
where term_id = #{termId,jdbcType=INTEGER}
|
|
|
|
where term_id = #{termId,jdbcType=INTEGER}
|
|
|
|
</delete>
|
|
|
|
</delete>
|
|
|
|
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalStatus">
|
|
|
|
<delete id="deleteByExample" parameterType="com.shxy.xymanager_common.entity.TerminalStatusExample">
|
|
|
|
insert into terminal_status (term_id, last_heartbeat, last_frame_no,
|
|
|
|
delete from terminal_status
|
|
|
|
battery_voltage, op_temperature, battery_capacity,
|
|
|
|
<if test="_parameter != null">
|
|
|
|
floating_charge, total_working_time, working_time,
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
connection_state, signal_strength_4g, signal_strength_2g,
|
|
|
|
</if>
|
|
|
|
remaining_ram, remaining_rom, start_time,
|
|
|
|
</delete>
|
|
|
|
update_time)
|
|
|
|
<insert id="insert" parameterType="com.shxy.xymanager_common.entity.TerminalStatus">
|
|
|
|
values (#{termId,jdbcType=INTEGER}, #{lastHeartbeat,jdbcType=TIMESTAMP}, #{lastFrameNo,jdbcType=SMALLINT},
|
|
|
|
insert into terminal_status (term_id, last_heartbeat, last_heartbeat_ip,
|
|
|
|
#{batteryVoltage,jdbcType=REAL}, #{opTemperature,jdbcType=REAL}, #{batteryCapacity,jdbcType=REAL},
|
|
|
|
last_heartbeat_port, last_frame_no, battery_voltage,
|
|
|
|
#{floatingCharge,jdbcType=TINYINT}, #{totalWorkingTime,jdbcType=INTEGER}, #{workingTime,jdbcType=INTEGER},
|
|
|
|
op_temperature, battery_capacity, floating_charge,
|
|
|
|
#{connectionState,jdbcType=TINYINT}, #{signalStrength4g,jdbcType=TINYINT}, #{signalStrength2g,jdbcType=TINYINT},
|
|
|
|
total_working_time, working_time, connection_state,
|
|
|
|
#{remainingRam,jdbcType=TINYINT}, #{remainingRom,jdbcType=TINYINT}, #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
send_flow, recv_flow, ws_update_time,
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP})
|
|
|
|
signal_strength_4g, signal_strength_2g, remaining_ram,
|
|
|
|
|
|
|
|
remaining_rom, boot_time, rs_update_time,
|
|
|
|
|
|
|
|
gps_status)
|
|
|
|
|
|
|
|
values (#{termId,jdbcType=INTEGER}, #{lastHeartbeat,jdbcType=BIGINT}, #{lastHeartbeatIp,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
#{lastHeartbeatPort,jdbcType=SMALLINT}, #{lastFrameNo,jdbcType=SMALLINT}, #{batteryVoltage,jdbcType=REAL},
|
|
|
|
|
|
|
|
#{opTemperature,jdbcType=REAL}, #{batteryCapacity,jdbcType=REAL}, #{floatingCharge,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
#{totalWorkingTime,jdbcType=INTEGER}, #{workingTime,jdbcType=INTEGER}, #{connectionState,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
#{sendFlow,jdbcType=INTEGER}, #{recvFlow,jdbcType=INTEGER}, #{wsUpdateTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
#{signalStrength4g,jdbcType=TINYINT}, #{signalStrength2g,jdbcType=TINYINT}, #{remainingRam,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
#{remainingRom,jdbcType=SMALLINT}, #{bootTime,jdbcType=BIGINT}, #{rsUpdateTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
#{gpsStatus,jdbcType=INTEGER})
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalStatus">
|
|
|
|
|
|
|
|
insert into terminal_status
|
|
|
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="termId != null">
|
|
|
|
|
|
|
|
term_id,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastHeartbeat != null">
|
|
|
|
|
|
|
|
last_heartbeat,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastHeartbeatIp != null">
|
|
|
|
|
|
|
|
last_heartbeat_ip,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastHeartbeatPort != null">
|
|
|
|
|
|
|
|
last_heartbeat_port,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastFrameNo != null">
|
|
|
|
|
|
|
|
last_frame_no,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="batteryVoltage != null">
|
|
|
|
|
|
|
|
battery_voltage,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="opTemperature != null">
|
|
|
|
|
|
|
|
op_temperature,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="batteryCapacity != null">
|
|
|
|
|
|
|
|
battery_capacity,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="floatingCharge != null">
|
|
|
|
|
|
|
|
floating_charge,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="totalWorkingTime != null">
|
|
|
|
|
|
|
|
total_working_time,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="workingTime != null">
|
|
|
|
|
|
|
|
working_time,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="connectionState != null">
|
|
|
|
|
|
|
|
connection_state,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="sendFlow != null">
|
|
|
|
|
|
|
|
send_flow,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="recvFlow != null">
|
|
|
|
|
|
|
|
recv_flow,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="wsUpdateTime != null">
|
|
|
|
|
|
|
|
ws_update_time,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="signalStrength4g != null">
|
|
|
|
|
|
|
|
signal_strength_4g,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="signalStrength2g != null">
|
|
|
|
|
|
|
|
signal_strength_2g,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remainingRam != null">
|
|
|
|
|
|
|
|
remaining_ram,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remainingRom != null">
|
|
|
|
|
|
|
|
remaining_rom,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="bootTime != null">
|
|
|
|
|
|
|
|
boot_time,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="rsUpdateTime != null">
|
|
|
|
|
|
|
|
rs_update_time,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="gpsStatus != null">
|
|
|
|
|
|
|
|
gps_status,
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
|
|
|
<if test="termId != null">
|
|
|
|
|
|
|
|
#{termId,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastHeartbeat != null">
|
|
|
|
|
|
|
|
#{lastHeartbeat,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastHeartbeatIp != null">
|
|
|
|
|
|
|
|
#{lastHeartbeatIp,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastHeartbeatPort != null">
|
|
|
|
|
|
|
|
#{lastHeartbeatPort,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastFrameNo != null">
|
|
|
|
|
|
|
|
#{lastFrameNo,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="batteryVoltage != null">
|
|
|
|
|
|
|
|
#{batteryVoltage,jdbcType=REAL},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="opTemperature != null">
|
|
|
|
|
|
|
|
#{opTemperature,jdbcType=REAL},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="batteryCapacity != null">
|
|
|
|
|
|
|
|
#{batteryCapacity,jdbcType=REAL},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="floatingCharge != null">
|
|
|
|
|
|
|
|
#{floatingCharge,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="totalWorkingTime != null">
|
|
|
|
|
|
|
|
#{totalWorkingTime,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="workingTime != null">
|
|
|
|
|
|
|
|
#{workingTime,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="connectionState != null">
|
|
|
|
|
|
|
|
#{connectionState,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="sendFlow != null">
|
|
|
|
|
|
|
|
#{sendFlow,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="recvFlow != null">
|
|
|
|
|
|
|
|
#{recvFlow,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="wsUpdateTime != null">
|
|
|
|
|
|
|
|
#{wsUpdateTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="signalStrength4g != null">
|
|
|
|
|
|
|
|
#{signalStrength4g,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="signalStrength2g != null">
|
|
|
|
|
|
|
|
#{signalStrength2g,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remainingRam != null">
|
|
|
|
|
|
|
|
#{remainingRam,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remainingRom != null">
|
|
|
|
|
|
|
|
#{remainingRom,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="bootTime != null">
|
|
|
|
|
|
|
|
#{bootTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="rsUpdateTime != null">
|
|
|
|
|
|
|
|
#{rsUpdateTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="gpsStatus != null">
|
|
|
|
|
|
|
|
#{gpsStatus,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.TerminalStatus">
|
|
|
|
<select id="countByExample" parameterType="com.shxy.xymanager_common.entity.TerminalStatusExample" resultType="java.lang.Long">
|
|
|
|
insert into terminal_status
|
|
|
|
select count(*) from terminal_status
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<if test="termId != null">
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
term_id,
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</select>
|
|
|
|
<if test="lastHeartbeat != null">
|
|
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
|
|
last_heartbeat,
|
|
|
|
update terminal_status
|
|
|
|
</if>
|
|
|
|
<set>
|
|
|
|
<if test="lastFrameNo != null">
|
|
|
|
<if test="record.termId != null">
|
|
|
|
last_frame_no,
|
|
|
|
term_id = #{record.termId,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="batteryVoltage != null">
|
|
|
|
<if test="record.lastHeartbeat != null">
|
|
|
|
battery_voltage,
|
|
|
|
last_heartbeat = #{record.lastHeartbeat,jdbcType=BIGINT},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="opTemperature != null">
|
|
|
|
<if test="record.lastHeartbeatIp != null">
|
|
|
|
op_temperature,
|
|
|
|
last_heartbeat_ip = #{record.lastHeartbeatIp,jdbcType=VARCHAR},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="batteryCapacity != null">
|
|
|
|
<if test="record.lastHeartbeatPort != null">
|
|
|
|
battery_capacity,
|
|
|
|
last_heartbeat_port = #{record.lastHeartbeatPort,jdbcType=SMALLINT},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="floatingCharge != null">
|
|
|
|
<if test="record.lastFrameNo != null">
|
|
|
|
floating_charge,
|
|
|
|
last_frame_no = #{record.lastFrameNo,jdbcType=SMALLINT},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="totalWorkingTime != null">
|
|
|
|
<if test="record.batteryVoltage != null">
|
|
|
|
total_working_time,
|
|
|
|
battery_voltage = #{record.batteryVoltage,jdbcType=REAL},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="workingTime != null">
|
|
|
|
<if test="record.opTemperature != null">
|
|
|
|
working_time,
|
|
|
|
op_temperature = #{record.opTemperature,jdbcType=REAL},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="connectionState != null">
|
|
|
|
<if test="record.batteryCapacity != null">
|
|
|
|
connection_state,
|
|
|
|
battery_capacity = #{record.batteryCapacity,jdbcType=REAL},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="signalStrength4g != null">
|
|
|
|
<if test="record.floatingCharge != null">
|
|
|
|
signal_strength_4g,
|
|
|
|
floating_charge = #{record.floatingCharge,jdbcType=TINYINT},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="signalStrength2g != null">
|
|
|
|
<if test="record.totalWorkingTime != null">
|
|
|
|
signal_strength_2g,
|
|
|
|
total_working_time = #{record.totalWorkingTime,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="remainingRam != null">
|
|
|
|
<if test="record.workingTime != null">
|
|
|
|
remaining_ram,
|
|
|
|
working_time = #{record.workingTime,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="remainingRom != null">
|
|
|
|
<if test="record.connectionState != null">
|
|
|
|
remaining_rom,
|
|
|
|
connection_state = #{record.connectionState,jdbcType=TINYINT},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="startTime != null">
|
|
|
|
<if test="record.sendFlow != null">
|
|
|
|
start_time,
|
|
|
|
send_flow = #{record.sendFlow,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="updateTime != null">
|
|
|
|
<if test="record.recvFlow != null">
|
|
|
|
update_time,
|
|
|
|
recv_flow = #{record.recvFlow,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</trim>
|
|
|
|
<if test="record.wsUpdateTime != null">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
ws_update_time = #{record.wsUpdateTime,jdbcType=BIGINT},
|
|
|
|
<if test="termId != null">
|
|
|
|
</if>
|
|
|
|
#{termId,jdbcType=INTEGER},
|
|
|
|
<if test="record.signalStrength4g != null">
|
|
|
|
</if>
|
|
|
|
signal_strength_4g = #{record.signalStrength4g,jdbcType=TINYINT},
|
|
|
|
<if test="lastHeartbeat != null">
|
|
|
|
</if>
|
|
|
|
#{lastHeartbeat,jdbcType=TIMESTAMP},
|
|
|
|
<if test="record.signalStrength2g != null">
|
|
|
|
</if>
|
|
|
|
signal_strength_2g = #{record.signalStrength2g,jdbcType=TINYINT},
|
|
|
|
<if test="lastFrameNo != null">
|
|
|
|
</if>
|
|
|
|
#{lastFrameNo,jdbcType=SMALLINT},
|
|
|
|
<if test="record.remainingRam != null">
|
|
|
|
</if>
|
|
|
|
remaining_ram = #{record.remainingRam,jdbcType=SMALLINT},
|
|
|
|
<if test="batteryVoltage != null">
|
|
|
|
</if>
|
|
|
|
#{batteryVoltage,jdbcType=REAL},
|
|
|
|
<if test="record.remainingRom != null">
|
|
|
|
</if>
|
|
|
|
remaining_rom = #{record.remainingRom,jdbcType=SMALLINT},
|
|
|
|
<if test="opTemperature != null">
|
|
|
|
</if>
|
|
|
|
#{opTemperature,jdbcType=REAL},
|
|
|
|
<if test="record.bootTime != null">
|
|
|
|
</if>
|
|
|
|
boot_time = #{record.bootTime,jdbcType=BIGINT},
|
|
|
|
<if test="batteryCapacity != null">
|
|
|
|
</if>
|
|
|
|
#{batteryCapacity,jdbcType=REAL},
|
|
|
|
<if test="record.rsUpdateTime != null">
|
|
|
|
</if>
|
|
|
|
rs_update_time = #{record.rsUpdateTime,jdbcType=BIGINT},
|
|
|
|
<if test="floatingCharge != null">
|
|
|
|
</if>
|
|
|
|
#{floatingCharge,jdbcType=TINYINT},
|
|
|
|
<if test="record.gpsStatus != null">
|
|
|
|
</if>
|
|
|
|
gps_status = #{record.gpsStatus,jdbcType=INTEGER},
|
|
|
|
<if test="totalWorkingTime != null">
|
|
|
|
</if>
|
|
|
|
#{totalWorkingTime,jdbcType=INTEGER},
|
|
|
|
</set>
|
|
|
|
</if>
|
|
|
|
<if test="_parameter != null">
|
|
|
|
<if test="workingTime != null">
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
#{workingTime,jdbcType=INTEGER},
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</update>
|
|
|
|
<if test="connectionState != null">
|
|
|
|
<update id="updateByExample" parameterType="map">
|
|
|
|
#{connectionState,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="signalStrength4g != null">
|
|
|
|
|
|
|
|
#{signalStrength4g,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="signalStrength2g != null">
|
|
|
|
|
|
|
|
#{signalStrength2g,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remainingRam != null">
|
|
|
|
|
|
|
|
#{remainingRam,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remainingRom != null">
|
|
|
|
|
|
|
|
#{remainingRom,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="startTime != null">
|
|
|
|
|
|
|
|
#{startTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalStatus">
|
|
|
|
|
|
|
|
update terminal_status
|
|
|
|
|
|
|
|
<set>
|
|
|
|
|
|
|
|
<if test="lastHeartbeat != null">
|
|
|
|
|
|
|
|
last_heartbeat = #{lastHeartbeat,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastFrameNo != null">
|
|
|
|
|
|
|
|
last_frame_no = #{lastFrameNo,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="batteryVoltage != null">
|
|
|
|
|
|
|
|
battery_voltage = #{batteryVoltage,jdbcType=REAL},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="opTemperature != null">
|
|
|
|
|
|
|
|
op_temperature = #{opTemperature,jdbcType=REAL},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="batteryCapacity != null">
|
|
|
|
|
|
|
|
battery_capacity = #{batteryCapacity,jdbcType=REAL},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="floatingCharge != null">
|
|
|
|
|
|
|
|
floating_charge = #{floatingCharge,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="totalWorkingTime != null">
|
|
|
|
|
|
|
|
total_working_time = #{totalWorkingTime,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="workingTime != null">
|
|
|
|
|
|
|
|
working_time = #{workingTime,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="gpsStatus != null">
|
|
|
|
|
|
|
|
gps_status = #{gpsStatus},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="connectionState != null">
|
|
|
|
|
|
|
|
connection_state = #{connectionState,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="signalStrength4g != null">
|
|
|
|
|
|
|
|
signal_strength_4g = #{signalStrength4g,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="signalStrength2g != null">
|
|
|
|
|
|
|
|
signal_strength_2g = #{signalStrength2g,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remainingRam != null">
|
|
|
|
|
|
|
|
remaining_ram = #{remainingRam,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remainingRom != null">
|
|
|
|
|
|
|
|
remaining_rom = #{remainingRom,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="bootTime != null">
|
|
|
|
|
|
|
|
boot_time = #{bootTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
|
|
|
rs_update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</set>
|
|
|
|
|
|
|
|
where term_id = #{termId,jdbcType=INTEGER}
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalStatus">
|
|
|
|
|
|
|
|
update terminal_status
|
|
|
|
update terminal_status
|
|
|
|
set last_heartbeat = #{lastHeartbeat,jdbcType=TIMESTAMP},
|
|
|
|
set term_id = #{record.termId,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
last_heartbeat = #{record.lastHeartbeat,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
last_heartbeat_ip = #{record.lastHeartbeatIp,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
last_heartbeat_port = #{record.lastHeartbeatPort,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
last_frame_no = #{record.lastFrameNo,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
battery_voltage = #{record.batteryVoltage,jdbcType=REAL},
|
|
|
|
|
|
|
|
op_temperature = #{record.opTemperature,jdbcType=REAL},
|
|
|
|
|
|
|
|
battery_capacity = #{record.batteryCapacity,jdbcType=REAL},
|
|
|
|
|
|
|
|
floating_charge = #{record.floatingCharge,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
total_working_time = #{record.totalWorkingTime,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
working_time = #{record.workingTime,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
connection_state = #{record.connectionState,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
send_flow = #{record.sendFlow,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
recv_flow = #{record.recvFlow,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
ws_update_time = #{record.wsUpdateTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
signal_strength_4g = #{record.signalStrength4g,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
signal_strength_2g = #{record.signalStrength2g,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
remaining_ram = #{record.remainingRam,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
remaining_rom = #{record.remainingRom,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
boot_time = #{record.bootTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
rs_update_time = #{record.rsUpdateTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
gps_status = #{record.gpsStatus,jdbcType=INTEGER}
|
|
|
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.TerminalStatus">
|
|
|
|
|
|
|
|
update terminal_status
|
|
|
|
|
|
|
|
<set>
|
|
|
|
|
|
|
|
<if test="lastHeartbeat != null">
|
|
|
|
|
|
|
|
last_heartbeat = #{lastHeartbeat,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastHeartbeatIp != null">
|
|
|
|
|
|
|
|
last_heartbeat_ip = #{lastHeartbeatIp,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastHeartbeatPort != null">
|
|
|
|
|
|
|
|
last_heartbeat_port = #{lastHeartbeatPort,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="lastFrameNo != null">
|
|
|
|
|
|
|
|
last_frame_no = #{lastFrameNo,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="batteryVoltage != null">
|
|
|
|
|
|
|
|
battery_voltage = #{batteryVoltage,jdbcType=REAL},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="opTemperature != null">
|
|
|
|
|
|
|
|
op_temperature = #{opTemperature,jdbcType=REAL},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="batteryCapacity != null">
|
|
|
|
|
|
|
|
battery_capacity = #{batteryCapacity,jdbcType=REAL},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="floatingCharge != null">
|
|
|
|
|
|
|
|
floating_charge = #{floatingCharge,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="totalWorkingTime != null">
|
|
|
|
|
|
|
|
total_working_time = #{totalWorkingTime,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="workingTime != null">
|
|
|
|
|
|
|
|
working_time = #{workingTime,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="connectionState != null">
|
|
|
|
|
|
|
|
connection_state = #{connectionState,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="sendFlow != null">
|
|
|
|
|
|
|
|
send_flow = #{sendFlow,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="recvFlow != null">
|
|
|
|
|
|
|
|
recv_flow = #{recvFlow,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="wsUpdateTime != null">
|
|
|
|
|
|
|
|
ws_update_time = #{wsUpdateTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="signalStrength4g != null">
|
|
|
|
|
|
|
|
signal_strength_4g = #{signalStrength4g,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="signalStrength2g != null">
|
|
|
|
|
|
|
|
signal_strength_2g = #{signalStrength2g,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remainingRam != null">
|
|
|
|
|
|
|
|
remaining_ram = #{remainingRam,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="remainingRom != null">
|
|
|
|
|
|
|
|
remaining_rom = #{remainingRom,jdbcType=SMALLINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="bootTime != null">
|
|
|
|
|
|
|
|
boot_time = #{bootTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="rsUpdateTime != null">
|
|
|
|
|
|
|
|
rs_update_time = #{rsUpdateTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="gpsStatus != null">
|
|
|
|
|
|
|
|
gps_status = #{gpsStatus,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</set>
|
|
|
|
|
|
|
|
where term_id = #{termId,jdbcType=INTEGER}
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.TerminalStatus">
|
|
|
|
|
|
|
|
update terminal_status
|
|
|
|
|
|
|
|
set last_heartbeat = #{lastHeartbeat,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
last_heartbeat_ip = #{lastHeartbeatIp,jdbcType=VARCHAR},
|
|
|
|
|
|
|
|
last_heartbeat_port = #{lastHeartbeatPort,jdbcType=SMALLINT},
|
|
|
|
last_frame_no = #{lastFrameNo,jdbcType=SMALLINT},
|
|
|
|
last_frame_no = #{lastFrameNo,jdbcType=SMALLINT},
|
|
|
|
battery_voltage = #{batteryVoltage,jdbcType=REAL},
|
|
|
|
battery_voltage = #{batteryVoltage,jdbcType=REAL},
|
|
|
|
op_temperature = #{opTemperature,jdbcType=REAL},
|
|
|
|
op_temperature = #{opTemperature,jdbcType=REAL},
|
|
|
@ -263,12 +493,20 @@
|
|
|
|
total_working_time = #{totalWorkingTime,jdbcType=INTEGER},
|
|
|
|
total_working_time = #{totalWorkingTime,jdbcType=INTEGER},
|
|
|
|
working_time = #{workingTime,jdbcType=INTEGER},
|
|
|
|
working_time = #{workingTime,jdbcType=INTEGER},
|
|
|
|
connection_state = #{connectionState,jdbcType=TINYINT},
|
|
|
|
connection_state = #{connectionState,jdbcType=TINYINT},
|
|
|
|
|
|
|
|
send_flow = #{sendFlow,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
recv_flow = #{recvFlow,jdbcType=INTEGER},
|
|
|
|
|
|
|
|
ws_update_time = #{wsUpdateTime,jdbcType=BIGINT},
|
|
|
|
signal_strength_4g = #{signalStrength4g,jdbcType=TINYINT},
|
|
|
|
signal_strength_4g = #{signalStrength4g,jdbcType=TINYINT},
|
|
|
|
signal_strength_2g = #{signalStrength2g,jdbcType=TINYINT},
|
|
|
|
signal_strength_2g = #{signalStrength2g,jdbcType=TINYINT},
|
|
|
|
remaining_ram = #{remainingRam,jdbcType=TINYINT},
|
|
|
|
remaining_ram = #{remainingRam,jdbcType=SMALLINT},
|
|
|
|
remaining_rom = #{remainingRom,jdbcType=TINYINT},
|
|
|
|
remaining_rom = #{remainingRom,jdbcType=SMALLINT},
|
|
|
|
start_time = #{startTime,jdbcType=TIMESTAMP},
|
|
|
|
boot_time = #{bootTime,jdbcType=BIGINT},
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
|
rs_update_time = #{rsUpdateTime,jdbcType=BIGINT},
|
|
|
|
|
|
|
|
gps_status = #{gpsStatus,jdbcType=INTEGER}
|
|
|
|
where term_id = #{termId,jdbcType=INTEGER}
|
|
|
|
where term_id = #{termId,jdbcType=INTEGER}
|
|
|
|
</update>
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|