| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?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.TacObjPblmstbLawDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.TacObjPblmstbLaw" id="tacPersLableResultMap">
- <result property="id" column="ID"/>
- <result property="lawId" column="Law_ID"/>
- <result property="pblmstbId" column="PBLMSTB_ID"/>
- <result property="note" column="NOTE"/>
- <result property="lawContent" column="LAW_CONTENT"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- Law_ID,
- PBLMSTB_ID,
- NOTE,LAW_CONTENT
- </sql>
- <sql id="entity_properties">
- #{id},
- #{lawId},
- #{pblmstbId},
- #{note},#{lawContent}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="lawId != null and lawId != ''">and Law_ID = #{lawId}</if>
- <if test="pblmstbId != null and pblmstbId != ''">and PBLMSTB_ID = #{pblmstbId}</if>
- <if test="note != null and note != ''">and note = #{note}</if>
- <if test="lawContent != null and lawContent != ''">and LAW_CONTENT = #{lawContent}</if>
- </trim>
- </sql>
- <select id="get" resultMap="tacPersLableResultMap" parameterType="String" >
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB_LAW where ID = #{id}
- </select>
- <select id="getBy" resultMap="tacPersLableResultMap">
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB_LAW <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="tacPersLableResultMap">
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB_LAW
- </select>
- <select id="findList" resultMap="tacPersLableResultMap">
- select <include refid="table_columns" /> from TAC_OBJ_PBLMSTB_LAW <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(to_number(ID)) from TAC_OBJ_PBLMSTB_LAW <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstbLaw">
- insert into TAC_OBJ_PBLMSTB_LAW( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from TAC_OBJ_PBLMSTB_LAW where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstbLaw">
- delete from TAC_OBJ_PBLMSTB_LAW <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update TAC_OBJ_PBLMSTB_LAW set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstbLaw">
- update TAC_OBJ_PBLMSTB_LAW
- <trim prefix="set" suffixOverrides=",">
- <if test="lawId != null and lawId != ''">Law_ID = #{lawId},</if>
- <if test="pblmstbId != null and pblmstbId != ''"> PBLMSTB_ID = #{pblmstbId},</if>
- <if test="note != null and note != ''"> note = #{note},</if>
- <if test="lawContent != null and lawContent != ''"> LAW_CONTENT = #{lawContent},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacObjPblmstbLaw">
- update TAC_OBJ_PBLMSTB_LAW
- <trim prefix="set" suffixOverrides=",">
- <if test="lawId != null and lawId != ''">Law_ID = #{lawId},</if>
- <if test="pblmstbId != null and pblmstbId != ''"> PBLMSTB_ID = #{pblmstbId},</if>
- <if test="note != null and note != ''"> note = #{note},</if>
- <if test="lawContent != null and lawContent != ''"> LAW_CONTENT = #{lawContent},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|