<?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.pinganwj.clinic.web.service.TestStudentMapper">
<resultMap id="BaseResultMap" type="com.pinganwj.common.model.db.test.TestStudent">
<id column="ID" property="id" jdbcType="VARCHAR" />
<result column="NAME" property="name" jdbcType="VARCHAR" />
<result column="STUID" property="stuId" jdbcType="VARCHAR" />
<result column="SEX" property="sex" jdbcType="VARCHAR" />
<result column="PHONE" property="phone" jdbcType="VARCHAR" />
<result column="QQ" property="qq" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List">
ID,NAME,STUID,SEX,PHONE,QQ
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
parameterType="java.lang.String">
select
<include refid="Base_Column_List" />
from TEST_STUDENT
where ID = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from
TEST_STUDENT
where ID = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insertSelective" parameterType="com.pinganwj.common.model.db.test.TestStudent">
insert into TEST_STUDENT
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="name != null">
NAME,
</if>
<if test="stuId != null">
STUID,
</if>
<if test="sex != null">
SEX,
</if>
<if test="phone != null">
PHONE,
</if>
<if test="qq != null">
QQ,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="stuId != null">
#{stuId,jdbcType=VARCHAR},
</if>
<if test="sex != null">
#{sex,jdbcType=VARCHAR},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="qq != null">
#{qq,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateSelective" parameterType="com.pinganwj.common.model.db.test.TestStudent">
update TEST_STUDENT
<set>
<if test="name != null">
NAME = #{name,jdbcType=VARCHAR},
</if>
<if test="stuId != null">
stuId = #{stuId,jdbcType=VARCHAR},
</if>
<if test="sex != null">
SEX = #{sex,jdbcType=VARCHAR},
</if>
<if test="phone != null">
PHONE = #{phone,jdbcType=VARCHAR},
</if>
<if test="qq != null">
QQ = #{qq,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=VARCHAR}
</update>
</mapper>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pinganwj.clinic.web.service.TestStudentMapper">
<resultMap id="BaseResultMap" type="com.pinganwj.common.model.db.test.TestStudent">
<id column="ID" property="id" jdbcType="VARCHAR" />
<result column="NAME" property="name" jdbcType="VARCHAR" />
<result column="STUID" property="stuId" jdbcType="VARCHAR" />
<result column="SEX" property="sex" jdbcType="VARCHAR" />
<result column="PHONE" property="phone" jdbcType="VARCHAR" />
<result column="QQ" property="qq" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List">
ID,NAME,STUID,SEX,PHONE,QQ
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
parameterType="java.lang.String">
select
<include refid="Base_Column_List" />
from TEST_STUDENT
where ID = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from
TEST_STUDENT
where ID = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insertSelective" parameterType="com.pinganwj.common.model.db.test.TestStudent">
insert into TEST_STUDENT
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="name != null">
NAME,
</if>
<if test="stuId != null">
STUID,
</if>
<if test="sex != null">
SEX,
</if>
<if test="phone != null">
PHONE,
</if>
<if test="qq != null">
QQ,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="stuId != null">
#{stuId,jdbcType=VARCHAR},
</if>
<if test="sex != null">
#{sex,jdbcType=VARCHAR},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="qq != null">
#{qq,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateSelective" parameterType="com.pinganwj.common.model.db.test.TestStudent">
update TEST_STUDENT
<set>
<if test="name != null">
NAME = #{name,jdbcType=VARCHAR},
</if>
<if test="stuId != null">
stuId = #{stuId,jdbcType=VARCHAR},
</if>
<if test="sex != null">
SEX = #{sex,jdbcType=VARCHAR},
</if>
<if test="phone != null">
PHONE = #{phone,jdbcType=VARCHAR},
</if>
<if test="qq != null">
QQ = #{qq,jdbcType=VARCHAR},
</if>
</set>
where ID = #{id,jdbcType=VARCHAR}
</update>
</mapper>