|
|
|
@ -3,12 +3,19 @@
|
|
|
|
|
<mapper namespace="com.shxy.xymanager_dao.dao.TerminalsDao">
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.shxy.xymanager_common.entity.Terminals">
|
|
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
|
|
<result column="line_id" jdbcType="INTEGER" property="lineid" />
|
|
|
|
|
<result column="tower_id" jdbcType="INTEGER" property="towerid" />
|
|
|
|
|
<result column="line_id" jdbcType="INTEGER" property="lineId" />
|
|
|
|
|
<result column="tower_id" jdbcType="INTEGER" property="towerId" />
|
|
|
|
|
<result column="cmdid" jdbcType="VARCHAR" property="cmdid" />
|
|
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
|
|
|
<result column="online_status" jdbcType="TINYINT" property="onlineStatus" />
|
|
|
|
|
<result column="dev_type" jdbcType="TINYINT" property="devType" />
|
|
|
|
|
<result column="org_id" jdbcType="SMALLINT" property="orgId" />
|
|
|
|
|
<result column="sn" jdbcType="VARCHAR" property="sn" />
|
|
|
|
|
<result column="iccid" jdbcType="VARCHAR" property="iccid" />
|
|
|
|
|
<result column="protocol" jdbcType="INTEGER" property="protocol" />
|
|
|
|
|
<result column="phase" jdbcType="VARCHAR" property="phase" />
|
|
|
|
|
<result column="equipment_type" jdbcType="VARCHAR" property="equipmentType" />
|
|
|
|
|
<result column="cellphone" jdbcType="VARCHAR" property="cellphone" />
|
|
|
|
|
<result column="equip_name" jdbcType="VARCHAR" property="equipName" />
|
|
|
|
|
<result column="display_name" jdbcType="VARCHAR" property="displayName" />
|
|
|
|
|
<result column="model" jdbcType="VARCHAR" property="model" />
|
|
|
|
@ -16,16 +23,16 @@
|
|
|
|
|
<result column="has_pan" jdbcType="TINYINT" property="hasPan" />
|
|
|
|
|
<result column="bs_manufacturer" jdbcType="VARCHAR" property="bsManufacturer" />
|
|
|
|
|
<result column="bs_production_date" jdbcType="DATE" property="bsProductionDate" />
|
|
|
|
|
<result column="working_date" jdbcType="DATE" property="workingDate" />
|
|
|
|
|
<result column="bs_identifier" jdbcType="VARCHAR" property="bsIdentifier" />
|
|
|
|
|
<result column="sim" jdbcType="VARCHAR" property="sim" />
|
|
|
|
|
<result column="latitude" jdbcType="DOUBLE" property="latitude" />
|
|
|
|
|
<result column="longitude" jdbcType="DOUBLE" property="longitude" />
|
|
|
|
|
<result column="status" jdbcType="INTEGER" property="status" />
|
|
|
|
|
<result column="net_type" jdbcType="INTEGER" property="netType" />
|
|
|
|
|
<result column="dev_type" jdbcType="INTEGER" property="devType" />
|
|
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
|
|
<result column="sim" jdbcType="VARCHAR" property="sim" />
|
|
|
|
|
<result column="working_date" jdbcType="DATE" property="workingDate" />
|
|
|
|
|
<result column="net_type" jdbcType="TINYINT" property="netType" />
|
|
|
|
|
<result column="password" jdbcType="VARCHAR" property="password" />
|
|
|
|
|
<result column="isfavor" jdbcType="INTEGER" property="isfavor" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap id="TermAndStatusMap" type="com.shxy.xymanager_common.dto.TerminalsAndStatusDto">
|
|
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
|
@ -162,8 +169,28 @@
|
|
|
|
|
id, line_id, tower_id, cmdid, status, online_status, dev_type, org_id, sn, iccid,
|
|
|
|
|
protocol, phase, equipment_type, cellphone, equip_name, display_name, model, essential_info_version,
|
|
|
|
|
has_pan, bs_manufacturer, bs_production_date, bs_identifier, latitude, longitude,
|
|
|
|
|
create_time, update_time, sim, working_date, net_type, password
|
|
|
|
|
create_time, update_time, sim, working_date, net_type, password, isfavor
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.TerminalsExample" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
|
</if>
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from terminals
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from terminals
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
|
delete from terminals
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
@ -198,6 +225,199 @@
|
|
|
|
|
#{workingDate,jdbcType=DATE}, #{netType,jdbcType=TINYINT}, #{password,jdbcType=VARCHAR},
|
|
|
|
|
#{isfavor,jdbcType=INTEGER})
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.Terminals" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
insert into terminals
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="lineId != null">
|
|
|
|
|
line_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="towerId != null">
|
|
|
|
|
tower_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cmdid != null">
|
|
|
|
|
cmdid,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
status,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="onlineStatus != null">
|
|
|
|
|
online_status,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="devType != null">
|
|
|
|
|
dev_type,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orgId != null">
|
|
|
|
|
org_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sn != null">
|
|
|
|
|
sn,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="iccid != null">
|
|
|
|
|
iccid,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="protocol != null">
|
|
|
|
|
protocol,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="phase != null">
|
|
|
|
|
phase,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentType != null">
|
|
|
|
|
equipment_type,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cellphone != null">
|
|
|
|
|
cellphone,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipName != null">
|
|
|
|
|
equip_name,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="displayName != null">
|
|
|
|
|
display_name,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="model != null">
|
|
|
|
|
model,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="essentialInfoVersion != null">
|
|
|
|
|
essential_info_version,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="hasPan != null">
|
|
|
|
|
has_pan,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsManufacturer != null">
|
|
|
|
|
bs_manufacturer,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsProductionDate != null">
|
|
|
|
|
bs_production_date,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsIdentifier != null">
|
|
|
|
|
bs_identifier,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="latitude != null">
|
|
|
|
|
latitude,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="longitude != null">
|
|
|
|
|
longitude,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
create_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sim != null">
|
|
|
|
|
sim,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="workingDate != null">
|
|
|
|
|
working_date,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="netType != null">
|
|
|
|
|
net_type,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="password != null">
|
|
|
|
|
password,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isfavor != null">
|
|
|
|
|
isfavor,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="lineId != null">
|
|
|
|
|
#{lineId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="towerId != null">
|
|
|
|
|
#{towerId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cmdid != null">
|
|
|
|
|
#{cmdid,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
#{status,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="onlineStatus != null">
|
|
|
|
|
#{onlineStatus,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="devType != null">
|
|
|
|
|
#{devType,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orgId != null">
|
|
|
|
|
#{orgId,jdbcType=SMALLINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sn != null">
|
|
|
|
|
#{sn,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="iccid != null">
|
|
|
|
|
#{iccid,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="protocol != null">
|
|
|
|
|
#{protocol,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="phase != null">
|
|
|
|
|
#{phase,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentType != null">
|
|
|
|
|
#{equipmentType,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cellphone != null">
|
|
|
|
|
#{cellphone,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipName != null">
|
|
|
|
|
#{equipName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="displayName != null">
|
|
|
|
|
#{displayName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="model != null">
|
|
|
|
|
#{model,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="essentialInfoVersion != null">
|
|
|
|
|
#{essentialInfoVersion,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="hasPan != null">
|
|
|
|
|
#{hasPan,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsManufacturer != null">
|
|
|
|
|
#{bsManufacturer,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsProductionDate != null">
|
|
|
|
|
#{bsProductionDate,jdbcType=DATE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsIdentifier != null">
|
|
|
|
|
#{bsIdentifier,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="latitude != null">
|
|
|
|
|
#{latitude,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="longitude != null">
|
|
|
|
|
#{longitude,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sim != null">
|
|
|
|
|
#{sim,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="workingDate != null">
|
|
|
|
|
#{workingDate,jdbcType=DATE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="netType != null">
|
|
|
|
|
#{netType,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="password != null">
|
|
|
|
|
#{password,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isfavor != null">
|
|
|
|
|
#{isfavor,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<select id="countByExample" parameterType="com.shxy.xymanager_common.entity.TerminalsExample" resultType="java.lang.Long">
|
|
|
|
|
select count(*) from terminals
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
@ -342,21 +562,136 @@
|
|
|
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<select id="selectByExample" parameterType="com.shxy.xymanager_common.entity.TerminalsExample" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<if test="distinct">
|
|
|
|
|
distinct
|
|
|
|
|
</if>
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from terminals
|
|
|
|
|
<if test="_parameter != null">
|
|
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderByClause != null">
|
|
|
|
|
order by ${orderByClause}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.shxy.xymanager_common.entity.Terminals">
|
|
|
|
|
update terminals
|
|
|
|
|
<set>
|
|
|
|
|
<if test="lineId != null">
|
|
|
|
|
line_id = #{lineId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="towerId != null">
|
|
|
|
|
tower_id = #{towerId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cmdid != null">
|
|
|
|
|
cmdid = #{cmdid,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="onlineStatus != null">
|
|
|
|
|
online_status = #{onlineStatus,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="devType != null">
|
|
|
|
|
dev_type = #{devType,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orgId != null">
|
|
|
|
|
org_id = #{orgId,jdbcType=SMALLINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sn != null">
|
|
|
|
|
sn = #{sn,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="iccid != null">
|
|
|
|
|
iccid = #{iccid,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="protocol != null">
|
|
|
|
|
protocol = #{protocol,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="phase != null">
|
|
|
|
|
phase = #{phase,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipmentType != null">
|
|
|
|
|
equipment_type = #{equipmentType,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cellphone != null">
|
|
|
|
|
cellphone = #{cellphone,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipName != null">
|
|
|
|
|
equip_name = #{equipName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="displayName != null">
|
|
|
|
|
display_name = #{displayName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="model != null">
|
|
|
|
|
model = #{model,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="essentialInfoVersion != null">
|
|
|
|
|
essential_info_version = #{essentialInfoVersion,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="hasPan != null">
|
|
|
|
|
has_pan = #{hasPan,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsManufacturer != null">
|
|
|
|
|
bs_manufacturer = #{bsManufacturer,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsProductionDate != null">
|
|
|
|
|
bs_production_date = #{bsProductionDate,jdbcType=DATE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsIdentifier != null">
|
|
|
|
|
bs_identifier = #{bsIdentifier,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="latitude != null">
|
|
|
|
|
latitude = #{latitude,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="longitude != null">
|
|
|
|
|
longitude = #{longitude,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="sim != null">
|
|
|
|
|
sim = #{sim,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="workingDate != null">
|
|
|
|
|
working_date = #{workingDate,jdbcType=DATE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="netType != null">
|
|
|
|
|
net_type = #{netType,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="password != null">
|
|
|
|
|
password = #{password,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isfavor != null">
|
|
|
|
|
isfavor = #{isfavor,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.Terminals">
|
|
|
|
|
update terminals
|
|
|
|
|
set line_id = #{lineId,jdbcType=INTEGER},
|
|
|
|
|
tower_id = #{towerId,jdbcType=INTEGER},
|
|
|
|
|
cmdid = #{cmdid,jdbcType=VARCHAR},
|
|
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
|
|
online_status = #{onlineStatus,jdbcType=TINYINT},
|
|
|
|
|
dev_type = #{devType,jdbcType=TINYINT},
|
|
|
|
|
org_id = #{orgId,jdbcType=SMALLINT},
|
|
|
|
|
sn = #{sn,jdbcType=VARCHAR},
|
|
|
|
|
iccid = #{iccid,jdbcType=VARCHAR},
|
|
|
|
|
protocol = #{protocol,jdbcType=INTEGER},
|
|
|
|
|
phase = #{phase,jdbcType=VARCHAR},
|
|
|
|
|
equipment_type = #{equipmentType,jdbcType=VARCHAR},
|
|
|
|
|
cellphone = #{cellphone,jdbcType=VARCHAR},
|
|
|
|
|
equip_name = #{equipName,jdbcType=VARCHAR},
|
|
|
|
|
display_name = #{displayName,jdbcType=VARCHAR},
|
|
|
|
|
model = #{model,jdbcType=VARCHAR},
|
|
|
|
|
essential_info_version = #{essentialInfoVersion,jdbcType=VARCHAR},
|
|
|
|
|
has_pan = #{hasPan,jdbcType=TINYINT},
|
|
|
|
|
bs_manufacturer = #{bsManufacturer,jdbcType=VARCHAR},
|
|
|
|
|
bs_production_date = #{bsProductionDate,jdbcType=DATE},
|
|
|
|
|
bs_identifier = #{bsIdentifier,jdbcType=VARCHAR},
|
|
|
|
|
latitude = #{latitude,jdbcType=DOUBLE},
|
|
|
|
|
longitude = #{longitude,jdbcType=DOUBLE},
|
|
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
sim = #{sim,jdbcType=VARCHAR},
|
|
|
|
|
working_date = #{workingDate,jdbcType=DATE},
|
|
|
|
|
net_type = #{netType,jdbcType=TINYINT},
|
|
|
|
|
password = #{password,jdbcType=VARCHAR},
|
|
|
|
|
isfavor = #{isfavor,jdbcType=INTEGER}
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<select id="selectByIdList" resultMap="ChannelAndTerm">
|
|
|
|
|
select
|
|
|
|
@ -382,7 +717,6 @@
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectList" resultMap="TermAndStatusMap">
|
|
|
|
|
select
|
|
|
|
|
d.id as id,
|
|
|
|
@ -450,75 +784,6 @@
|
|
|
|
|
order by d.create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectTermAndStatusList" resultMap="TermAndStatusMap">
|
|
|
|
|
select
|
|
|
|
|
d.id as id,
|
|
|
|
|
a.id as dy_id,
|
|
|
|
|
a.name as dy_name,
|
|
|
|
|
b.id as line_id,
|
|
|
|
|
b.name as line_name,
|
|
|
|
|
b.bs_manufacturer as line_bs_manufacturer,
|
|
|
|
|
c.id as tower_id,
|
|
|
|
|
c.name as tower_name,
|
|
|
|
|
d.cmdid as cmdid,
|
|
|
|
|
d.org_id as org_id,
|
|
|
|
|
d.equip_name as equip_name,
|
|
|
|
|
d.display_name as display_name,
|
|
|
|
|
d.model as model,
|
|
|
|
|
d.essential_info_version as essential_info_version,
|
|
|
|
|
d.has_pan as has_pan,
|
|
|
|
|
d.bs_manufacturer as bs_manufacturer,
|
|
|
|
|
d.bs_production_date as bs_production_date,
|
|
|
|
|
d.bs_identifier as bs_identifier,
|
|
|
|
|
d.latitude as latitude,
|
|
|
|
|
d.longitude as longitude,
|
|
|
|
|
d.status as status,
|
|
|
|
|
d.protocol as protocol,
|
|
|
|
|
d.sim as sim,
|
|
|
|
|
d.working_date as working_date,
|
|
|
|
|
d.net_type as net_type,
|
|
|
|
|
d.dev_type as dev_type,
|
|
|
|
|
d.phase as phase,
|
|
|
|
|
d.equipment_type as equipment_type,
|
|
|
|
|
e.last_heartbeat as last_heartbeat,
|
|
|
|
|
e.signal_strength_4g as signal_strength_4g,
|
|
|
|
|
e.boot_time as boot_time,
|
|
|
|
|
e.battery_capacity as battery_capacity,
|
|
|
|
|
e.battery_voltage as battery_voltage
|
|
|
|
|
from ((((dy_level a left join `lines` b on a.id = b.dy_level_id )
|
|
|
|
|
left join towers c on b.id = c.line_id )
|
|
|
|
|
inner join terminals d on c.id = d.tower_id )
|
|
|
|
|
left join terminal_status e on e.term_id = d.id)
|
|
|
|
|
<where>
|
|
|
|
|
true
|
|
|
|
|
<if test="status != null">
|
|
|
|
|
and d.status = #{status}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dyid != null and dyid != -1">
|
|
|
|
|
and a.id = #{dyid}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="lineid != null and lineid != -1">
|
|
|
|
|
and b.id = #{lineid}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="towerid != null and towerid != -1">
|
|
|
|
|
and c.id = #{towerid}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="search != null">
|
|
|
|
|
and (b.name like "%"#{search}"%" or c.name like "%"#{search}"%" or d.cmdid like "%"#{search}"%")
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isonline != null">
|
|
|
|
|
<if test="isonline == 0">
|
|
|
|
|
and e.last_heartbeat <![CDATA[<=]]> #{time}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isonline == 1">
|
|
|
|
|
and e.last_heartbeat <![CDATA[>=]]> #{time}
|
|
|
|
|
</if>
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
order by d.create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectTermAndStatusStatisticsList" resultMap="TermAndStatusMap">
|
|
|
|
|
select
|
|
|
|
|
a.id as id,
|
|
|
|
@ -579,42 +844,6 @@
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from terminals
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectByCmdid" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from terminals
|
|
|
|
|
where cmdid = #{cmdid} and status = #{status}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectByToweridAndLineid" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from terminals
|
|
|
|
|
where status = #{status}
|
|
|
|
|
<if test="toweridlist != null and toweridlist.size > 0">
|
|
|
|
|
and tower_id in
|
|
|
|
|
<foreach close=")" collection="toweridlist" index="index" item="id" open="(" separator=",">
|
|
|
|
|
#{id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectByTowerId" resultMap="BaseResultMap">
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from terminals
|
|
|
|
|
where status = #{status}
|
|
|
|
|
<if test="towerid != null">
|
|
|
|
|
and tower_id = #{towerid}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectTermAndPosition" resultMap="TermAndPositionMap">
|
|
|
|
|
select
|
|
|
|
@ -630,204 +859,5 @@
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertSelective" parameterType="com.shxy.xymanager_common.entity.Terminals">
|
|
|
|
|
insert into terminals
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cmdid != null">
|
|
|
|
|
cmdid,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orgId != null">
|
|
|
|
|
org_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipName != null">
|
|
|
|
|
equip_name,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="displayName != null">
|
|
|
|
|
display_name,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="model != null">
|
|
|
|
|
model,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="essentialInfoVersion != null">
|
|
|
|
|
essential_info_version,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="hasPan != null">
|
|
|
|
|
has_pan,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsManufacturer != null">
|
|
|
|
|
bs_manufacturer,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsProductionDate != null">
|
|
|
|
|
bs_production_date,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsIdentifier != null">
|
|
|
|
|
bs_identifier,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="latitude != null">
|
|
|
|
|
latitude,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="longitude != null">
|
|
|
|
|
longitude,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
create_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cmdid != null">
|
|
|
|
|
#{cmdid,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orgId != null">
|
|
|
|
|
#{orgId,jdbcType=SMALLINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="equipName != null">
|
|
|
|
|
#{equipName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="displayName != null">
|
|
|
|
|
#{displayName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="model != null">
|
|
|
|
|
#{model,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="essentialInfoVersion != null">
|
|
|
|
|
#{essentialInfoVersion,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="hasPan != null">
|
|
|
|
|
#{hasPan,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsManufacturer != null">
|
|
|
|
|
#{bsManufacturer,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsProductionDate != null">
|
|
|
|
|
#{bsProductionDate,jdbcType=DATE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="bsIdentifier != null">
|
|
|
|
|
#{bsIdentifier,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="latitude != null">
|
|
|
|
|
#{latitude,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="longitude != null">
|
|
|
|
|
#{longitude,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="createTime != null">
|
|
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="deleteById">
|
|
|
|
|
update terminals
|
|
|
|
|
set status = #{status},
|
|
|
|
|
update_time = #{updateat}
|
|
|
|
|
where id in
|
|
|
|
|
<foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
|
|
|
|
|
#{item.id}
|
|
|
|
|
</foreach>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<update id="updateByPrimaryKeySelective">
|
|
|
|
|
update terminals
|
|
|
|
|
<set>
|
|
|
|
|
<if test="record.lineid != null">
|
|
|
|
|
line_id = #{record.lineid},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.towerid != null">
|
|
|
|
|
tower_id = #{record.towerid},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.cmdid != null">
|
|
|
|
|
cmdid = #{record.cmdid},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.orgId != null">
|
|
|
|
|
org_id = #{record.orgId,jdbcType=SMALLINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.equipName != null">
|
|
|
|
|
equip_name = #{record.equipName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.displayName != null">
|
|
|
|
|
display_name = #{record.displayName,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.model != null">
|
|
|
|
|
model = #{record.model,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.essentialInfoVersion != null">
|
|
|
|
|
essential_info_version = #{record.essentialInfoVersion,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.hasPan != null">
|
|
|
|
|
has_pan = #{record.hasPan,jdbcType=TINYINT},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.bsManufacturer != null">
|
|
|
|
|
bs_manufacturer = #{record.bsManufacturer,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.bsProductionDate != null">
|
|
|
|
|
bs_production_date = #{record.bsProductionDate,jdbcType=DATE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.bsIdentifier != null">
|
|
|
|
|
bs_identifier = #{record.bsIdentifier,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.latitude != null">
|
|
|
|
|
latitude = #{record.latitude,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.longitude != null">
|
|
|
|
|
longitude = #{record.longitude,jdbcType=DOUBLE},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.updateTime != null">
|
|
|
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.sim != null">
|
|
|
|
|
sim = #{record.sim},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.netType != null">
|
|
|
|
|
net_type = #{record.netType},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.devType != null">
|
|
|
|
|
dev_type = #{record.devType},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.workingDate != null">
|
|
|
|
|
working_date = #{record.workingDate},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="record.protocol != null">
|
|
|
|
|
protocol = #{record.protocol},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{record.id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.shxy.xymanager_common.entity.Terminals">
|
|
|
|
|
update terminals
|
|
|
|
|
set cmdid = #{cmdid,jdbcType=VARCHAR},
|
|
|
|
|
org_id = #{orgId,jdbcType=SMALLINT},
|
|
|
|
|
equip_name = #{equipName,jdbcType=VARCHAR},
|
|
|
|
|
display_name = #{displayName,jdbcType=VARCHAR},
|
|
|
|
|
model = #{model,jdbcType=VARCHAR},
|
|
|
|
|
essential_info_version = #{essentialInfoVersion,jdbcType=VARCHAR},
|
|
|
|
|
has_pan = #{hasPan,jdbcType=TINYINT},
|
|
|
|
|
bs_manufacturer = #{bsManufacturer,jdbcType=VARCHAR},
|
|
|
|
|
bs_production_date = #{bsProductionDate,jdbcType=DATE},
|
|
|
|
|
bs_identifier = #{bsIdentifier,jdbcType=VARCHAR},
|
|
|
|
|
latitude = #{latitude,jdbcType=DOUBLE},
|
|
|
|
|
longitude = #{longitude,jdbcType=DOUBLE},
|
|
|
|
|
update_time = #{updateat}
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<select id="getCmdIdByTermId" resultType="java.lang.String">
|
|
|
|
|
select cmdid
|
|
|
|
|
from terminals
|
|
|
|
|
where id = #{termId,jdbcType=INTEGER}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|