|
@@ -0,0 +1,337 @@ |
|
|
|
|
|
<?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="com.ssjl.zhaobiao.guizhou.repository.DianxinGzDeviceConfigMapper"> |
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.ssjl.zhaobiao.guizhou.entity.DianxinGzDeviceConfig"> |
|
|
|
|
|
<id column="id" jdbcType="INTEGER" property="id" /> |
|
|
|
|
|
<result column="device_imei" jdbcType="VARCHAR" property="deviceImei" /> |
|
|
|
|
|
<result column="http_ip" jdbcType="VARCHAR" property="httpIp" /> |
|
|
|
|
|
<result column="http_url" jdbcType="VARCHAR" property="httpUrl" /> |
|
|
|
|
|
<result column="sms_number" jdbcType="VARCHAR" property="smsNumber" /> |
|
|
|
|
|
<result column="location_interval" jdbcType="VARCHAR" property="locationInterval" /> |
|
|
|
|
|
<result column="sleep_time" jdbcType="VARCHAR" property="sleepTime" /> |
|
|
|
|
|
<result column="affection_phone" jdbcType="VARCHAR" property="affectionPhone" /> |
|
|
|
|
|
<result column="sos_phone" jdbcType="VARCHAR" property="sosPhone" /> |
|
|
|
|
|
<result column="white_phone" jdbcType="VARCHAR" property="whitePhone" /> |
|
|
|
|
|
<result column="sms_white_phone" jdbcType="VARCHAR" property="smsWhitePhone" /> |
|
|
|
|
|
<result column="phone" jdbcType="VARCHAR" property="phone" /> |
|
|
|
|
|
<result column="clock_time" jdbcType="VARCHAR" property="clockTime" /> |
|
|
|
|
|
<result column="sms_set" jdbcType="VARCHAR" property="smsSet" /> |
|
|
|
|
|
<result column="address_book" jdbcType="VARCHAR" property="addressBook" /> |
|
|
|
|
|
<result column="sync_time" jdbcType="VARCHAR" property="syncTime" /> |
|
|
|
|
|
<result column="tcp_address" jdbcType="VARCHAR" property="tcpAddress" /> |
|
|
|
|
|
<result column="auto_shutdown" jdbcType="VARCHAR" property="autoShutdown" /> |
|
|
|
|
|
<result column="call_time" jdbcType="VARCHAR" property="callTime" /> |
|
|
|
|
|
<result column="location_mode" jdbcType="VARCHAR" property="locationMode" /> |
|
|
|
|
|
<result column="connect_type" jdbcType="VARCHAR" property="connectType" /> |
|
|
|
|
|
<result column="phone_type" jdbcType="VARCHAR" property="phoneType" /> |
|
|
|
|
|
<result column="rfid" jdbcType="VARCHAR" property="rfid" /> |
|
|
|
|
|
<result column="lat" jdbcType="INTEGER" property="lat" /> |
|
|
|
|
|
<result column="lon" jdbcType="INTEGER" property="lon" /> |
|
|
|
|
|
</resultMap> |
|
|
|
|
|
<sql id="Base_Column_List"> |
|
|
|
|
|
id, device_imei, http_ip, http_url, sms_number, location_interval, sleep_time, affection_phone, |
|
|
|
|
|
sos_phone, white_phone, sms_white_phone, phone, clock_time, sms_set, address_book, |
|
|
|
|
|
sync_time, tcp_address, auto_shutdown, call_time, location_mode, connect_type, phone_type, |
|
|
|
|
|
rfid, lat, lon |
|
|
|
|
|
</sql> |
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
|
|
|
|
|
select |
|
|
|
|
|
<include refid="Base_Column_List" /> |
|
|
|
|
|
from dianxin_gz_device_config |
|
|
|
|
|
where id = #{id,jdbcType=INTEGER} |
|
|
|
|
|
</select> |
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
|
|
|
|
|
delete from dianxin_gz_device_config |
|
|
|
|
|
where id = #{id,jdbcType=INTEGER} |
|
|
|
|
|
</delete> |
|
|
|
|
|
<insert id="insert" parameterType="com.ssjl.zhaobiao.guizhou.entity.DianxinGzDeviceConfig"> |
|
|
|
|
|
insert into dianxin_gz_device_config (id, device_imei, http_ip, |
|
|
|
|
|
http_url, sms_number, location_interval, |
|
|
|
|
|
sleep_time, affection_phone, sos_phone, |
|
|
|
|
|
white_phone, sms_white_phone, phone, |
|
|
|
|
|
clock_time, sms_set, address_book, |
|
|
|
|
|
sync_time, tcp_address, auto_shutdown, |
|
|
|
|
|
call_time, location_mode, connect_type, |
|
|
|
|
|
phone_type, rfid, lat, |
|
|
|
|
|
lon) |
|
|
|
|
|
values (#{id,jdbcType=INTEGER}, #{deviceImei,jdbcType=VARCHAR}, #{httpIp,jdbcType=VARCHAR}, |
|
|
|
|
|
#{httpUrl,jdbcType=VARCHAR}, #{smsNumber,jdbcType=VARCHAR}, #{locationInterval,jdbcType=VARCHAR}, |
|
|
|
|
|
#{sleepTime,jdbcType=VARCHAR}, #{affectionPhone,jdbcType=VARCHAR}, #{sosPhone,jdbcType=VARCHAR}, |
|
|
|
|
|
#{whitePhone,jdbcType=VARCHAR}, #{smsWhitePhone,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, |
|
|
|
|
|
#{clockTime,jdbcType=VARCHAR}, #{smsSet,jdbcType=VARCHAR}, #{addressBook,jdbcType=VARCHAR}, |
|
|
|
|
|
#{syncTime,jdbcType=VARCHAR}, #{tcpAddress,jdbcType=VARCHAR}, #{autoShutdown,jdbcType=VARCHAR}, |
|
|
|
|
|
#{callTime,jdbcType=VARCHAR}, #{locationMode,jdbcType=VARCHAR}, #{connectType,jdbcType=VARCHAR}, |
|
|
|
|
|
#{phoneType,jdbcType=VARCHAR}, #{rfid,jdbcType=VARCHAR}, #{lat,jdbcType=INTEGER}, |
|
|
|
|
|
#{lon,jdbcType=INTEGER}) |
|
|
|
|
|
</insert> |
|
|
|
|
|
<insert id="insertSelective" parameterType="com.ssjl.zhaobiao.guizhou.entity.DianxinGzDeviceConfig"> |
|
|
|
|
|
insert into dianxin_gz_device_config |
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
|
|
<if test="id != null"> |
|
|
|
|
|
id, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="deviceImei != null"> |
|
|
|
|
|
device_imei, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="httpIp != null"> |
|
|
|
|
|
http_ip, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="httpUrl != null"> |
|
|
|
|
|
http_url, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="smsNumber != null"> |
|
|
|
|
|
sms_number, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="locationInterval != null"> |
|
|
|
|
|
location_interval, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="sleepTime != null"> |
|
|
|
|
|
sleep_time, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="affectionPhone != null"> |
|
|
|
|
|
affection_phone, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="sosPhone != null"> |
|
|
|
|
|
sos_phone, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="whitePhone != null"> |
|
|
|
|
|
white_phone, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="smsWhitePhone != null"> |
|
|
|
|
|
sms_white_phone, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="phone != null"> |
|
|
|
|
|
phone, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="clockTime != null"> |
|
|
|
|
|
clock_time, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="smsSet != null"> |
|
|
|
|
|
sms_set, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="addressBook != null"> |
|
|
|
|
|
address_book, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="syncTime != null"> |
|
|
|
|
|
sync_time, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="tcpAddress != null"> |
|
|
|
|
|
tcp_address, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="autoShutdown != null"> |
|
|
|
|
|
auto_shutdown, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="callTime != null"> |
|
|
|
|
|
call_time, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="locationMode != null"> |
|
|
|
|
|
location_mode, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="connectType != null"> |
|
|
|
|
|
connect_type, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="phoneType != null"> |
|
|
|
|
|
phone_type, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="rfid != null"> |
|
|
|
|
|
rfid, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="lat != null"> |
|
|
|
|
|
lat, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="lon != null"> |
|
|
|
|
|
lon, |
|
|
|
|
|
</if> |
|
|
|
|
|
</trim> |
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
|
|
<if test="id != null"> |
|
|
|
|
|
#{id,jdbcType=INTEGER}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="deviceImei != null"> |
|
|
|
|
|
#{deviceImei,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="httpIp != null"> |
|
|
|
|
|
#{httpIp,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="httpUrl != null"> |
|
|
|
|
|
#{httpUrl,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="smsNumber != null"> |
|
|
|
|
|
#{smsNumber,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="locationInterval != null"> |
|
|
|
|
|
#{locationInterval,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="sleepTime != null"> |
|
|
|
|
|
#{sleepTime,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="affectionPhone != null"> |
|
|
|
|
|
#{affectionPhone,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="sosPhone != null"> |
|
|
|
|
|
#{sosPhone,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="whitePhone != null"> |
|
|
|
|
|
#{whitePhone,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="smsWhitePhone != null"> |
|
|
|
|
|
#{smsWhitePhone,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="phone != null"> |
|
|
|
|
|
#{phone,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="clockTime != null"> |
|
|
|
|
|
#{clockTime,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="smsSet != null"> |
|
|
|
|
|
#{smsSet,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="addressBook != null"> |
|
|
|
|
|
#{addressBook,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="syncTime != null"> |
|
|
|
|
|
#{syncTime,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="tcpAddress != null"> |
|
|
|
|
|
#{tcpAddress,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="autoShutdown != null"> |
|
|
|
|
|
#{autoShutdown,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="callTime != null"> |
|
|
|
|
|
#{callTime,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="locationMode != null"> |
|
|
|
|
|
#{locationMode,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="connectType != null"> |
|
|
|
|
|
#{connectType,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="phoneType != null"> |
|
|
|
|
|
#{phoneType,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="rfid != null"> |
|
|
|
|
|
#{rfid,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="lat != null"> |
|
|
|
|
|
#{lat,jdbcType=INTEGER}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="lon != null"> |
|
|
|
|
|
#{lon,jdbcType=INTEGER}, |
|
|
|
|
|
</if> |
|
|
|
|
|
</trim> |
|
|
|
|
|
</insert> |
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ssjl.zhaobiao.guizhou.entity.DianxinGzDeviceConfig"> |
|
|
|
|
|
update dianxin_gz_device_config |
|
|
|
|
|
<set> |
|
|
|
|
|
<if test="deviceImei != null"> |
|
|
|
|
|
device_imei = #{deviceImei,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="httpIp != null"> |
|
|
|
|
|
http_ip = #{httpIp,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="httpUrl != null"> |
|
|
|
|
|
http_url = #{httpUrl,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="smsNumber != null"> |
|
|
|
|
|
sms_number = #{smsNumber,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="locationInterval != null"> |
|
|
|
|
|
location_interval = #{locationInterval,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="sleepTime != null"> |
|
|
|
|
|
sleep_time = #{sleepTime,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="affectionPhone != null"> |
|
|
|
|
|
affection_phone = #{affectionPhone,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="sosPhone != null"> |
|
|
|
|
|
sos_phone = #{sosPhone,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="whitePhone != null"> |
|
|
|
|
|
white_phone = #{whitePhone,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="smsWhitePhone != null"> |
|
|
|
|
|
sms_white_phone = #{smsWhitePhone,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="phone != null"> |
|
|
|
|
|
phone = #{phone,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="clockTime != null"> |
|
|
|
|
|
clock_time = #{clockTime,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="smsSet != null"> |
|
|
|
|
|
sms_set = #{smsSet,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="addressBook != null"> |
|
|
|
|
|
address_book = #{addressBook,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="syncTime != null"> |
|
|
|
|
|
sync_time = #{syncTime,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="tcpAddress != null"> |
|
|
|
|
|
tcp_address = #{tcpAddress,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="autoShutdown != null"> |
|
|
|
|
|
auto_shutdown = #{autoShutdown,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="callTime != null"> |
|
|
|
|
|
call_time = #{callTime,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="locationMode != null"> |
|
|
|
|
|
location_mode = #{locationMode,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="connectType != null"> |
|
|
|
|
|
connect_type = #{connectType,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="phoneType != null"> |
|
|
|
|
|
phone_type = #{phoneType,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="rfid != null"> |
|
|
|
|
|
rfid = #{rfid,jdbcType=VARCHAR}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="lat != null"> |
|
|
|
|
|
lat = #{lat,jdbcType=INTEGER}, |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="lon != null"> |
|
|
|
|
|
lon = #{lon,jdbcType=INTEGER}, |
|
|
|
|
|
</if> |
|
|
|
|
|
</set> |
|
|
|
|
|
where id = #{id,jdbcType=INTEGER} |
|
|
|
|
|
</update> |
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.ssjl.zhaobiao.guizhou.entity.DianxinGzDeviceConfig"> |
|
|
|
|
|
update dianxin_gz_device_config |
|
|
|
|
|
set device_imei = #{deviceImei,jdbcType=VARCHAR}, |
|
|
|
|
|
http_ip = #{httpIp,jdbcType=VARCHAR}, |
|
|
|
|
|
http_url = #{httpUrl,jdbcType=VARCHAR}, |
|
|
|
|
|
sms_number = #{smsNumber,jdbcType=VARCHAR}, |
|
|
|
|
|
location_interval = #{locationInterval,jdbcType=VARCHAR}, |
|
|
|
|
|
sleep_time = #{sleepTime,jdbcType=VARCHAR}, |
|
|
|
|
|
affection_phone = #{affectionPhone,jdbcType=VARCHAR}, |
|
|
|
|
|
sos_phone = #{sosPhone,jdbcType=VARCHAR}, |
|
|
|
|
|
white_phone = #{whitePhone,jdbcType=VARCHAR}, |
|
|
|
|
|
sms_white_phone = #{smsWhitePhone,jdbcType=VARCHAR}, |
|
|
|
|
|
phone = #{phone,jdbcType=VARCHAR}, |
|
|
|
|
|
clock_time = #{clockTime,jdbcType=VARCHAR}, |
|
|
|
|
|
sms_set = #{smsSet,jdbcType=VARCHAR}, |
|
|
|
|
|
address_book = #{addressBook,jdbcType=VARCHAR}, |
|
|
|
|
|
sync_time = #{syncTime,jdbcType=VARCHAR}, |
|
|
|
|
|
tcp_address = #{tcpAddress,jdbcType=VARCHAR}, |
|
|
|
|
|
auto_shutdown = #{autoShutdown,jdbcType=VARCHAR}, |
|
|
|
|
|
call_time = #{callTime,jdbcType=VARCHAR}, |
|
|
|
|
|
location_mode = #{locationMode,jdbcType=VARCHAR}, |
|
|
|
|
|
connect_type = #{connectType,jdbcType=VARCHAR}, |
|
|
|
|
|
phone_type = #{phoneType,jdbcType=VARCHAR}, |
|
|
|
|
|
rfid = #{rfid,jdbcType=VARCHAR}, |
|
|
|
|
|
lat = #{lat,jdbcType=INTEGER}, |
|
|
|
|
|
lon = #{lon,jdbcType=INTEGER} |
|
|
|
|
|
where id = #{id,jdbcType=INTEGER} |
|
|
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectByImei" resultMap="BaseResultMap"> |
|
|
|
|
|
SELECT * FROM dianxin_gz_device_config WHERE device_imei=#{imei}; |
|
|
|
|
|
</select> |
|
|
|
|
|
<select id="selectByPhone" resultMap="BaseResultMap"> |
|
|
|
|
|
SELECT * FROM dianxin_gz_device_config WHERE phone = #{phone}; |
|
|
|
|
|
</select> |
|
|
|
|
|
</mapper> |