| New 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="com.genersoft.iot.vmp.netty.business.mapper.TalkBackEquipmentMapper"> |
| | | |
| | | <!--新增对讲设备信息--> |
| | | <insert id="saveTalkBackEquipment" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into sys_talk_back_equipment |
| | | ( |
| | | name,code,status,terminal_number,longitude,latitude, |
| | | speed,direction,elevation,precisions,receive_time,create_time,update_time |
| | | ) |
| | | values |
| | | ( |
| | | #{name},#{code},#{status},#{terminalNumber},#{longitude},#{latitude}, |
| | | #{speed},#{direction},#{elevation},#{precisions},#{receiveTime},#{createTime},#{updateTime} |
| | | ) |
| | | </insert> |
| | | |
| | | <!--新增对接设备历史记录信息--> |
| | | <insert id="saveTalkBackEquipmentRecord"> |
| | | insert into sys_talk_back_equipment_record |
| | | ( |
| | | talk_back_equipment_id,status,terminal_number, |
| | | longitude,latitude,speed,direction,elevation,precisions,receive_time,create_time |
| | | ) |
| | | values |
| | | ( |
| | | #{talkBackEquipmentId},#{status},#{terminalNumber}, |
| | | #{longitude},#{latitude},#{speed},#{direction},#{elevation},#{precisions},#{receiveTime},#{createTime} |
| | | ) |
| | | </insert> |
| | | |
| | | <!--修改对讲设备信息--> |
| | | <update id="updateTalkBackEquipment"> |
| | | update sys_talk_back_equipment |
| | | set |
| | | code = #{code}, |
| | | name = #{name}, |
| | | status = #{status}, |
| | | <if test="null!=terminalNumber and terminalNumber!=''"> |
| | | terminal_number = #{terminalNumber}, |
| | | </if> |
| | | <if test="null!=longitude and longitude!=''"> |
| | | longitude = #{longitude}, |
| | | </if> |
| | | <if test="null!=latitude and latitude!=''"> |
| | | latitude = #{latitude}, |
| | | </if> |
| | | <if test="null!=speed and speed!=''"> |
| | | speed = #{speed}, |
| | | </if> |
| | | <if test="null!=direction and direction!=''"> |
| | | direction = #{direction}, |
| | | </if> |
| | | <if test="null!=elevation and elevation!=''"> |
| | | elevation = #{elevation}, |
| | | </if> |
| | | <if test="null!=precisions and precisions!=''"> |
| | | precisions = #{precisions}, |
| | | </if> |
| | | <if test="null!=receiveTime"> |
| | | receive_time = #{receiveTime}, |
| | | </if> |
| | | update_time = #{updateTime} |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | </mapper> |