| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- <?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.TacPawpListDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.TacPawpList" id="tacPawpListResultMap">
- <result property="id" column="ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="type" column="TYPE"/>
- <result property="itmeDesc" column="ITME_DESC"/>
- <result property="itmeEval" column="ITME_EVAL"/>
- <result property="katalog" column="KATALOG"/>
- <result property="spcltYm" column="SPCLT_YM"/>
- <result property="revOpin" column="REV_OPIN"/>
- <result property="revTm" column="REV_TM"/>
- <result property="note" column="NOTE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="groupId" column="GROUP_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- RGSTR_ID,
- TYPE,
- ITME_DESC,
- ITME_EVAL,
- KATALOG,
- SPCLT_YM,
- REV_OPIN,
- REV_TM,
- NOTE,
- PERS_ID,
- GROUP_ID,
- INTM,
- UPTM,
- DATA_STAT
- </sql>
- <sql id="entity_properties">
- #{id},
- #{rgstrId},
- #{type},
- #{itmeDesc},
- #{itmeEval},
- #{katalog},
- #{spcltYm},
- #{revOpin},
- #{revTm},
- #{note},
- #{persId},
- #{groupId},
- #{intm},
- #{uptm},
- #{dataStat}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
- <if test="type != null and type != ''">and TYPE = #{type}</if>
- <if test="itmeDesc != null and itmeDesc != ''">and ITME_DESC like '%${itmeDesc}%'</if>
- <if test="itmeEval != null and itmeEval != ''">and ITME_EVAL like '%${itmeEval}%'</if>
- <if test="katalog != null and katalog != ''">and KATALOG = #{katalog}</if>
- <if test="spcltYm != null">and SPCLT_YM = #{spcltYm}</if>
- <if test="revOpin != null and revOpin != ''">and REV_OPIN like '%${revOpin}%'</if>
- <if test="revTm != null">and REV_TM = #{revTm}</if>
- <if test="note != null and note != ''">and NOTE like '%${note}%'</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="groupId != null and groupId != ''">and GROUP_ID = #{groupId}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- </trim>
- </sql>
- <select id="get" resultMap="tacPawpListResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_LIST where ID = #{id}
- </select>
- <select id="getBy" resultMap="tacPawpListResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_LIST
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="tacPawpListResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_LIST
- </select>
- <select id="findPawpList" resultMap="tacPawpListResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_LIST t where 1=1
- <if test="rgstrId != null and rgstrId != ''">and t.RGSTR_ID = #{rgstrId}</if>
- <if test="type != null and type != ''">and t.TYPE = #{type}</if>
- </select>
- <select id="findList" resultMap="tacPawpListResultMap">
- select p.* from (
- select t.*,r.obj_id from tac_pawp_rgstr r ,tac_pawp_list t where r.id=t.rgstr_id
- <if test="rgstrId != null and rgstrId != ''">and t.RGSTR_ID = #{rgstrId}</if>
- <if test="type != null and type != ''">and t.TYPE = #{type}</if>
- <if test="itmeDesc != null and itmeDesc != ''">and t.ITME_DESC like '%${itmeDesc}%'</if>
- <if test="itmeEval != null and itmeEval != ''">and t.ITME_EVAL like '%${itmeEval}%'</if>
- <if test="katalog != null and katalog != ''">and t.KATALOG = #{katalog}</if>
- <if test="spcltYm != null">and t.SPCLT_YM = #{spcltYm}</if>
- <if test="revOpin != null and revOpin != ''">and t.REV_OPIN like '%${revOpin}%'</if>
- <if test="revTm != null">and t.REV_TM = #{revTm}</if>
- <if test="note != null and note != ''">and t.NOTE like '%${note}%'</if>
- <if test="groupId != null and groupId != ''">and t.GROUP_ID = #{groupId}</if>
- <if test="intm != null">and t.INTM = #{intm}</if>
- <if test="uptm != null">and t.UPTM = #{uptm}</if>
- <if test="dataStat != null and dataStat != ''">and t.DATA_STAT = #{dataStat}</if>
- ) p
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from TAC_PAWP_LIST
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPawpList">
- insert into TAC_PAWP_LIST(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from TAC_PAWP_LIST where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpList">
- delete from TAC_PAWP_LIST
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update TAC_PAWP_LIST set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPawpList">
- update TAC_PAWP_LIST
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="type != null and type != ''">TYPE = #{type},</if>
- <if test="itmeDesc != null">ITME_DESC = #{itmeDesc},</if>
- <if test="itmeEval != null">ITME_EVAL = #{itmeEval},</if>
- <if test="katalog != null">KATALOG = #{katalog},</if>
- <if test="spcltYm != null">SPCLT_YM = #{spcltYm},</if>
- <if test="revOpin != null">REV_OPIN = #{revOpin},</if>
- <if test="revTm != null">REV_TM = #{revTm},</if>
- <if test="note != null">NOTE = #{note},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpList">
- update TAC_PAWP_LIST
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="type != null and type != ''">TYPE = #{type},</if>
- <if test="itmeDesc != null">ITME_DESC = #{itmeDesc},</if>
- <if test="itmeEval != null">ITME_EVAL = #{itmeEval},</if>
- <if test="katalog != null">KATALOG = #{katalog},</if>
- <if test="spcltYm != null">SPCLT_YM = #{spcltYm},</if>
- <if test="revOpin != null">REV_OPIN = #{revOpin},</if>
- <if test="revTm != null">REV_TM = #{revTm},</if>
- <if test="note != null">NOTE = #{note},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="groupId != null and groupId != ''">GROUP_ID = #{groupId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|