添加流量计水价字段mapper查询

This commit is contained in:
蒾酒 2025-01-01 15:06:01 +08:00
parent 835a7bbaeb
commit 58c96a07df

View File

@ -38,10 +38,11 @@
<result property="runStatus" column="run_status" /> <result property="runStatus" column="run_status" />
<result property="addr" column="addr" /> <result property="addr" column="addr" />
<result property="flowModel" column="flow_model" /> <result property="flowModel" column="flow_model" />
<result property="waterFree" column="water_free" />
</resultMap> </resultMap>
<sql id="selectDeviceReportInfoVo"> <sql id="selectDeviceReportInfoVo">
select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcu_fw, lte_fw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record, batch_number, serial_number, qr_code, name, lcd_manufacturer_name, voice_manufacturer_name, replace_manufacturer_name, device_id, status, powers_time, type, longitude, latitude,on_line,area_code,dept_id,run_status, addr, flow_model from iot_device_report_info select id, imei, iccid, mcu_id, bsp_type, lte_type, mcu_type, mcu_fw, lte_fw, lcd_manufacturer, voice_manufacturer, fram_model, replace_manufacturer, test_record, batch_number, serial_number, qr_code, name, lcd_manufacturer_name, voice_manufacturer_name, replace_manufacturer_name, device_id, status, powers_time, type, longitude, latitude,on_line,area_code,dept_id,run_status, addr, flow_model,water_free from iot_device_report_info
</sql> </sql>
<select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult"> <select id="selectDeviceReportInfoList" parameterType="DeviceReportInfo" resultMap="DeviceReportInfoResult">
@ -79,6 +80,7 @@
<if test="runStatus != null "> and run_status = #{runStatus}</if> <if test="runStatus != null "> and run_status = #{runStatus}</if>
<if test="addr != null "> and addr = #{addr}</if> <if test="addr != null "> and addr = #{addr}</if>
<if test="flowModel != null "> and flow_model = #{flowModel}</if> <if test="flowModel != null "> and flow_model = #{flowModel}</if>
<if test="waterFree != null "> and water_free = #{waterFree}</if>
</where> </where>
<!-- 添加排序 --> <!-- 添加排序 -->
order by powers_time desc order by powers_time desc
@ -123,6 +125,7 @@
<if test="deptId != null">dept_id,</if> <if test="deptId != null">dept_id,</if>
<if test="addr != null">addr,</if> <if test="addr != null">addr,</if>
<if test="flowModel != null">flow_model,</if> <if test="flowModel != null">flow_model,</if>
<if test="waterFree != null">water_free,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imei != null and imei != ''">#{imei},</if> <if test="imei != null and imei != ''">#{imei},</if>
@ -156,6 +159,7 @@
<if test="deptId != null">#{deptId},</if> <if test="deptId != null">#{deptId},</if>
<if test="addr != null">#{addr},</if> <if test="addr != null">#{addr},</if>
<if test="flowModel != null">#{flowModel},</if> <if test="flowModel != null">#{flowModel},</if>
<if test="waterFree != null">#{waterFree},</if>
</trim> </trim>
</insert> </insert>
@ -193,6 +197,7 @@
<if test="deptId != null">dept_id = #{deptId},</if> <if test="deptId != null">dept_id = #{deptId},</if>
<if test="addr != null">addr = #{addr},</if> <if test="addr != null">addr = #{addr},</if>
<if test="flowModel != null">flow_model = #{flowModel},</if> <if test="flowModel != null">flow_model = #{flowModel},</if>
<if test="waterFree != null">water_free = #{waterFree},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>