12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?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.MeasuringDataDefMapper">
- <sql id="where">
- <where>
- <if test="params.measuringDesc != null and params.measuringDesc != ''">
- and measuring_desc = #{params.measuringDesc}
- </if>
- <if test="params.dataValue != null and params.dataValue != ''">
- and data_value = #{params.dataValue}
- </if>
- <if test="params.dataName != null and params.dataName != ''">
- and data_name = #{params.dataName}
- </if>
- <if test="params.dataDesc != null and params.dataDesc != ''">
- and data_desc = #{params.dataDesc}
- </if>
- <if test="params.status != null and params.status != ''">
- and status = #{params.status}
- </if>
- </where>
- </sql>
- <select id="count" resultType="int">
- select count(1) from sc_tpl_measuring_data_def t
- <include refid="where" />
- </select>
- <select id="singleQuery" resultType="MeasuringDataDef">
- select * from sc_tpl_measuring_data_def t
- <include refid="where" />
- limit 1
- </select>
-
- <select id="list" resultType="MeasuringDataDef">
- select * from sc_tpl_measuring_data_def t
- <include refid="where" />
- ${params.orderBy}
- <if test="limit != null and limit != 0">
- limit #{offset}, #{limit}
- </if>
-
- </select>
- <update id="update">
- update sc_tpl_measuring_data_def t
- <set>
- <if test="dataName != null">
- data_name = #{dataName},
- </if>
- <if test="dataDesc != null">
- data_desc = #{dataDesc},
- </if>
- <if test="status != null">
- status = #{status},
- </if>
- <if test="createBy != null">
- create_by = #{createBy},
- </if>
- <if test="updateBy != null">
- update_by = #{updateBy},
- </if>
- <if test="dateCreate != null">
- date_create = #{dateCreate},
- </if>
- <if test="dateUpdate != null">
- date_update = #{dateUpdate},
- </if>
- </set>
- where measuring_desc = #{measuringDesc}
- and data_value = #{dataValue}
- </update>
- </mapper>
|