| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- <?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.AttWintBaseBDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttWintBaseB" id="attWintBaseBResultMap">
- <result property="id" column="ID"/>
- <result property="wintCode" column="WINT_CODE"/>
- <result property="wintName" column="WINT_NAME"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="adName" column="AD_NAME"/>
- <result property="wintPos" column="WINT_POS"/>
- <result property="wainLong" column="WAIN_LONG"/>
- <result property="wainLat" column="WAIN_LAT"/>
- <result property="locWrz1rdName" column="LOC_WRZ1RD_NAME"/>
- <result property="locWrz2rdName" column="LOC_WRZ2RD_NAME"/>
- <result property="locWrz3rdName" column="LOC_WRZ3RD_NAME"/>
- <result property="wainType" column="WAIN_TYPE"/>
- <result property="charDepNm" column="CHAR_DEP_NM"/>
- <result property="charDepPers" column="CHAR_DEP_PERS"/>
- <result property="charDepTel" column="CHAR_DEP_TEL"/>
- <result property="wainIntName" column="WAIN_INT_NAME"/>
- <result property="wainIntType" column="WAIN_INT_TYPE"/>
- <result property="wainWasoType" column="WAIN_WASO_TYPE"/>
- <result property="wainWasoName" column="WAIN_WASO_NAME"/>
- <result property="desQ" column="DES_Q"/>
- <result property="desDayQ" column="DES_DAY_Q"/>
- <result property="desYearQ" column="DES_YEAR_Q"/>
- <result property="inTm" column="IN_TM"/>
- <result property="upTm" column="UP_TM"/>
- <result property="gdX" column="GD_X"/>
- <result property="gdY" column="GD_Y"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- WINT_CODE,
- WINT_NAME,
- AD_CODE,
- AD_NAME,
- WINT_POS,
- WAIN_LONG,
- WAIN_LAT,
- LOC_WRZ1RD_NAME,
- LOC_WRZ2RD_NAME,
- LOC_WRZ3RD_NAME,
- WAIN_TYPE,
- CHAR_DEP_NM,
- CHAR_DEP_PERS,
- CHAR_DEP_TEL,
- WAIN_INT_NAME,
- WAIN_INT_TYPE,
- WAIN_WASO_TYPE,
- WAIN_WASO_NAME,
- DES_Q,
- DES_DAY_Q,
- DES_YEAR_Q,
- IN_TM,
- UP_TM,
- GD_X,
- GD_Y
- </sql>
- <sql id="entity_properties">
- #{id},
- #{wintCode},
- #{wintName},
- #{adCode},
- #{adName},
- #{wintPos},
- #{wainLong},
- #{wainLat},
- #{locWrz1rdName},
- #{locWrz2rdName},
- #{locWrz3rdName},
- #{wainType},
- #{charDepNm},
- #{charDepPers},
- #{charDepTel},
- #{wainIntName},
- #{wainIntType},
- #{wainWasoType},
- #{wainWasoName},
- #{desQ},
- #{desDayQ},
- #{desYearQ},
- #{inTm},
- #{upTm},
- #{gdX},
- #{gdY}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="wintCode != null and wintCode != ''">and WINT_CODE = #{wintCode}</if>
- <if test="wintName != null and wintName != ''">and WINT_NAME like '%${wintName}%'</if>
- <if test="adCode != null and adCode != ''">and AD_CODE like '${adCode}%'</if>
- <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
- <if test="wintPos != null and wintPos != ''">and WINT_POS = #{wintPos}</if>
- <if test="wainLong != null and wainLong != ''">and WAIN_LONG = #{wainLong}</if>
- <if test="wainLat != null and wainLat != ''">and WAIN_LAT = #{wainLat}</if>
- <if test="locWrz1rdName != null and locWrz1rdName != ''">and LOC_WRZ1RD_NAME = #{locWrz1rdName}</if>
- <if test="locWrz2rdName != null and locWrz2rdName != ''">and LOC_WRZ2RD_NAME = #{locWrz2rdName}</if>
- <if test="locWrz3rdName != null and locWrz3rdName != ''">and LOC_WRZ3RD_NAME = #{locWrz3rdName}</if>
- <if test="wainType != null and wainType != ''">and WAIN_TYPE = #{wainType}</if>
- <if test="charDepNm != null and charDepNm != ''">and CHAR_DEP_NM = #{charDepNm}</if>
- <if test="charDepPers != null and charDepPers != ''">and CHAR_DEP_PERS = #{charDepPers}</if>
- <if test="charDepTel != null and charDepTel != ''">and CHAR_DEP_TEL = #{charDepTel}</if>
- <if test="wainIntName != null and wainIntName != ''">and WAIN_INT_NAME = #{wainIntName}</if>
- <if test="wainIntType != null and wainIntType != ''">and WAIN_INT_TYPE = #{wainIntType}</if>
- <if test="wainWasoType != null and wainWasoType != ''">and WAIN_WASO_TYPE = #{wainWasoType}</if>
- <if test="wainWasoName != null and wainWasoName != ''">and WAIN_WASO_NAME = #{wainWasoName}</if>
- <if test="desQ != null and desQ != ''">and DES_Q = #{desQ}</if>
- <if test="desDayQ != null and desDayQ != ''">and DES_DAY_Q = #{desDayQ}</if>
- <if test="desYearQ != null and desYearQ != ''">and DES_YEAR_Q = #{desYearQ}</if>
- <if test="inTm != null">and IN_TM = #{inTm}</if>
- <if test="upTm != null">and UP_TM = #{upTm}</if>
- <if test="gdX != null and gdX != ''">AND GD_X = #{gdX}</if>
- <if test="gdY != null and gdY != ''">AND GD_Y = #{gdY}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attWintBaseBResultMap" parameterType="String" >
- select <include refid="table_columns" /> from ATT_WINT_BASE_B where ID = #{id}
- </select>
- <select id="getBy" resultMap="attWintBaseBResultMap">
- select <include refid="table_columns" /> from ATT_WINT_BASE_B <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="attWintBaseBResultMap">
- select <include refid="table_columns" /> from ATT_WINT_BASE_B
- </select>
- <select id="findList" resultMap="attWintBaseBResultMap">
- select <include refid="table_columns" /> from ATT_WINT_BASE_B <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from ATT_WINT_BASE_B <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWintBaseB">
- insert into ATT_WINT_BASE_B( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_WINT_BASE_B where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWintBaseB">
- delete from ATT_WINT_BASE_B <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_WINT_BASE_B set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWintBaseB">
- update ATT_WINT_BASE_B
- <trim prefix="set" suffixOverrides=",">
- <if test="wintCode != null and wintCode != ''">WINT_CODE = #{wintCode},</if>
- <if test="wintName != null and wintName != ''">WINT_NAME = #{wintName},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="wintPos != null and wintPos != ''">WINT_POS = #{wintPos},</if>
- <if test="wainLong != null and wainLong != ''">WAIN_LONG = #{wainLong},</if>
- <if test="wainLat != null and wainLat != ''">WAIN_LAT = #{wainLat},</if>
- <if test="locWrz1rdName != null and locWrz1rdName != ''">LOC_WRZ1RD_NAME = #{locWrz1rdName},</if>
- <if test="locWrz2rdName != null and locWrz2rdName != ''">LOC_WRZ2RD_NAME = #{locWrz2rdName},</if>
- <if test="locWrz3rdName != null and locWrz3rdName != ''">LOC_WRZ3RD_NAME = #{locWrz3rdName},</if>
- <if test="wainType != null and wainType != ''">WAIN_TYPE = #{wainType},</if>
- <if test="charDepNm != null and charDepNm != ''">CHAR_DEP_NM = #{charDepNm},</if>
- <if test="charDepPers != null and charDepPers != ''">CHAR_DEP_PERS = #{charDepPers},</if>
- <if test="charDepTel != null and charDepTel != ''">CHAR_DEP_TEL = #{charDepTel},</if>
- <if test="wainIntName != null and wainIntName != ''">WAIN_INT_NAME = #{wainIntName},</if>
- <if test="wainIntType != null and wainIntType != ''">WAIN_INT_TYPE = #{wainIntType},</if>
- <if test="wainWasoType != null and wainWasoType != ''">WAIN_WASO_TYPE = #{wainWasoType},</if>
- <if test="wainWasoName != null and wainWasoName != ''">WAIN_WASO_NAME = #{wainWasoName},</if>
- <if test="desQ != null and desQ != ''">DES_Q = #{desQ},</if>
- <if test="desDayQ != null and desDayQ != ''">DES_DAY_Q = #{desDayQ},</if>
- <if test="desYearQ != null and desYearQ != ''">DES_YEAR_Q = #{desYearQ},</if>
- <if test="inTm != null">IN_TM = #{inTm},</if>
- <if test="upTm != null">UP_TM = #{upTm},</if>
- <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
- <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWintBaseB">
- update ATT_WINT_BASE_B
- <trim prefix="set" suffixOverrides=",">
- <if test="wintCode != null and wintCode != ''">WINT_CODE = #{wintCode},</if>
- <if test="wintName != null and wintName != ''">WINT_NAME = #{wintName},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="wintPos != null and wintPos != ''">WINT_POS = #{wintPos},</if>
- <if test="wainLong != null and wainLong != ''">WAIN_LONG = #{wainLong},</if>
- <if test="wainLat != null and wainLat != ''">WAIN_LAT = #{wainLat},</if>
- <if test="locWrz1rdName != null and locWrz1rdName != ''">LOC_WRZ1RD_NAME = #{locWrz1rdName},</if>
- <if test="locWrz2rdName != null and locWrz2rdName != ''">LOC_WRZ2RD_NAME = #{locWrz2rdName},</if>
- <if test="locWrz3rdName != null and locWrz3rdName != ''">LOC_WRZ3RD_NAME = #{locWrz3rdName},</if>
- <if test="wainType != null and wainType != ''">WAIN_TYPE = #{wainType},</if>
- <if test="charDepNm != null and charDepNm != ''">CHAR_DEP_NM = #{charDepNm},</if>
- <if test="charDepPers != null and charDepPers != ''">CHAR_DEP_PERS = #{charDepPers},</if>
- <if test="charDepTel != null and charDepTel != ''">CHAR_DEP_TEL = #{charDepTel},</if>
- <if test="wainIntName != null and wainIntName != ''">WAIN_INT_NAME = #{wainIntName},</if>
- <if test="wainIntType != null and wainIntType != ''">WAIN_INT_TYPE = #{wainIntType},</if>
- <if test="wainWasoType != null and wainWasoType != ''">WAIN_WASO_TYPE = #{wainWasoType},</if>
- <if test="wainWasoName != null and wainWasoName != ''">WAIN_WASO_NAME = #{wainWasoName},</if>
- <if test="desQ != null and desQ != ''">DES_Q = #{desQ},</if>
- <if test="desDayQ != null and desDayQ != ''">DES_DAY_Q = #{desDayQ},</if>
- <if test="desYearQ != null and desYearQ != ''">DES_YEAR_Q = #{desYearQ},</if>
- <if test="inTm != null">IN_TM = #{inTm},</if>
- <if test="upTm != null">UP_TM = #{upTm},</if>
- <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
- <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- <select id="findListByPersId" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam" resultMap="attWintBaseBResultMap">
- SELECT T.* FROM ATT_WINT_BASE_B T WHERE 1 = 1
- <if test="adCode != null and adCode != ''">and T.AD_CODE LIKE '${adCode}%'</if>
- <if test="rsName != null and rsName != ''">and T.WINT_NAME LIKE '%${rsName}%'</if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and T.WAIN_LONG BETWEEN
- #{minLgtd} AND #{maxLgtd}
- </if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and T.WAIN_LAT BETWEEN
- #{minLttd} AND #{maxLttd}
- </if>
- </select>
- </mapper>
|