| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <?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.TacPawpBitopqPeqaaUnitDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.TacPawpBitopqPeqaaUnit" id="tacPawpBitopqPeqaaUnitResultMap">
- <result property="id" column="ID"/>
- <result property="peqaaId" column="PEQAA_ID"/>
- <result property="unitType" column="UNIT_TYPE"/>
- <result property="unitId" column="UNIT_ID"/>
- <result property="unitNm" column="UNIT_NM"/>
- <result property="unitQlctn" column="UNIT_QLCTN"/>
- <result property="unitDfNum" column="UNIT_DF_NUM"/>
- <result property="unitCncltn" column="UNIT_CNCLTN"/>
- <result property="note" column="NOTE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="subName" column="sub_name"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- PEQAA_ID,
- UNIT_TYPE,
- UNIT_ID,
- UNIT_NM,
- UNIT_QLCTN,
- UNIT_DF_NUM,
- UNIT_CNCLTN,
- NOTE,
- PERS_ID,
- INTM,
- UPTM,
- DATA_STAT
- </sql>
- <sql id="entity_properties">
- #{id},
- #{peqaaId},
- #{unitType},
- #{unitId},
- #{unitNm},
- #{unitQlctn},
- #{unitDfNum},
- #{unitCncltn},
- #{note},
- #{persId},
- #{intm},
- #{uptm},
- #{dataStat}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="peqaaId != null and peqaaId != ''">and PEQAA_ID = #{peqaaId}</if>
- <if test="unitType != null and unitType != ''">and UNIT_TYPE = #{unitType}</if>
- <if test="unitId != null and unitId != ''">and UNIT_ID = #{unitId}</if>
- <if test="unitNm != null and unitNm != ''">and UNIT_NM like '%${unitNm}%'</if>
- <if test="unitQlctn != null and unitQlctn != ''">and UNIT_QLCTN = #{unitQlctn}</if>
- <if test="unitDfNum != null and unitDfNum != ''">and UNIT_DF_NUM = #{unitDfNum}</if>
- <if test="unitCncltn != null and unitCncltn != ''">and UNIT_CNCLTN = #{unitCncltn}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</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="tacPawpBitopqPeqaaUnitResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BITOPQ_PEQAA_UNIT where ID = #{id}
- </select>
- <select id="getBy" resultMap="tacPawpBitopqPeqaaUnitResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BITOPQ_PEQAA_UNIT
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="tacPawpBitopqPeqaaUnitResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BITOPQ_PEQAA_UNIT
- </select>
- <select id="findList" resultMap="tacPawpBitopqPeqaaUnitResultMap">
- select t.*,o.sub_name from TAC_PAWP_BITOPQ_PEQAA_UNIT t ,TAC_OBJ_SUBJECT o where t.unit_type=o.id
- <if test="peqaaId != null and peqaaId != ''">and t.PEQAA_ID = #{peqaaId}</if>
- <if test="unitType != null and unitType != ''">and t.UNIT_TYPE = #{unitType}</if>
- <if test="unitId != null and unitId != ''">and t.UNIT_ID = #{unitId}</if>
- <if test="unitNm != null and unitNm != ''">and t.UNIT_NM = #{unitNm}</if>
- <if test="unitQlctn != null and unitQlctn != ''">and t.UNIT_QLCTN = #{unitQlctn}</if>
- <if test="unitDfNum != null and unitDfNum != ''">and t.UNIT_DF_NUM = #{unitDfNum}</if>
- <if test="unitCncltn != null and unitCncltn != ''">and t.UNIT_CNCLTN = #{unitCncltn}</if>
- <if test="note != null and note != ''">and t.NOTE = #{note}</if>
- <if test="persId != null and persId != ''">and t.PERS_ID = #{persId}</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>
- <if test="subName != null and subName != ''">and t.sub_name = #{subName}</if>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from TAC_PAWP_BITOPQ_PEQAA_UNIT
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBitopqPeqaaUnit">
- insert into TAC_PAWP_BITOPQ_PEQAA_UNIT(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from TAC_PAWP_BITOPQ_PEQAA_UNIT where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBitopqPeqaaUnit">
- delete from TAC_PAWP_BITOPQ_PEQAA_UNIT
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update TAC_PAWP_BITOPQ_PEQAA_UNIT set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBitopqPeqaaUnit">
- update TAC_PAWP_BITOPQ_PEQAA_UNIT
- <trim prefix="set" suffixOverrides=",">
- <if test="peqaaId != null and peqaaId != ''">PEQAA_ID = #{peqaaId},</if>
- <if test="unitType != null and unitType != ''">UNIT_TYPE = #{unitType},</if>
- <if test="unitId != null and unitId != ''">UNIT_ID = #{unitId},</if>
- <if test="unitNm != null and unitNm != ''">UNIT_NM = #{unitNm},</if>
- <if test="unitQlctn != null and unitQlctn != ''">UNIT_QLCTN = #{unitQlctn},</if>
- <if test="unitDfNum != null and unitDfNum != ''">UNIT_DF_NUM = #{unitDfNum},</if>
- <if test="unitCncltn != null and unitCncltn != ''">UNIT_CNCLTN = #{unitCncltn},</if>
- <if test="note != null">NOTE = #{note},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</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.TacPawpBitopqPeqaaUnit">
- update TAC_PAWP_BITOPQ_PEQAA_UNIT
- <trim prefix="set" suffixOverrides=",">
- <if test="peqaaId != null and peqaaId != ''">PEQAA_ID = #{peqaaId},</if>
- <if test="unitType != null and unitType != ''">UNIT_TYPE = #{unitType},</if>
- <if test="unitId != null and unitId != ''">UNIT_ID = #{unitId},</if>
- <if test="unitNm != null and unitNm != ''">UNIT_NM = #{unitNm},</if>
- <if test="unitQlctn != null and unitQlctn != ''">UNIT_QLCTN = #{unitQlctn},</if>
- <if test="unitDfNum != null and unitDfNum != ''">UNIT_DF_NUM = #{unitDfNum},</if>
- <if test="unitCncltn != null and unitCncltn != ''">UNIT_CNCLTN = #{unitCncltn},</if>
- <if test="note != null">NOTE = #{note},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</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>
|