| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- <?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.TacPawpBstocmCmsPactListDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.TacPawpBstocmCmsPactList" id="tacPawpBstocmCmsPactListResultMap">
- <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="id" column="ID"/>
- <result property="cmsId" column="CMS_ID"/>
- <result property="pactName" column="PACT_NAME"/>
- <result property="signTm" column="SIGN_TM"/>
- <result property="pactSum" column="PACT_SUM"/>
- <result property="pactType" column="PACT_TYPE"/>
- <result property="ownreUnit" column="OWNRE_UNIT"/>
- <result property="vcUnit" column="VC_UNIT"/>
- </resultMap>
- <sql id="table_columns">
- NOTE,
- PERS_ID,
- INTM,
- UPTM,
- DATA_STAT,
- ID,
- CMS_ID,
- PACT_NAME,
- PACT_TYPE,
- SIGN_TM,
- PACT_SUM,
- OWNRE_UNIT,
- VC_UNIT
- </sql>
- <sql id="entity_properties">
- #{note},
- #{persId},
- #{intm},
- #{uptm},
- #{dataStat},
- #{id},
- #{cmsId},
- #{pactName},
- #{pactType},
- #{signTm},
- #{pactSum},
- #{ownreUnit},
- #{vcUnit}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <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>
- <if test="id != null and id != ''">and ID = #{id}</if>
- <if test="cmsId != null and cmsId != ''">and CMS_ID = #{cmsId}</if>
- <if test="pactName != null and pactName != ''">and PACT_NAME like '%${pactName}%'</if>
- <if test="pactType != null and pactType != ''">and PACT_TYPE = #{pactType}</if>
- <if test="signTm != null">and SIGN_TM = #{signTm}</if>
- <if test="pactSum != null and pactSum != ''">and PACT_SUM = #{pactSum}</if>
- <if test="ownreUnit != null and ownreUnit != ''">and OWNRE_UNIT like '%${ownreUnit}%'</if>
- <if test="vcUnit != null and vcUnit != ''">and VC_UNIT like '%${vcUnit}%'</if>
- </trim>
- </sql>
- <select id="get" resultMap="tacPawpBstocmCmsPactListResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BSTOCM_CMS_PACT_LIST where ID = #{id}
- </select>
- <select id="getBy" resultMap="tacPawpBstocmCmsPactListResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BSTOCM_CMS_PACT_LIST
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="tacPawpBstocmCmsPactListResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BSTOCM_CMS_PACT_LIST
- </select>
- <select id="findList" resultMap="tacPawpBstocmCmsPactListResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PAWP_BSTOCM_CMS_PACT_LIST
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from TAC_PAWP_BSTOCM_CMS_PACT_LIST
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmCmsPactList">
- insert into TAC_PAWP_BSTOCM_CMS_PACT_LIST(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from TAC_PAWP_BSTOCM_CMS_PACT_LIST where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmCmsPactList">
- delete from TAC_PAWP_BSTOCM_CMS_PACT_LIST
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update TAC_PAWP_BSTOCM_CMS_PACT_LIST set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmCmsPactList">
- update TAC_PAWP_BSTOCM_CMS_PACT_LIST
- <trim prefix="set" suffixOverrides=",">
- <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>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="cmsId != null and cmsId != ''">CMS_ID = #{cmsId},</if>
- <if test="pactName != null and pactName != ''">PACT_NAME = #{pactName},</if>
- <if test="pactType != null and pactType != ''">PACT_TYPE = #{pactType},</if>
- <if test="signTm != null">SIGN_TM = #{signTm},</if>
- <if test="pactSum != null and pactSum != ''">PACT_SUM = #{pactSum},</if>
- <if test="ownreUnit != null and ownreUnit != ''">OWNRE_UNIT = #{ownreUnit},</if>
- <if test="vcUnit != null and vcUnit != ''">VC_UNIT = #{vcUnit},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmCmsPactList">
- update TAC_PAWP_BSTOCM_CMS_PACT_LIST
- <trim prefix="set" suffixOverrides=",">
- <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>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="cmsId != null and cmsId != ''">CMS_ID = #{cmsId},</if>
- <if test="pactName != null and pactName != ''">PACT_NAME = #{pactName},</if>
- <if test="pactType != null and pactType != ''">PACT_TYPE = #{pactType},</if>
- <if test="signTm != null">SIGN_TM = #{signTm},</if>
- <if test="pactSum != null and pactSum != ''">PACT_SUM = #{pactSum},</if>
- <if test="ownreUnit != null and ownreUnit != ''">OWNRE_UNIT = #{ownreUnit},</if>
- <if test="vcUnit != null and vcUnit != ''">VC_UNIT = #{vcUnit},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|