| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- <?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.TacObjPblmstb515Dao">
- <resultMap type="cn.com.goldenwater.dcproj.model.TacObjPblmstb" id="tacObjPblmstb515ResultMap">
- <result property="pblmTypeDesc2" column="PBLM_TYPE_DESC2"/>
- <result property="pblmTypeDesc" column="PBLM_TYPE_DESC"/>
- <result property="id" column="ID"/>
- <result property="spfsnlType" column="SPFSNL_TYPE"/>
- <result property="class1" column="CLASS1"/>
- <result property="class1Name" column="CLASS1_NAME"/>
- <result property="class2" column="CLASS2"/>
- <result property="class2Name" column="CLASS2_NAME"/>
- <result property="sn" column="SN"/>
- <result property="pblmsDesc" column="PBLMS_DESC"/>
- <result property="relativeLaw" column="RELATIVE_LAW"/>
- <result property="lawContent" column="LAW_CONTENT"/>
- <result property="cate0" column="CATE0"/>
- <result property="cate1" column="CATE1"/>
- <result property="cate2" column="CATE2"/>
- <result property="subjectIds" column="SUBJECT_IDS"/>
- <result property="note" column="NOTE"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="cate0Desc" column="CATE0_DESC"/>
- <result property="cate1Desc" column="CATE1_DESC"/>
- <result property="cate2Desc" column="CATE2_DESC"/>
- <result property="pblmType" column="PBLM_TYPE"/>
- <result property="pblmChType" column="PBLM_CH_TYPE"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="sortNo" column="SORT_NO"/>
- <result property="persId" column="PERS_ID"/>
- </resultMap>
-
- <sql id="table_columns">
- PBLM_TYPE_DESC2,
- PBLM_TYPE_DESC,
- ID,
- SPFSNL_TYPE,
- CLASS1,
- CLASS1_NAME,
- CLASS2,
- CLASS2_NAME,
- SN,
- PBLMS_DESC,
- RELATIVE_LAW,
- LAW_CONTENT,
- CATE0,
- CATE1,
- CATE2,
- SUBJECT_IDS,
- NOTE,
- INTM,
- UPTM,
- CATE0_DESC,
- CATE1_DESC,
- CATE2_DESC,
- PBLM_TYPE,
- PBLM_CH_TYPE,
- DATA_STAT,
- SORT_NO,
- PERS_ID
- </sql>
- <sql id="entity_properties">
- #{pblmTypeDesc2},
- #{pblmTypeDesc},
- #{id},
- #{spfsnlType},
- #{class1},
- #{class1Name},
- #{class2},
- #{class2Name},
- #{sn},
- #{pblmsDesc},
- #{relativeLaw},
- #{lawContent},
- #{cate0},
- #{cate1},
- #{cate2},
- #{subjectIds},
- #{note},
- #{intm},
- #{uptm},
- #{cate0Desc},
- #{cate1Desc},
- #{cate2Desc},
- #{pblmType},
- #{pblmChType},
- #{dataStat},
- #{sortNo},
- #{persId}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="pblmTypeDesc != null and pblmTypeDesc != ''">and PBLM_TYPE_DESC = #{pblmTypeDesc}</if>
- <if test="id != null and id != ''">and ID = #{id}</if>
- <if test="spfsnlType != null and spfsnlType != ''">and SPFSNL_TYPE = #{spfsnlType}</if>
- <if test="class1 != null and class1 != ''">and CLASS1 = #{class1}</if>
- <if test="class1Name != null and class1Name != ''">and CLASS1_NAME = #{class1Name}</if>
- <if test="class2 != null and class2 != ''">and CLASS2 = #{class2}</if>
- <if test="class2Name != null and class2Name != ''">and CLASS2_NAME = #{class2Name}</if>
- <if test="sn != null and sn != ''">and SN = #{sn}</if>
- <if test="pblmsDesc != null and pblmsDesc != ''">and PBLMS_DESC = #{pblmsDesc}</if>
- <if test="relativeLaw != null and relativeLaw != ''">and RELATIVE_LAW = #{relativeLaw}</if>
- <if test="lawContent != null and lawContent != ''">and LAW_CONTENT = #{lawContent}</if>
- <if test="cate0 != null and cate0 != ''">and CATE0 = #{cate0}</if>
- <if test="cate1 != null and cate1 != ''">and CATE1 = #{cate1}</if>
- <if test="cate2 != null and cate2 != ''">and CATE2 = #{cate2}</if>
- <if test="subjectIds != null and subjectIds != ''">and SUBJECT_IDS = #{subjectIds}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="cate0Desc != null and cate0Desc != ''">and CATE0_DESC = #{cate0Desc}</if>
- <if test="cate1Desc != null and cate1Desc != ''">and CATE1_DESC = #{cate1Desc}</if>
- <if test="cate2Desc != null and cate2Desc != ''">and CATE2_DESC = #{cate2Desc}</if>
- <if test="pblmType != null and pblmType != ''">and PBLM_TYPE = #{pblmType}</if>
- <if test="pblmChType != null and pblmChType != ''">and PBLM_CH_TYPE = #{pblmChType}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="sortNo != null and sortNo != ''">and SORT_NO = #{sortNo}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- </trim>
- </sql>
- <select id="get" resultMap="tacObjPblmstb515ResultMap" parameterType="String" >
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB515 where ID = #{id}
- </select>
- <select id="getBy" resultMap="tacObjPblmstb515ResultMap">
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB515 <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="tacObjPblmstb515ResultMap">
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB515
- </select>
- <select id="findList" resultMap="tacObjPblmstb515ResultMap">
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB515 <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from TAC_OBJ_PBLMSTB515 <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
- insert into TAC_OBJ_PBLMSTB515( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from TAC_OBJ_PBLMSTB515 where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
- delete from TAC_OBJ_PBLMSTB515 <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update TAC_OBJ_PBLMSTB515 set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
- update TAC_OBJ_PBLMSTB515
- <trim prefix="set" suffixOverrides=",">
- <if test="pblmTypeDesc != null and pblmTypeDesc != ''">PBLM_TYPE_DESC = #{pblmTypeDesc},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="spfsnlType != null and spfsnlType != ''">SPFSNL_TYPE = #{spfsnlType},</if>
- <if test="class1 != null and class1 != ''">CLASS1 = #{class1},</if>
- <if test="class1Name != null and class1Name != ''">CLASS1_NAME = #{class1Name},</if>
- <if test="class2 != null and class2 != ''">CLASS2 = #{class2},</if>
- <if test="class2Name != null and class2Name != ''">CLASS2_NAME = #{class2Name},</if>
- <if test="sn != null and sn != ''">SN = #{sn},</if>
- <if test="pblmsDesc != null and pblmsDesc != ''">PBLMS_DESC = #{pblmsDesc},</if>
- <if test="relativeLaw != null and relativeLaw != ''">RELATIVE_LAW = #{relativeLaw},</if>
- <if test="lawContent != null and lawContent != ''">LAW_CONTENT = #{lawContent},</if>
- <if test="cate0 != null and cate0 != ''">CATE0 = #{cate0},</if>
- <if test="cate1 != null and cate1 != ''">CATE1 = #{cate1},</if>
- <if test="cate2 != null and cate2 != ''">CATE2 = #{cate2},</if>
- <if test="subjectIds != null and subjectIds != ''">SUBJECT_IDS = #{subjectIds},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="cate0Desc != null and cate0Desc != ''">CATE0_DESC = #{cate0Desc},</if>
- <if test="cate1Desc != null and cate1Desc != ''">CATE1_DESC = #{cate1Desc},</if>
- <if test="cate2Desc != null and cate2Desc != ''">CATE2_DESC = #{cate2Desc},</if>
- <if test="pblmType != null and pblmType != ''">PBLM_TYPE = #{pblmType},</if>
- <if test="pblmChType != null and pblmChType != ''">PBLM_CH_TYPE = #{pblmChType},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="sortNo != null and sortNo != ''">SORT_NO = #{sortNo},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstb">
- update TAC_OBJ_PBLMSTB515
- <trim prefix="set" suffixOverrides=",">
- <if test="pblmTypeDesc != null and pblmTypeDesc != ''">PBLM_TYPE_DESC = #{pblmTypeDesc},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="spfsnlType != null and spfsnlType != ''">SPFSNL_TYPE = #{spfsnlType},</if>
- <if test="class1 != null and class1 != ''">CLASS1 = #{class1},</if>
- <if test="class1Name != null and class1Name != ''">CLASS1_NAME = #{class1Name},</if>
- <if test="class2 != null and class2 != ''">CLASS2 = #{class2},</if>
- <if test="class2Name != null and class2Name != ''">CLASS2_NAME = #{class2Name},</if>
- <if test="sn != null and sn != ''">SN = #{sn},</if>
- <if test="pblmsDesc != null and pblmsDesc != ''">PBLMS_DESC = #{pblmsDesc},</if>
- <if test="relativeLaw != null and relativeLaw != ''">RELATIVE_LAW = #{relativeLaw},</if>
- <if test="lawContent != null and lawContent != ''">LAW_CONTENT = #{lawContent},</if>
- <if test="cate0 != null and cate0 != ''">CATE0 = #{cate0},</if>
- <if test="cate1 != null and cate1 != ''">CATE1 = #{cate1},</if>
- <if test="cate2 != null and cate2 != ''">CATE2 = #{cate2},</if>
- <if test="subjectIds != null and subjectIds != ''">SUBJECT_IDS = #{subjectIds},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="cate0Desc != null and cate0Desc != ''">CATE0_DESC = #{cate0Desc},</if>
- <if test="cate1Desc != null and cate1Desc != ''">CATE1_DESC = #{cate1Desc},</if>
- <if test="cate2Desc != null and cate2Desc != ''">CATE2_DESC = #{cate2Desc},</if>
- <if test="pblmType != null and pblmType != ''">PBLM_TYPE = #{pblmType},</if>
- <if test="pblmChType != null and pblmChType != ''">PBLM_CH_TYPE = #{pblmChType},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="sortNo != null and sortNo != ''">SORT_NO = #{sortNo},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|