| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <?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.jjt.biz.mapper.BluetoothInfoMapper">
-
- <resultMap type="BluetoothInfo" id="BluetoothInfoResult">
- <result property="bInfoId" column="B_INFO_ID" />
- <result property="deviceId" column="DEVICE_ID" />
- <result property="venueId" column="VENUE_ID" />
- <result property="areaId" column="AREA_ID" />
- <result property="mac" column="MAC" />
- <result property="name" column="NAME" />
- <result property="fileName" column="FILE_NAME" />
- <result property="filePath" column="FILE_PATH" />
- <result property="isIllegal" column="IS_ILLEGAL" />
- <result property="keyType" column="KEY_TYPE" />
- <result property="time" column="TIME" />
- </resultMap>
- <sql id="selectBluetoothInfoVo">
- select B_INFO_ID, DEVICE_ID, VENUE_ID, AREA_ID, MAC, NAME, FILE_NAME, FILE_PATH, IS_ILLEGAL, KEY_TYPE, TIME from bluetooth_info
- </sql>
- <select id="selectBluetoothInfoList" parameterType="BluetoothInfo" resultMap="BluetoothInfoResult">
- <include refid="selectBluetoothInfoVo"/>
- <where>
- <if test="deviceId != null and deviceId != ''"> and DEVICE_ID = #{deviceId}</if>
- <if test="venueId != null "> and VENUE_ID = #{venueId}</if>
- <if test="areaId != null "> and AREA_ID = #{areaId}</if>
- <if test="mac != null and mac != ''"> and MAC like concat('%', #{mac}, '%')</if>
- <if test="name != null and name != ''"> and NAME like concat('%', #{name}, '%')</if>
- <if test="fileName != null and fileName != ''"> and FILE_NAME like concat('%', #{fileName}, '%')</if>
- <if test="filePath != null and filePath != ''"> and FILE_PATH = #{filePath}</if>
- <if test="isIllegal != null and isIllegal != ''"> and IS_ILLEGAL = #{isIllegal}</if>
- <if test="keyType != null and keyType != ''"> and KEY_TYPE like concat('%', #{keyType}, '%')</if>
- <if test="time != null "> and TIME = #{time}</if>
- </where>
- </select>
-
- <select id="selectBluetoothInfoByBInfoId" parameterType="Long" resultMap="BluetoothInfoResult">
- <include refid="selectBluetoothInfoVo"/>
- where B_INFO_ID = #{bInfoId}
- </select>
-
- <insert id="insertBluetoothInfo" parameterType="BluetoothInfo" useGeneratedKeys="true" keyProperty="bInfoId">
- insert into bluetooth_info
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="deviceId != null">DEVICE_ID,</if>
- <if test="venueId != null">VENUE_ID,</if>
- <if test="areaId != null">AREA_ID,</if>
- <if test="mac != null and mac != ''">MAC,</if>
- <if test="name != null">NAME,</if>
- <if test="fileName != null">FILE_NAME,</if>
- <if test="filePath != null">FILE_PATH,</if>
- <if test="isIllegal != null">IS_ILLEGAL,</if>
- <if test="keyType != null">KEY_TYPE,</if>
- <if test="time != null">TIME,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="deviceId != null">#{deviceId},</if>
- <if test="venueId != null">#{venueId},</if>
- <if test="areaId != null">#{areaId},</if>
- <if test="mac != null and mac != ''">#{mac},</if>
- <if test="name != null">#{name},</if>
- <if test="fileName != null">#{fileName},</if>
- <if test="filePath != null">#{filePath},</if>
- <if test="isIllegal != null">#{isIllegal},</if>
- <if test="keyType != null">#{keyType},</if>
- <if test="time != null">#{time},</if>
- </trim>
- </insert>
- <update id="updateBluetoothInfo" parameterType="BluetoothInfo">
- update bluetooth_info
- <trim prefix="SET" suffixOverrides=",">
- <if test="deviceId != null">DEVICE_ID = #{deviceId},</if>
- <if test="venueId != null">VENUE_ID = #{venueId},</if>
- <if test="areaId != null">AREA_ID = #{areaId},</if>
- <if test="mac != null and mac != ''">MAC = #{mac},</if>
- <if test="name != null">NAME = #{name},</if>
- <if test="fileName != null">FILE_NAME = #{fileName},</if>
- <if test="filePath != null">FILE_PATH = #{filePath},</if>
- <if test="isIllegal != null">IS_ILLEGAL = #{isIllegal},</if>
- <if test="keyType != null">KEY_TYPE = #{keyType},</if>
- <if test="time != null">TIME = #{time},</if>
- </trim>
- where B_INFO_ID = #{bInfoId}
- </update>
- <delete id="deleteBluetoothInfoByBInfoId" parameterType="Long">
- delete from bluetooth_info where B_INFO_ID = #{bInfoId}
- </delete>
- <delete id="deleteBluetoothInfoByBInfoIds" parameterType="String">
- delete from bluetooth_info where B_INFO_ID in
- <foreach item="bInfoId" collection="array" open="(" separator="," close=")">
- #{bInfoId}
- </foreach>
- </delete>
- </mapper>
|