| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- <?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.BisInspWagaSapRgstrBaseDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstrBase" id="bisInspWagaSapRgstrBaseResultMap">
- <result property="id" column="ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="sapName" column="SAP_NAME"/>
- <result property="sapLen" column="SAP_LEN"/>
- <result property="dikeGrad" column="DIKE_GRAD"/>
- <result property="planFlSta" column="PLAN_FL_STA"/>
- <result property="riverBank" column="RIVER_BANK"/>
- <result property="lake" column="LAKE"/>
- <result property="coast" column="COAST"/>
- <result property="compUnit" column="COMP_UNIT"/>
- <result property="mampu" column="MAMPU"/>
- <result property="mampuAttn" column="MAMPU_ATTN"/>
- <result property="mampuAttnTel" column="MAMPU_ATTN_TEL"/>
- <result property="recPersId" column="REC_PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="status" column="STATUS"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- RGSTR_ID,
- SAP_NAME,
- SAP_LEN,
- DIKE_GRAD,
- PLAN_FL_STA,
- RIVER_BANK,
- LAKE,
- COAST,
- COMP_UNIT,
- MAMPU,
- MAMPU_ATTN,
- MAMPU_ATTN_TEL,
- REC_PERS_ID,
- INTM,
- UPTM,
- STATUS
- </sql>
- <sql id="entity_properties">
- #{id},
- #{rgstrId},
- #{sapName},
- #{sapLen},
- #{dikeGrad},
- #{planFlSta},
- #{riverBank},
- #{lake},
- #{coast},
- #{compUnit},
- #{mampu},
- #{mampuAttn},
- #{mampuAttnTel},
- #{recPersId},
- #{intm},
- #{uptm},
- #{status}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
- <if test="sapName != null and sapName != ''">and SAP_NAME = #{sapName}</if>
- <if test="sapLen != null and sapLen != ''">and SAP_LEN = #{sapLen}</if>
- <if test="dikeGrad != null and dikeGrad != ''">and DIKE_GRAD = #{dikeGrad}</if>
- <if test="planFlSta != null and planFlSta != ''">and PLAN_FL_STA = #{planFlSta}</if>
- <if test="riverBank != null and riverBank != ''">and RIVER_BANK = #{riverBank}</if>
- <if test="lake != null and lake != ''">and LAKE = #{lake}</if>
- <if test="coast != null and coast != ''">and COAST = #{coast}</if>
- <if test="compUnit != null and compUnit != ''">and COMP_UNIT = #{compUnit}</if>
- <if test="mampu != null and mampu != ''">and MAMPU = #{mampu}</if>
- <if test="mampuAttn != null and mampuAttn != ''">and MAMPU_ATTN = #{mampuAttn}</if>
- <if test="mampuAttnTel != null and mampuAttnTel != ''">and MAMPU_ATTN_TEL = #{mampuAttnTel}</if>
- <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="status != null and status != ''">and STATUS = #{status}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspWagaSapRgstrBaseResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_WAGA_SAP_RGSTR_BASE where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspWagaSapRgstrBaseResultMap">
- select <include refid="table_columns" /> from BIS_INSP_WAGA_SAP_RGSTR_BASE <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspWagaSapRgstrBaseResultMap">
- select <include refid="table_columns" /> from BIS_INSP_WAGA_SAP_RGSTR_BASE
- </select>
- <select id="findList" resultMap="bisInspWagaSapRgstrBaseResultMap">
- select <include refid="table_columns" /> from BIS_INSP_WAGA_SAP_RGSTR_BASE <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_WAGA_SAP_RGSTR_BASE <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstrBase">
- insert into BIS_INSP_WAGA_SAP_RGSTR_BASE( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_INSP_WAGA_SAP_RGSTR_BASE where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstrBase">
- delete from BIS_INSP_WAGA_SAP_RGSTR_BASE <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_WAGA_SAP_RGSTR_BASE set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstrBase">
- update BIS_INSP_WAGA_SAP_RGSTR_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="sapName != null and sapName != ''">SAP_NAME = #{sapName},</if>
- <if test="sapLen != null and sapLen != ''">SAP_LEN = #{sapLen},</if>
- <if test="dikeGrad != null and dikeGrad != ''">DIKE_GRAD = #{dikeGrad},</if>
- <if test="planFlSta != null and planFlSta != ''">PLAN_FL_STA = #{planFlSta},</if>
- <if test="riverBank != null and riverBank != ''">RIVER_BANK = #{riverBank},</if>
- <if test="lake != null and lake != ''">LAKE = #{lake},</if>
- <if test="coast != null and coast != ''">COAST = #{coast},</if>
- <if test="compUnit != null and compUnit != ''">COMP_UNIT = #{compUnit},</if>
- <if test="mampu != null and mampu != ''">MAMPU = #{mampu},</if>
- <if test="mampuAttn != null and mampuAttn != ''">MAMPU_ATTN = #{mampuAttn},</if>
- <if test="mampuAttnTel != null and mampuAttnTel != ''">MAMPU_ATTN_TEL = #{mampuAttnTel},</if>
- <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstrBase">
- update BIS_INSP_WAGA_SAP_RGSTR_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="sapName != null and sapName != ''">SAP_NAME = #{sapName},</if>
- <if test="sapLen != null and sapLen != ''">SAP_LEN = #{sapLen},</if>
- <if test="dikeGrad != null and dikeGrad != ''">DIKE_GRAD = #{dikeGrad},</if>
- <if test="planFlSta != null and planFlSta != ''">PLAN_FL_STA = #{planFlSta},</if>
- <if test="riverBank != null and riverBank != ''">RIVER_BANK = #{riverBank},</if>
- <if test="lake != null and lake != ''">LAKE = #{lake},</if>
- <if test="coast != null and coast != ''">COAST = #{coast},</if>
- <if test="compUnit != null and compUnit != ''">COMP_UNIT = #{compUnit},</if>
- <if test="mampu != null and mampu != ''">MAMPU = #{mampu},</if>
- <if test="mampuAttn != null and mampuAttn != ''">MAMPU_ATTN = #{mampuAttn},</if>
- <if test="mampuAttnTel != null and mampuAttnTel != ''">MAMPU_ATTN_TEL = #{mampuAttnTel},</if>
- <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- <delete id="deleteByRgstrId">
- delete from BIS_INSP_WAGA_SAP_RGSTR_BASE where RGSTR_ID = #{rgstrId}
- </delete>
- <select id="getWagaSapRgstrBaseByRgstrId" resultMap="bisInspWagaSapRgstrBaseResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_WAGA_SAP_RGSTR_BASE where RGSTR_ID = #{rgstrId}
- </select>
- </mapper>
|