114 lines
3.7 KiB
XML
114 lines
3.7 KiB
XML
<?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.fhy.mapper.AreaMapper" >
|
|
<resultMap id="BaseResultMap" type="com.fhy.pojo.Area" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
<id column="id" property="id" jdbcType="INTEGER" />
|
|
<result column="name" property="name" jdbcType="VARCHAR" />
|
|
<result column="area_id" property="areaId" jdbcType="VARCHAR" />
|
|
<result column="city_id" property="cityId" jdbcType="VARCHAR" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
id, name, area_id, city_id
|
|
</sql>
|
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from area
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
delete from area
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.fhy.pojo.Area" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
insert into area (id, name, area_id,
|
|
city_id)
|
|
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR},
|
|
#{cityId,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.fhy.pojo.Area" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
insert into area
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
<if test="id != null" >
|
|
id,
|
|
</if>
|
|
<if test="name != null" >
|
|
name,
|
|
</if>
|
|
<if test="areaId != null" >
|
|
area_id,
|
|
</if>
|
|
<if test="cityId != null" >
|
|
city_id,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
<if test="id != null" >
|
|
#{id,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="name != null" >
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="areaId != null" >
|
|
#{areaId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="cityId != null" >
|
|
#{cityId,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.Area" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
update area
|
|
<set >
|
|
<if test="name != null" >
|
|
name = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="areaId != null" >
|
|
area_id = #{areaId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="cityId != null" >
|
|
city_id = #{cityId,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.fhy.pojo.Area" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
update area
|
|
set name = #{name,jdbcType=VARCHAR},
|
|
area_id = #{areaId,jdbcType=VARCHAR},
|
|
city_id = #{cityId,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
</mapper> |