| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <?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="com.tuoren.forward.mapper.StationLocationMapper">
- <resultMap id="BaseResultMap" type="com.tuoren.forward.entity.StationLocation">
- <id column="id" jdbcType="VARCHAR" property="id" />
- <result column="mnc" jdbcType="CHAR" property="mnc" />
- <result column="lac" jdbcType="VARCHAR" property="lac" />
- <result column="ci" jdbcType="VARCHAR" property="ci" />
- <result column="lng" jdbcType="VARCHAR" property="lng" />
- <result column="lat" jdbcType="VARCHAR" property="lat" />
- <result column="address" jdbcType="VARCHAR" property="address" />
- <result column="radius" jdbcType="VARCHAR" property="radius" />
- <result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
- <result column="modifytime" jdbcType="TIMESTAMP" property="modifytime" />
- </resultMap>
- <sql id="Base_Column_List">
- id, mnc, lac, ci, lng, lat, address, radius, createtime, modifytime
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from station_location
- where id = #{id,jdbcType=VARCHAR}
- </select>
- <select id="selectOne" parameterType="java.lang.String" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from station_location
- where mnc = #{mnc,jdbcType=VARCHAR} and lac = #{lac,jdbcType=VARCHAR}
- and ci = #{ci,jdbcType=VARCHAR} limit 1
- </select>
- <select id="select" parameterType="StationLocationDto" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from station_location
- <where>
- <if test="keyWord != null and keyWord != ''">
- (
- lac like CONCAT('%',#{keyWord,jdbcType=VARCHAR},'%')
- or
- ci like CONCAT('%',#{keyWord,jdbcType=VARCHAR},'%')
- )
- </if>
- </where>
- <if test="sort != null and sort != ''">
- order by ${sort}
- <if test="order != null "> ${order}</if>
- </if>
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
- delete from station_location
- where id = #{id,jdbcType=VARCHAR}
- </delete>
- <insert id="insert" parameterType="com.tuoren.forward.entity.StationLocation">
- insert into station_location (id, mnc, lac, ci,
- lng, lat, address,
- radius, createtime, modifytime
- )
- values (#{id,jdbcType=VARCHAR}, #{mnc,jdbcType=CHAR}, #{lac,jdbcType=VARCHAR}, #{ci,jdbcType=VARCHAR},
- #{lng,jdbcType=VARCHAR}, #{lat,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
- #{radius,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{modifytime,jdbcType=TIMESTAMP}
- )
- </insert>
- <insert id="insertSelective" parameterType="com.tuoren.forward.entity.StationLocation">
- insert into station_location
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="mnc != null">
- mnc,
- </if>
- <if test="lac != null">
- lac,
- </if>
- <if test="ci != null">
- ci,
- </if>
- <if test="lng != null">
- lng,
- </if>
- <if test="lat != null">
- lat,
- </if>
- <if test="address != null">
- address,
- </if>
- <if test="radius != null">
- radius,
- </if>
- <if test="createtime != null">
- createtime,
- </if>
- <if test="modifytime != null">
- modifytime,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=VARCHAR},
- </if>
- <if test="mnc != null">
- #{mnc,jdbcType=CHAR},
- </if>
- <if test="lac != null">
- #{lac,jdbcType=VARCHAR},
- </if>
- <if test="ci != null">
- #{ci,jdbcType=VARCHAR},
- </if>
- <if test="lng != null">
- #{lng,jdbcType=VARCHAR},
- </if>
- <if test="lat != null">
- #{lat,jdbcType=VARCHAR},
- </if>
- <if test="address != null">
- #{address,jdbcType=VARCHAR},
- </if>
- <if test="radius != null">
- #{radius,jdbcType=VARCHAR},
- </if>
- <if test="createtime != null">
- #{createtime,jdbcType=TIMESTAMP},
- </if>
- <if test="modifytime != null">
- #{modifytime,jdbcType=TIMESTAMP},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.tuoren.forward.entity.StationLocation">
- update station_location
- <set>
- <if test="mnc != null">
- mnc = #{mnc,jdbcType=CHAR},
- </if>
- <if test="lac != null">
- lac = #{lac,jdbcType=VARCHAR},
- </if>
- <if test="ci != null">
- ci = #{ci,jdbcType=VARCHAR},
- </if>
- <if test="lng != null">
- lng = #{lng,jdbcType=VARCHAR},
- </if>
- <if test="lat != null">
- lat = #{lat,jdbcType=VARCHAR},
- </if>
- <if test="address != null">
- address = #{address,jdbcType=VARCHAR},
- </if>
- <if test="radius != null">
- radius = #{radius,jdbcType=VARCHAR},
- </if>
- <if test="createtime != null">
- createtime = #{createtime,jdbcType=TIMESTAMP},
- </if>
- <if test="modifytime != null">
- modifytime = #{modifytime,jdbcType=TIMESTAMP},
- </if>
- </set>
- where id = #{id,jdbcType=VARCHAR}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.tuoren.forward.entity.StationLocation">
- update station_location
- set mnc = #{mnc,jdbcType=CHAR},
- lac = #{lac,jdbcType=VARCHAR},
- ci = #{ci,jdbcType=VARCHAR},
- lng = #{lng,jdbcType=VARCHAR},
- lat = #{lat,jdbcType=VARCHAR},
- address = #{address,jdbcType=VARCHAR},
- radius = #{radius,jdbcType=VARCHAR},
- createtime = #{createtime,jdbcType=TIMESTAMP},
- modifytime = #{modifytime,jdbcType=TIMESTAMP}
- where id = #{id,jdbcType=VARCHAR}
- </update>
- </mapper>
|