103 lines
3.4 KiB
XML
103 lines
3.4 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.ProvinceMapper" >
|
|
<resultMap id="BaseResultMap" type="com.fhy.pojo.Province" >
|
|
<!--
|
|
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="province_id" property="provinceId" jdbcType="VARCHAR" />
|
|
</resultMap>
|
|
<sql id="Base_Column_List" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
id, name, province_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 province
|
|
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 province
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</delete>
|
|
<insert id="insert" parameterType="com.fhy.pojo.Province" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
insert into province (id, name, province_id
|
|
)
|
|
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{provinceId,jdbcType=VARCHAR}
|
|
)
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.fhy.pojo.Province" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
insert into province
|
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
|
<if test="id != null" >
|
|
id,
|
|
</if>
|
|
<if test="name != null" >
|
|
name,
|
|
</if>
|
|
<if test="provinceId != null" >
|
|
province_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="provinceId != null" >
|
|
#{provinceId,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.Province" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
update province
|
|
<set >
|
|
<if test="name != null" >
|
|
name = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="provinceId != null" >
|
|
province_id = #{provinceId,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.fhy.pojo.Province" >
|
|
<!--
|
|
WARNING - @mbggenerated
|
|
This element is automatically generated by MyBatis Generator, do not modify.
|
|
-->
|
|
update province
|
|
set name = #{name,jdbcType=VARCHAR},
|
|
province_id = #{provinceId,jdbcType=VARCHAR}
|
|
where id = #{id,jdbcType=INTEGER}
|
|
</update>
|
|
</mapper> |