设备上电审核前上报的基础信息表管理接口
This commit is contained in:
@ -0,0 +1,116 @@
|
||||
<?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.fastbee.iot.mapper.DeviceReportInfoMapper">
|
||||
|
||||
<resultMap type="DeviceReportInfo" id="DeviceReportInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="imei" column="imei" />
|
||||
<result property="iccid" column="iccid" />
|
||||
<result property="mcuId" column="mcu_id" />
|
||||
<result property="bspType" column="bsp_type" />
|
||||
<result property="lteType" column="lte_type" />
|
||||
<result property="mcuType" column="mcu_type" />
|
||||
<result property="mcufw" column="mcuFw" />
|
||||
<result property="ltefw" column="lteFw" />
|
||||
<result property="lcdManufacturer" column="lcd_manufacturer" />
|
||||
<result property="voiceManufacturer" column="voice_manufacturer" />
|
||||
<result property="framModel" column="fram_model" />
|
||||
<result property="replaceManufacturer" column="replace_manufacturer" />
|
||||
<result property="testRecord" column="test_record" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeviceReportInfoVo">
|
||||
select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcuFw, lteFw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record from iot_device_report_info
|
||||
</sql>
|
||||
|
||||
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
|
||||
<include refid="selectDeviceReportInfoVo"/>
|
||||
<where>
|
||||
<if test="imei != null and imei != ''"> and imei = #{imei}</if>
|
||||
<if test="iccid != null and iccid != ''"> and iccid = #{iccid}</if>
|
||||
<if test="mcuId != null and mcuId != ''"> and mcu_id = #{mcuId}</if>
|
||||
<if test="bspType != null and bspType != ''"> and bsp_type = #{bspType}</if>
|
||||
<if test="lteType != null and lteType != ''"> and lte_type = #{lteType}</if>
|
||||
<if test="mcuType != null and mcuType != ''"> and mcu_type = #{mcuType}</if>
|
||||
<if test="mcufw != null and mcufw != ''"> and mcuFw = #{mcufw}</if>
|
||||
<if test="ltefw != null and ltefw != ''"> and lteFw = #{ltefw}</if>
|
||||
<if test="lcdManufacturer != null "> and lcd_manufacturer = #{lcdManufacturer}</if>
|
||||
<if test="voiceManufacturer != null "> and voice_manufacturer = #{voiceManufacturer}</if>
|
||||
<if test="framModel != null and framModel != ''"> and fram_model = #{framModel}</if>
|
||||
<if test="replaceManufacturer != null "> and replace_manufacturer = #{replaceManufacturer}</if>
|
||||
<if test="testRecord != null and testRecord != ''"> and test_record = #{testRecord}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDeviceReportInfoById" parameterType="Long" resultMap="DeviceReportInfoResult">
|
||||
<include refid="selectDeviceReportInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDeviceReportInfo" parameterType="DeviceReportInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into iot_device_report_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="imei != null and imei != ''">imei,</if>
|
||||
<if test="iccid != null and iccid != ''">iccid,</if>
|
||||
<if test="mcuId != null and mcuId != ''">mcu_id,</if>
|
||||
<if test="bspType != null and bspType != ''">bsp_type,</if>
|
||||
<if test="lteType != null and lteType != ''">lte_type,</if>
|
||||
<if test="mcuType != null and mcuType != ''">mcu_type,</if>
|
||||
<if test="mcufw != null and mcufw != ''">mcuFw,</if>
|
||||
<if test="ltefw != null and ltefw != ''">lteFw,</if>
|
||||
<if test="lcdManufacturer != null">lcd_manufacturer,</if>
|
||||
<if test="voiceManufacturer != null">voice_manufacturer,</if>
|
||||
<if test="framModel != null and framModel != ''">fram_model,</if>
|
||||
<if test="replaceManufacturer != null">replace_manufacturer,</if>
|
||||
<if test="testRecord != null">test_record,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="imei != null and imei != ''">#{imei},</if>
|
||||
<if test="iccid != null and iccid != ''">#{iccid},</if>
|
||||
<if test="mcuId != null and mcuId != ''">#{mcuId},</if>
|
||||
<if test="bspType != null and bspType != ''">#{bspType},</if>
|
||||
<if test="lteType != null and lteType != ''">#{lteType},</if>
|
||||
<if test="mcuType != null and mcuType != ''">#{mcuType},</if>
|
||||
<if test="mcufw != null and mcufw != ''">#{mcufw},</if>
|
||||
<if test="ltefw != null and ltefw != ''">#{ltefw},</if>
|
||||
<if test="lcdManufacturer != null">#{lcdManufacturer},</if>
|
||||
<if test="voiceManufacturer != null">#{voiceManufacturer},</if>
|
||||
<if test="framModel != null and framModel != ''">#{framModel},</if>
|
||||
<if test="replaceManufacturer != null">#{replaceManufacturer},</if>
|
||||
<if test="testRecord != null">#{testRecord},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeviceReportInfo" parameterType="DeviceReportInfo">
|
||||
update iot_device_report_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="imei != null and imei != ''">imei = #{imei},</if>
|
||||
<if test="iccid != null and iccid != ''">iccid = #{iccid},</if>
|
||||
<if test="mcuId != null and mcuId != ''">mcu_id = #{mcuId},</if>
|
||||
<if test="bspType != null and bspType != ''">bsp_type = #{bspType},</if>
|
||||
<if test="lteType != null and lteType != ''">lte_type = #{lteType},</if>
|
||||
<if test="mcuType != null and mcuType != ''">mcu_type = #{mcuType},</if>
|
||||
<if test="mcufw != null and mcufw != ''">mcuFw = #{mcufw},</if>
|
||||
<if test="ltefw != null and ltefw != ''">lteFw = #{ltefw},</if>
|
||||
<if test="lcdManufacturer != null">lcd_manufacturer = #{lcdManufacturer},</if>
|
||||
<if test="voiceManufacturer != null">voice_manufacturer = #{voiceManufacturer},</if>
|
||||
<if test="framModel != null and framModel != ''">fram_model = #{framModel},</if>
|
||||
<if test="replaceManufacturer != null">replace_manufacturer = #{replaceManufacturer},</if>
|
||||
<if test="testRecord != null">test_record = #{testRecord},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeviceReportInfoById" parameterType="Long">
|
||||
delete from iot_device_report_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeviceReportInfoByIds" parameterType="String">
|
||||
delete from iot_device_report_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Reference in New Issue
Block a user