| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230 |
- <?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.AttWagaCrrctDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttWagaCrrct" id="attWagaCrrctResultMap">
- <result property="id" column="ID"/>
- <result property="objCode" column="OBJ_CODE"/>
- <result property="gateName" column="GATE_NAME"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="locRvName" column="LOC_RV_NAME"/>
- <result property="gateType" column="GATE_TYPE"/>
- <result property="gateFlow" column="GATE_FLOW"/>
- <result property="engScal" column="ENG_SCAL"/>
- <result property="engSta" column="ENG_STA"/>
- <result property="buidTimeYear" column="BUID_TIME_YEAR"/>
- <result property="buidTimeMon" column="BUID_TIME_MON"/>
- <result property="staTimeYear" column="STA_TIME_YEAR"/>
- <result property="staTimeMon" column="STA_TIME_MON"/>
- <result property="locationCun" column="LOCATION_CUN"/>
- <result property="locationXiang" column="LOCATION_XIANG"/>
- <result property="gateAdmName" column="GATE_ADM_NAME"/>
- <result property="gateAdmOrg" column="GATE_ADM_ORG"/>
- <result property="centerX" column="CENTER_X"/>
- <result property="centerY" column="CENTER_Y"/>
- <result property="gdX" column="GD_X"/>
- <result property="gdY" column="GD_Y"/>
- <result property="persId" column="PERS_ID"/>
- <result property="cTm" column="C_TM"/>
- <result property="upTm" column="UP_TM"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- OBJ_CODE,
- GATE_NAME,
- AD_CODE,
- LOC_RV_NAME,
- GATE_TYPE,
- GATE_FLOW,
- ENG_SCAL,
- ENG_STA,
- BUID_TIME_YEAR,
- BUID_TIME_MON,
- STA_TIME_YEAR,
- STA_TIME_MON,
- LOCATION_CUN,
- GATE_ADM_NAME,
- GATE_ADM_ORG,
- CENTER_X,
- CENTER_Y,
- GD_X,
- GD_Y,
- PERS_ID,
- C_TM,
- UP_TM,LOCATION_XIANG
- </sql>
- <sql id="entity_properties">
- #{id},
- #{objCode},
- #{gateName},
- #{adCode},
- #{locRvName},
- #{gateType},
- #{gateFlow},
- #{engScal},
- #{engSta},
- #{buidTimeYear},
- #{buidTimeMon},
- #{staTimeYear},
- #{staTimeMon},
- #{locationCun},
- #{gateAdmName},
- #{gateAdmOrg},
- #{centerX},
- #{centerY},
- #{gdX},
- #{gdY},
- #{persId},
- #{cTm},
- #{upTm},#{locationXiang}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="objCode != null and objCode != ''">and OBJ_CODE = #{objCode}</if>
- <if test="gateName != null and gateName != ''">and GATE_NAME = #{gateName}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
- <if test="locRvName != null and locRvName != ''">and LOC_RV_NAME = #{locRvName}</if>
- <if test="gateType != null and gateType != ''">and GATE_TYPE = #{gateType}</if>
- <if test="gateFlow != null and gateFlow != ''">and GATE_FLOW = #{gateFlow}</if>
- <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
- <if test="engSta != null and engSta != ''">and ENG_STA = #{engSta}</if>
- <if test="buidTimeYear != null and buidTimeYear != ''">and BUID_TIME_YEAR = #{buidTimeYear}</if>
- <if test="buidTimeMon != null and buidTimeMon != ''">and BUID_TIME_MON = #{buidTimeMon}</if>
- <if test="staTimeYear != null and staTimeYear != ''">and STA_TIME_YEAR = #{staTimeYear}</if>
- <if test="staTimeMon != null and staTimeMon != ''">and STA_TIME_MON = #{staTimeMon}</if>
- <if test="locationCun != null and locationCun != ''">and LOCATION_CUN = #{locationCun}</if>
- <if test="gateAdmName != null and gateAdmName != ''">and GATE_ADM_NAME = #{gateAdmName}</if>
- <if test="gateAdmOrg != null and gateAdmOrg != ''">and GATE_ADM_ORG = #{gateAdmOrg}</if>
- <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
- <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
- <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
- <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="cTm != null">and C_TM = #{cTm}</if>
- <if test="upTm != null">and UP_TM = #{upTm}</if>
- <if test="locationXiang != null">and location_Xiang = #{locationXiang}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attWagaCrrctResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from ATT_WAGA_CRRCT where ID = #{id}
- </select>
- <select id="getBy" resultMap="attWagaCrrctResultMap">
- select
- <include refid="table_columns"/>
- from ATT_WAGA_CRRCT
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="attWagaCrrctResultMap">
- select
- <include refid="table_columns"/>
- from ATT_WAGA_CRRCT
- </select>
- <select id="findList" resultMap="attWagaCrrctResultMap">
- select
- <include refid="table_columns"/>
- from ATT_WAGA_CRRCT
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from ATT_WAGA_CRRCT
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWagaCrrct">
- insert into ATT_WAGA_CRRCT(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_WAGA_CRRCT where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWagaCrrct">
- delete from ATT_WAGA_CRRCT
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_WAGA_CRRCT set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWagaCrrct">
- update ATT_WAGA_CRRCT
- <trim prefix="set" suffixOverrides=",">
- <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
- <if test="gateName != null and gateName != ''">GATE_NAME = #{gateName},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="locRvName != null and locRvName != ''">LOC_RV_NAME = #{locRvName},</if>
- <if test="gateType != null and gateType != ''">GATE_TYPE = #{gateType},</if>
- <if test="gateFlow != null and gateFlow != ''">GATE_FLOW = #{gateFlow},</if>
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="engSta != null and engSta != ''">ENG_STA = #{engSta},</if>
- <if test="buidTimeYear != null and buidTimeYear != ''">BUID_TIME_YEAR = #{buidTimeYear},</if>
- <if test="buidTimeMon != null and buidTimeMon != ''">BUID_TIME_MON = #{buidTimeMon},</if>
- <if test="staTimeYear != null and staTimeYear != ''">STA_TIME_YEAR = #{staTimeYear},</if>
- <if test="staTimeMon != null and staTimeMon != ''">STA_TIME_MON = #{staTimeMon},</if>
- <if test="locationCun != null and locationCun != ''">LOCATION_CUN = #{locationCun},</if>
- <if test="gateAdmName != null and gateAdmName != ''">GATE_ADM_NAME = #{gateAdmName},</if>
- <if test="gateAdmOrg != null and gateAdmOrg != ''">GATE_ADM_ORG = #{gateAdmOrg},</if>
- <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
- <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
- <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
- <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="cTm != null">C_TM = #{cTm},</if>
- <if test="upTm != null">UP_TM = #{upTm},</if>
- <if test="locationXiang != null">location_Xiang = #{locationXiang},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWagaCrrct">
- update ATT_WAGA_CRRCT
- <trim prefix="set" suffixOverrides=",">
- <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
- <if test="gateName != null and gateName != ''">GATE_NAME = #{gateName},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="locRvName != null and locRvName != ''">LOC_RV_NAME = #{locRvName},</if>
- <if test="gateType != null and gateType != ''">GATE_TYPE = #{gateType},</if>
- <if test="gateFlow != null and gateFlow != ''">GATE_FLOW = #{gateFlow},</if>
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="engSta != null and engSta != ''">ENG_STA = #{engSta},</if>
- <if test="buidTimeYear != null and buidTimeYear != ''">BUID_TIME_YEAR = #{buidTimeYear},</if>
- <if test="buidTimeMon != null and buidTimeMon != ''">BUID_TIME_MON = #{buidTimeMon},</if>
- <if test="staTimeYear != null and staTimeYear != ''">STA_TIME_YEAR = #{staTimeYear},</if>
- <if test="staTimeMon != null and staTimeMon != ''">STA_TIME_MON = #{staTimeMon},</if>
- <if test="locationCun != null and locationCun != ''">LOCATION_CUN = #{locationCun},</if>
- <if test="gateAdmName != null and gateAdmName != ''">GATE_ADM_NAME = #{gateAdmName},</if>
- <if test="gateAdmOrg != null and gateAdmOrg != ''">GATE_ADM_ORG = #{gateAdmOrg},</if>
- <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
- <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
- <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
- <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="cTm != null">C_TM = #{cTm},</if>
- <if test="upTm != null">UP_TM = #{upTm},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|