| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193 |
- <?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.BisInspRsvrSdFcltyDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrSdFclty" id="bisInspRsvrSdFcltyResultMap">
- <result property="id" column="ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="isGaetRisk" column="IS_GAET_RISK"/>
- <result property="isGateCrv" column="IS_GATE_CRV"/>
- <result property="isGateLeak" column="IS_GATE_LEAK"/>
- <result property="isGateBrk" column="IS_GATE_BRK"/>
- <result property="isGatePow" column="IS_GATE_POW"/>
- <result property="isGateInsu" column="IS_GATE_INSU"/>
- <result property="isSetSaf" column="IS_SET_SAF"/>
- <result property="isSafRun" column="IS_SAF_RUN"/>
- <result property="isPub" column="IS_PUB"/>
- <result property="isPubRel" column="IS_PUB_REL"/>
- <result property="isPubClr" column="IS_PUB_CLR"/>
- <result property="isPubMiss" column="IS_PUB_MISS"/>
- <result property="isRepRisk" column="IS_REP_RISK"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="note" column="NOTE"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- RGSTR_ID,
- IS_GAET_RISK,
- IS_GATE_CRV,
- IS_GATE_LEAK,
- IS_GATE_BRK,
- IS_GATE_POW,
- IS_GATE_INSU,
- IS_SET_SAF,
- IS_SAF_RUN,
- IS_PUB,
- IS_PUB_REL,
- IS_PUB_CLR,
- IS_PUB_MISS,
- IS_REP_RISK,
- DATA_STAT,
- PERS_ID,
- INTM,
- UPTM,
- NOTE
- </sql>
- <sql id="entity_properties">
- #{id},
- #{rgstrId},
- #{isGaetRisk},
- #{isGateCrv},
- #{isGateLeak},
- #{isGateBrk},
- #{isGatePow},
- #{isGateInsu},
- #{isSetSaf},
- #{isSafRun},
- #{isPub},
- #{isPubRel},
- #{isPubClr},
- #{isPubMiss},
- #{isRepRisk},
- #{dataStat},
- #{persId},
- #{intm},
- #{uptm},
- #{note}
- </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="isGaetRisk != null and isGaetRisk != ''">and IS_GAET_RISK = #{isGaetRisk}</if>
- <if test="isGateCrv != null and isGateCrv != ''">and IS_GATE_CRV = #{isGateCrv}</if>
- <if test="isGateLeak != null and isGateLeak != ''">and IS_GATE_LEAK = #{isGateLeak}</if>
- <if test="isGateBrk != null and isGateBrk != ''">and IS_GATE_BRK = #{isGateBrk}</if>
- <if test="isGatePow != null and isGatePow != ''">and IS_GATE_POW = #{isGatePow}</if>
- <if test="isGateInsu != null and isGateInsu != ''">and IS_GATE_INSU = #{isGateInsu}</if>
- <if test="isSetSaf != null and isSetSaf != ''">and IS_SET_SAF = #{isSetSaf}</if>
- <if test="isSafRun != null and isSafRun != ''">and IS_SAF_RUN = #{isSafRun}</if>
- <if test="isPub != null and isPub != ''">and IS_PUB = #{isPub}</if>
- <if test="isPubRel != null and isPubRel != ''">and IS_PUB_REL = #{isPubRel}</if>
- <if test="isPubClr != null and isPubClr != ''">and IS_PUB_CLR = #{isPubClr}</if>
- <if test="isPubMiss != null and isPubMiss != ''">and IS_PUB_MISS = #{isPubMiss}</if>
- <if test="isRepRisk != null and isRepRisk != ''">and IS_REP_RISK = #{isRepRisk}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <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="note != null and note != ''">and NOTE = #{note}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspRsvrSdFcltyResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_FCLTY where RGSTR_ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspRsvrSdFcltyResultMap">
- select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_FCLTY <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspRsvrSdFcltyResultMap">
- select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_FCLTY
- </select>
- <select id="findList" resultMap="bisInspRsvrSdFcltyResultMap">
- select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_FCLTY <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_RSVR_SD_FCLTY <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdFclty">
- insert into BIS_INSP_RSVR_SD_FCLTY( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_RSVR_SD_FCLTY set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdFclty">
- delete from BIS_INSP_RSVR_SD_FCLTY <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_RSVR_SD_FCLTY set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdFclty">
- update BIS_INSP_RSVR_SD_FCLTY
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="isGaetRisk != null and isGaetRisk != ''">IS_GAET_RISK = #{isGaetRisk},</if>
- <if test="isGateCrv != null and isGateCrv != ''">IS_GATE_CRV = #{isGateCrv},</if>
- <if test="isGateLeak != null and isGateLeak != ''">IS_GATE_LEAK = #{isGateLeak},</if>
- <if test="isGateBrk != null and isGateBrk != ''">IS_GATE_BRK = #{isGateBrk},</if>
- <if test="isGatePow != null and isGatePow != ''">IS_GATE_POW = #{isGatePow},</if>
- <if test="isGateInsu != null and isGateInsu != ''">IS_GATE_INSU = #{isGateInsu},</if>
- <if test="isSetSaf != null and isSetSaf != ''">IS_SET_SAF = #{isSetSaf},</if>
- <if test="isSafRun != null and isSafRun != ''">IS_SAF_RUN = #{isSafRun},</if>
- <if test="isPub != null and isPub != ''">IS_PUB = #{isPub},</if>
- <if test="isPubRel != null and isPubRel != ''">IS_PUB_REL = #{isPubRel},</if>
- <if test="isPubClr != null and isPubClr != ''">IS_PUB_CLR = #{isPubClr},</if>
- <if test="isPubMiss != null and isPubMiss != ''">IS_PUB_MISS = #{isPubMiss},</if>
- <if test="isRepRisk != null and isRepRisk != ''">IS_REP_RISK = #{isRepRisk},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <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="note != null and note != ''">NOTE = #{note},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdFclty">
- update BIS_INSP_RSVR_SD_FCLTY
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="isGaetRisk != null and isGaetRisk != ''">IS_GAET_RISK = #{isGaetRisk},</if>
- <if test="isGateCrv != null and isGateCrv != ''">IS_GATE_CRV = #{isGateCrv},</if>
- <if test="isGateLeak != null and isGateLeak != ''">IS_GATE_LEAK = #{isGateLeak},</if>
- <if test="isGateBrk != null and isGateBrk != ''">IS_GATE_BRK = #{isGateBrk},</if>
- <if test="isGatePow != null and isGatePow != ''">IS_GATE_POW = #{isGatePow},</if>
- <if test="isGateInsu != null and isGateInsu != ''">IS_GATE_INSU = #{isGateInsu},</if>
- <if test="isSetSaf != null and isSetSaf != ''">IS_SET_SAF = #{isSetSaf},</if>
- <if test="isSafRun != null and isSafRun != ''">IS_SAF_RUN = #{isSafRun},</if>
- <if test="isPub != null and isPub != ''">IS_PUB = #{isPub},</if>
- <if test="isPubRel != null and isPubRel != ''">IS_PUB_REL = #{isPubRel},</if>
- <if test="isPubClr != null and isPubClr != ''">IS_PUB_CLR = #{isPubClr},</if>
- <if test="isPubMiss != null and isPubMiss != ''">IS_PUB_MISS = #{isPubMiss},</if>
- <if test="isRepRisk != null and isRepRisk != ''">IS_REP_RISK = #{isRepRisk},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <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="note != null and note != ''">NOTE = #{note},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|