| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <?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="cn.com.goldenwater.dcproj.dao.BisInspSixmeRecordDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspSixmeRecord" id="bisInspSixmeRecordResultMap">
- <result property="uptm" column="UPTM"/>
- <result property="note" column="NOTE"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="state" column="STATE"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="search" column="SEARCH"/>
- <result property="judgment" column="JUDGMENT"/>
- <result property="earlyWarning" column="EARLY_WARNING"/>
- <result property="prevention" column="PREVENTION"/>
- <result property="disposal" column="DISPOSAL"/>
- <result property="responsibility" column="RESPONSIBILITY"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="id" column="ID"/>
- </resultMap>
- <sql id="table_columns">
- UPTM,
- NOTE,
- DATA_STAT,
- STATE,
- RGSTR_ID,
- SEARCH,
- JUDGMENT,
- EARLY_WARNING,
- PREVENTION,
- DISPOSAL,
- RESPONSIBILITY,
- PERS_ID,
- INTM,
- ID
- </sql>
- <sql id="entity_properties">
- #{uptm},
- #{note},
- #{dataStat},
- #{state},
- #{rgstrId},
- #{search},
- #{judgment},
- #{earlyWarning},
- #{prevention},
- #{disposal},
- #{responsibility},
- #{persId},
- #{intm},
- #{id}
- </sql>
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="state != null and state != ''">and STATE = #{state}</if>
- <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
- <if test="search != null and search != ''">and SEARCH = #{search}</if>
- <if test="judgment != null and judgment != ''">and JUDGMENT = #{judgment}</if>
- <if test="earlyWarning != null and earlyWarning != ''">and EARLY_WARNING = #{earlyWarning}</if>
- <if test="prevention != null and prevention != ''">and PREVENTION = #{prevention}</if>
- <if test="disposal != null and disposal != ''">and DISPOSAL = #{disposal}</if>
- <if test="responsibility != null and responsibility != ''">and RESPONSIBILITY = #{responsibility}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="id != null and id != ''">and ID = #{id}</if>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="bisInspSixmeRecordResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_SIXME_RECORD where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspSixmeRecordResultMap">
- select <include refid="table_columns" /> from BIS_INSP_SIXME_RECORD <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspSixmeRecordResultMap">
- select <include refid="table_columns" /> from BIS_INSP_SIXME_RECORD
- </select>
- <select id="findList" resultMap="bisInspSixmeRecordResultMap">
- select <include refid="table_columns" /> from BIS_INSP_SIXME_RECORD <include refid="page_where" />
- order by intm desc
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_SIXME_RECORD <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspSixmeRecord">
- insert into BIS_INSP_SIXME_RECORD( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_SIXME_RECORD set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSixmeRecord">
- update BIS_INSP_SIXME_RECORD set DATA_STAT='9' <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_SIXME_RECORD set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspSixmeRecord">
- update BIS_INSP_SIXME_RECORD
- <trim prefix="set" suffixOverrides=",">
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="state != null and state != ''">STATE = #{state},</if>
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="search != null and search != ''">SEARCH = #{search},</if>
- <if test="judgment != null and judgment != ''">JUDGMENT = #{judgment},</if>
- <if test="earlyWarning != null and earlyWarning != ''">EARLY_WARNING = #{earlyWarning},</if>
- <if test="prevention != null and prevention != ''">PREVENTION = #{prevention},</if>
- <if test="disposal != null and disposal != ''">DISPOSAL = #{disposal},</if>
- <if test="responsibility != null and responsibility != ''">RESPONSIBILITY = #{responsibility},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspSixmeRecord">
- update BIS_INSP_SIXME_RECORD
- <trim prefix="set" suffixOverrides=",">
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="state != null and state != ''">STATE = #{state},</if>
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="search != null and search != ''">SEARCH = #{search},</if>
- <if test="judgment != null and judgment != ''">JUDGMENT = #{judgment},</if>
- <if test="earlyWarning != null and earlyWarning != ''">EARLY_WARNING = #{earlyWarning},</if>
- <if test="prevention != null and prevention != ''">PREVENTION = #{prevention},</if>
- <if test="disposal != null and disposal != ''">DISPOSAL = #{disposal},</if>
- <if test="responsibility != null and responsibility != ''">RESPONSIBILITY = #{responsibility},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|