12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?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.zcxk.smartcity.data.access.dao.DeviceDataParserTplMapper">
- <sql id="where">
- <where>
- <if test="params.id != null">
- and id = #{params.id}
- </if>
- <if test="params.tplName != null and params.tplName != ''">
- and tpl_name = #{params.tplName}
- </if>
- <if test="params.deviceType != null">
- and device_type = #{params.deviceType}
- </if>
- <if test="params.parserClass != null and params.parserClass != ''">
- and parser_class = #{params.parserClass}
- </if>
- <if test="params.tplContent != null and params.tplContent != ''">
- and tpl_content = #{params.tplContent}
- </if>
- <if test="params.status != null ">
- and status = #{params.status}
- </if>
- <if test="params.version != null and params.version != 0 ">
- and version = #{params.version}
- </if>
- <if test="params.length != null and params.length != 0 ">
- and (length = #{params.length} or length is null)
- </if>
- </where>
- </sql>
- <select id="count" resultType="int">
- select count(1) from sc_device_data_parser_tpl t
- <include refid="where" />
- </select>
- <select id="singleQuery" resultType="DeviceDataParserTpl">
- select * from sc_device_data_parser_tpl t
- <include refid="where" />
- </select>
- <select id="list" resultType="DeviceDataParserTpl">
- select * from sc_device_data_parser_tpl t
- <include refid="where" />
- ${params.orderBy}
- <if test="limit != 0" >
- limit #{offset}, #{limit}
- </if>
- </select>
- <update id="update">
- update sc_device_data_parser_tpl t
- <set>
- <if test="tplName != null">
- tpl_name = #{tplName},
- </if>
- <if test="deviceType != null">
- device_type = #{deviceType},
- </if>
- <if test="parserClass != null">
- parser_class = #{parserClass},
- </if>
- <if test="tplContent != null">
- tpl_content = #{tplContent},
- </if>
- <if test="isParsered != null">
- is_parsered = #{isParsered},
- </if>
- <if test="status != null">
- status = #{status},
- </if>
- <if test="version != null">
- version = #{version},
- </if>
- <if test="dateCreate != null">
- date_create = #{dateCreate},
- </if>
- <if test="dateUpdate != null">
- date_update = #{dateUpdate},
- </if>
- <if test="createBy != null">
- create_by = #{createBy},
- </if>
- <if test="updateBy != null">
- update_by = #{updateBy},
- </if>
- </set>
- where t.id = #{id}
- </update>
- </mapper>
|