| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- <?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.BisPntBaseDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisPntBase" id="bisPntBaseResultMap">
- <result property="guid" column="GUID"/>
- <result property="pblmId" column="PBLM_ID"/>
- <result property="inspObjGuid" column="INSP_OBJ_GUID"/>
- <result property="pntCont" column="PNT_CONT"/>
- <result property="pblshOrgGuid" column="PBLSH_ORG_GUID"/>
- <result property="inspPblmDep" column="INSP_PBLM_DEP"/>
- <result property="isResp" column="IS_RESP"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="recPers" column="REC_PERS"/>
- <result property="collTime" column="COLL_TIME"/>
- <result property="note" column="NOTE"/>
- </resultMap>
- <sql id="table_columns">
- GUID,
- PBLM_ID,
- INSP_OBJ_GUID,
- PNT_CONT,
- PBLSH_ORG_GUID,
- INSP_PBLM_DEP,
- IS_RESP,
- DATA_STAT,
- REC_PERS,
- COLL_TIME,
- NOTE
- </sql>
- <sql id="entity_properties">
- #{guid},
- #{pblmId},
- #{inspObjGuid},
- #{pntCont},
- #{pblshOrgGuid},
- #{inspPblmDep},
- #{isResp},
- #{dataStat},
- #{recPers},
- #{collTime},
- #{note}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
- <if test="inspObjGuid != null and inspObjGuid != ''">and INSP_OBJ_GUID = #{inspObjGuid}</if>
- <if test="pntCont != null and pntCont != ''">and PNT_CONT = #{pntCont}</if>
- <if test="pblshOrgGuid != null and pblshOrgGuid != ''">and PBLSH_ORG_GUID = #{pblshOrgGuid}</if>
- <if test="inspPblmDep != null and inspPblmDep != ''">and INSP_PBLM_DEP = #{inspPblmDep}</if>
- <if test="isResp != null and isResp != ''">and IS_RESP = #{isResp}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
- <if test="collTime != null">and COLL_TIME = #{collTime}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisPntBaseResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from bis_pnt_base where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisPntBaseResultMap">
- select
- <include refid="table_columns"/>
- from bis_pnt_base
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisPntBaseResultMap">
- select
- <include refid="table_columns"/>
- from bis_pnt_base
- </select>
- <select id="findList" resultMap="bisPntBaseResultMap">
- select
- <include refid="table_columns"/>
- from bis_pnt_base
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from bis_pnt_base
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisPntBase">
- insert into bis_pnt_base(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from bis_pnt_base where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisPntBase">
- delete from bis_pnt_base
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update bis_pnt_base set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisPntBase">
- update bis_pnt_base
- <trim prefix="set" suffixOverrides=",">
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="inspObjGuid != null and inspObjGuid != ''">INSP_OBJ_GUID = #{inspObjGuid},</if>
- <if test="pntCont != null and pntCont != ''">PNT_CONT = #{pntCont},</if>
- <if test="pblshOrgGuid != null and pblshOrgGuid != ''">PBLSH_ORG_GUID = #{pblshOrgGuid},</if>
- <if test="inspPblmDep != null and inspPblmDep != ''">INSP_PBLM_DEP = #{inspPblmDep},</if>
- <if test="isResp != null and isResp != ''">IS_RESP = #{isResp},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisPntBase">
- update bis_pnt_base
- <trim prefix="set" suffixOverrides=",">
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="inspObjGuid != null and inspObjGuid != ''">INSP_OBJ_GUID = #{inspObjGuid},</if>
- <if test="pntCont != null and pntCont != ''">PNT_CONT = #{pntCont},</if>
- <if test="pblshOrgGuid != null and pblshOrgGuid != ''">PBLSH_ORG_GUID = #{pblshOrgGuid},</if>
- <if test="inspPblmDep != null and inspPblmDep != ''">INSP_PBLM_DEP = #{inspPblmDep},</if>
- <if test="isResp != null and isResp != ''">IS_RESP = #{isResp},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|