| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- <?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.BisInspRsvrCameraDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrCamera" id="bisInspRsvrCameraResultMap">
- <result property="rsCode" column="RS_CODE"/>
- <result property="rsName" column="RS_NAME"/>
- <result property="admDiv" column="ADM_DIV"/>
- <result property="regCode" column="REG_CODE"/>
- <result property="indexCode" column="INDEX_CODE"/>
- <result property="externalIndexCode" column="EXTERNAL_INDEX_CODE"/>
- <result property="regionIndexCode" column="REGION_INDEX_CODE"/>
- <result property="indexName" column="INDEX_NAME"/>
- <result property="deviceIndexCode" column="DEVICE_INDEX_CODE"/>
- <result property="loggitude" column="LOGGITUDE"/>
- <result property="latitude" column="LATITUDE"/>
- <result property="cameraType" column="CAMERA_TYPE"/>
- <result property="channum" column="CHANNUM"/>
- <result property="channelType" column="CHANNEL_TYPE"/>
- <result property="deviceResourceType" column="DEVICE_RESOURCE_TYPE"/>
- <result property="transType" column="TRANS_TYPE"/>
- <result property="capabilitySet" column="CAPABILITY_SET"/>
- <result property="dataVersion" column="DATA_VERSION"/>
- <result property="createTime" column="CREATE_TIME"/>
- <result property="updateTime" column="UPDATE_TIME"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- </resultMap>
-
- <sql id="table_columns">
- RS_CODE,
- RS_NAME,
- ADM_DIV,
- REG_CODE,
- INDEX_CODE,
- EXTERNAL_INDEX_CODE,
- REGION_INDEX_CODE,
- INDEX_NAME,
- DEVICE_INDEX_CODE,
- LOGGITUDE,
- LATITUDE,
- CAMERA_TYPE,
- CHANNUM,
- CHANNEL_TYPE,
- DEVICE_RESOURCE_TYPE,
- TRANS_TYPE,
- CAPABILITY_SET,
- DATA_VERSION,
- CREATE_TIME,
- UPDATE_TIME,
- INTM,
- UPTM
- </sql>
- <sql id="entity_properties">
- #{rsCode},
- #{rsName},
- #{admDiv},
- #{regCode},
- #{indexCode},
- #{externalIndexCode},
- #{regionIndexCode},
- #{indexName},
- #{deviceIndexCode},
- #{loggitude},
- #{latitude},
- #{cameraType},
- #{channum},
- #{channelType},
- #{deviceResourceType},
- #{transType},
- #{capabilitySet},
- #{dataVersion},
- #{createTime},
- #{updateTime},
- #{intm},
- #{uptm}
- </sql>
- <!-- 实体类属性 列表 entity_properties_item for循环使用 -->
- <sql id="entity_properties_item">
- #{item.rsCode} AS RS_CODE,
- #{item.rsName} AS RS_NAME,
- #{item.admDiv} AS ADM_DIV,
- #{item.regCode} AS REG_CODE,
- #{item.indexCode} AS INDEX_CODE,
- #{item.externalIndexCode} AS EXTERNAL_INDEX_CODE,
- #{item.regionIndexCode} AS REGION_INDEX_CODE,
- #{item.indexName} AS INDEX_NAME,
- #{item.deviceIndexCode} AS DEVICE_INDEX_CODE,
- #{item.loggitude} AS LOGGITUDE,
- #{item.latitude} AS LATITUDE,
- #{item.cameraType} AS CAMERA_TYPE,
- #{item.channum} AS CHANNUM,
- #{item.channelType} AS CHANNEL_TYPE,
- #{item.deviceResourceType} AS DEVICE_RESOURCE_TYPE,
- #{item.transType} AS TRANS_TYPE,
- #{item.capabilitySet} AS CAPABILITY_SET,
- #{item.dataVersion} AS DATA_VERSION,
- #{item.createTime} AS CREATE_TIME,
- #{item.updateTime} AS UPDATE_TIME,
- #{item.intm} AS INTM,
- #{item.uptm} AS UPTM
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="rsCode != null and rsCode != ''">and RS_CODE = #{rsCode}</if>
- <if test="rsName != null and rsName != ''">and RS_NAME like concat('%',#{rsName},'%') </if>
- <if test="admDiv != null and admDiv != ''">and ADM_DIV like concat('%',#{admDiv}) </if>
- <if test="regCode != null and regCode != ''">and REG_CODE like concat('%', #{regCode},'%') </if>
- <if test="indexCode != null and indexCode != ''">and INDEX_CODE = #{indexCode}</if>
- <if test="externalIndexCode != null and externalIndexCode != ''">and EXTERNAL_INDEX_CODE = #{externalIndexCode}</if>
- <if test="regionIndexCode != null and regionIndexCode != ''">and REGION_INDEX_CODE = #{regionIndexCode}</if>
- <if test="indexName != null and indexName != ''">and INDEX_NAME = #{indexName}</if>
- <if test="deviceIndexCode != null and deviceIndexCode != ''">and DEVICE_INDEX_CODE = #{deviceIndexCode}</if>
- <if test="loggitude != null and loggitude != ''">and LOGGITUDE = #{loggitude}</if>
- <if test="latitude != null and latitude != ''">and LATITUDE = #{latitude}</if>
- <if test="cameraType != null and cameraType != ''">and CAMERA_TYPE = #{cameraType}</if>
- <if test="channum != null and channum != ''">and CHANNUM = #{channum}</if>
- <if test="channelType != null and channelType != ''">and CHANNEL_TYPE = #{channelType}</if>
- <if test="deviceResourceType != null and deviceResourceType != ''">and DEVICE_RESOURCE_TYPE = #{deviceResourceType}</if>
- <if test="transType != null and transType != ''">and TRANS_TYPE = #{transType}</if>
- <if test="capabilitySet != null and capabilitySet != ''">and CAPABILITY_SET = #{capabilitySet}</if>
- <if test="dataVersion != null and dataVersion != ''">and DATA_VERSION = #{dataVersion}</if>
- <if test="createTime != null and createTime != ''">and CREATE_TIME = #{createTime}</if>
- <if test="updateTime != null and updateTime != ''">and UPDATE_TIME = #{updateTime}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspRsvrCameraResultMap" >
- select <include refid="table_columns" /> from BIS_INSP_RSVR_CAMERA where RS_CODE = #{rsCode} and INDEX_CODE = #{indexCode}
- </select>
- <select id="getByRsCode" resultMap="bisInspRsvrCameraResultMap" parameterType="String">
- select <include refid="table_columns" /> from BIS_INSP_RSVR_CAMERA where RS_CODE = #{rsCode}
- </select>
- <select id="getBy" resultMap="bisInspRsvrCameraResultMap" parameterType="cn.com.goldenwater.dcproj.param.BisInspRsvrCameraParam">
- select <include refid="table_columns" /> from BIS_INSP_RSVR_CAMERA <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspRsvrCameraResultMap">
- select <include refid="table_columns" /> from BIS_INSP_RSVR_CAMERA
- </select>
- <select id="findList" resultMap="bisInspRsvrCameraResultMap" parameterType="cn.com.goldenwater.dcproj.param.BisInspRsvrCameraParam">
- select <include refid="table_columns" /> from BIS_INSP_RSVR_CAMERA <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_RSVR_CAMERA <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrCamera">
- insert into BIS_INSP_RSVR_CAMERA( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_INSP_RSVR_CAMERA where RS_CODE = #{rsCode}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.param.BisInspRsvrCameraParam">
- delete from BIS_INSP_RSVR_CAMERA <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- delete from BIS_INSP_RSVR_CAMERA where RS_CODE = #{rsCode}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrCamera">
- update BIS_INSP_RSVR_CAMERA
- <trim prefix="set" suffixOverrides=",">
- <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
- <if test="admDiv != null and admDiv != ''">ADM_DIV = #{admDiv},</if>
- <if test="regCode != null and regCode != ''">REG_CODE = #{regCode},</if>
- <if test="indexCode != null and indexCode != ''">INDEX_CODE = #{indexCode},</if>
- <if test="externalIndexCode != null and externalIndexCode != ''">EXTERNAL_INDEX_CODE = #{externalIndexCode},</if>
- <if test="regionIndexCode != null and regionIndexCode != ''">REGION_INDEX_CODE = #{regionIndexCode},</if>
- <if test="indexName != null and indexName != ''">INDEX_NAME = #{indexName},</if>
- <if test="deviceIndexCode != null and deviceIndexCode != ''">DEVICE_INDEX_CODE = #{deviceIndexCode},</if>
- <if test="loggitude != null and loggitude != ''">LOGGITUDE = #{loggitude},</if>
- <if test="latitude != null and latitude != ''">LATITUDE = #{latitude},</if>
- <if test="cameraType != null and cameraType != ''">CAMERA_TYPE = #{cameraType},</if>
- <if test="channum != null and channum != ''">CHANNUM = #{channum},</if>
- <if test="channelType != null and channelType != ''">CHANNEL_TYPE = #{channelType},</if>
- <if test="deviceResourceType != null and deviceResourceType != ''">DEVICE_RESOURCE_TYPE = #{deviceResourceType},</if>
- <if test="transType != null and transType != ''">TRANS_TYPE = #{transType},</if>
- <if test="capabilitySet != null and capabilitySet != ''">CAPABILITY_SET = #{capabilitySet},</if>
- <if test="dataVersion != null and dataVersion != ''">DATA_VERSION = #{dataVersion},</if>
- <if test="createTime != null and createTime != ''">CREATE_TIME = #{createTime},</if>
- <if test="updateTime != null and updateTime != ''">UPDATE_TIME = #{updateTime},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- </trim>
- <where>RS_CODE = #{rsCode}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrCamera">
- update BIS_INSP_RSVR_CAMERA
- <trim prefix="set" suffixOverrides=",">
- <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
- <if test="admDiv != null and admDiv != ''">ADM_DIV = #{admDiv},</if>
- <if test="regCode != null and regCode != ''">REG_CODE = #{regCode},</if>
- <if test="indexCode != null and indexCode != ''">INDEX_CODE = #{indexCode},</if>
- <if test="externalIndexCode != null and externalIndexCode != ''">EXTERNAL_INDEX_CODE = #{externalIndexCode},</if>
- <if test="regionIndexCode != null and regionIndexCode != ''">REGION_INDEX_CODE = #{regionIndexCode},</if>
- <if test="indexName != null and indexName != ''">INDEX_NAME = #{indexName},</if>
- <if test="deviceIndexCode != null and deviceIndexCode != ''">DEVICE_INDEX_CODE = #{deviceIndexCode},</if>
- <if test="loggitude != null and loggitude != ''">LOGGITUDE = #{loggitude},</if>
- <if test="latitude != null and latitude != ''">LATITUDE = #{latitude},</if>
- <if test="cameraType != null and cameraType != ''">CAMERA_TYPE = #{cameraType},</if>
- <if test="channum != null and channum != ''">CHANNUM = #{channum},</if>
- <if test="channelType != null and channelType != ''">CHANNEL_TYPE = #{channelType},</if>
- <if test="deviceResourceType != null and deviceResourceType != ''">DEVICE_RESOURCE_TYPE = #{deviceResourceType},</if>
- <if test="transType != null and transType != ''">TRANS_TYPE = #{transType},</if>
- <if test="capabilitySet != null and capabilitySet != ''">CAPABILITY_SET = #{capabilitySet},</if>
- <if test="dataVersion != null and dataVersion != ''">DATA_VERSION = #{dataVersion},</if>
- <if test="createTime != null and createTime != ''">CREATE_TIME = #{createTime},</if>
- <if test="updateTime != null and updateTime != ''">UPDATE_TIME = #{updateTime},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- <insert id="insertBatchList" parameterType="java.util.List" useGeneratedKeys="false">
- insert into BIS_INSP_RSVR_CAMERA
- (<include refid="table_columns"/>)
- select t.* from (
- <foreach item="item" index="index" collection="list" separator="union all">
- select <include refid="entity_properties_item"/> from dual
- </foreach>
- ) t
- </insert>
- </mapper>
|