<?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.basic.face.discern.baseapi.visit.VisitMapper" >
|
<resultMap id="BaseResultMap" type="cn.com.basic.face.discern.visit.entity.Visit" >
|
<id column="ID" property="id" jdbcType="INTEGER" />
|
<result column="visitorPersonID" property="visitorpersonid" jdbcType="INTEGER" />
|
<result column="visiteePersonID" property="visiteepersonid" jdbcType="INTEGER" />
|
<result column="matterID" property="matterid" jdbcType="INTEGER" />
|
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
<result column="lastStatus" property="laststatus" jdbcType="INTEGER" />
|
<result column="startTime" property="starttime" jdbcType="TIMESTAMP" />
|
<result column="lastTime" property="lasttime" jdbcType="TIMESTAMP" />
|
<result column="visitorTypeLabel" property="visitortypelabel" jdbcType="VARCHAR" />
|
<result column="warning" property="warning" jdbcType="VARCHAR" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
ID, visitorPersonID, visiteePersonID, matterID, remark, lastStatus, startTime, lastTime,
|
visitorTypeLabel, warning
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
select
|
<include refid="Base_Column_List" />
|
from t_visit
|
where ID = #{id,jdbcType=INTEGER}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
delete from t_visit
|
where ID = #{id,jdbcType=INTEGER}
|
</delete>
|
<insert id="insert" parameterType="cn.com.basic.face.discern.visit.entity.Visit" >
|
insert into t_visit (ID, visitorPersonID, visiteePersonID,
|
matterID, remark, lastStatus,
|
startTime, lastTime, visitorTypeLabel,
|
warning)
|
values (#{id,jdbcType=INTEGER}, #{visitorpersonid,jdbcType=INTEGER}, #{visiteepersonid,jdbcType=INTEGER},
|
#{matterid,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{laststatus,jdbcType=INTEGER},
|
#{starttime,jdbcType=TIMESTAMP}, #{lasttime,jdbcType=TIMESTAMP}, #{visitortypelabel,jdbcType=VARCHAR},
|
#{warning,jdbcType=VARCHAR})
|
</insert>
|
<insert id="insertSelective" parameterType="cn.com.basic.face.discern.visit.entity.Visit" >
|
insert into t_visit
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
ID,
|
</if>
|
<if test="visitorpersonid != null" >
|
visitorPersonID,
|
</if>
|
<if test="visiteepersonid != null" >
|
visiteePersonID,
|
</if>
|
<if test="matterid != null" >
|
matterID,
|
</if>
|
<if test="remark != null" >
|
remark,
|
</if>
|
<if test="laststatus != null" >
|
lastStatus,
|
</if>
|
<if test="starttime != null" >
|
startTime,
|
</if>
|
<if test="lasttime != null" >
|
lastTime,
|
</if>
|
<if test="visitortypelabel != null" >
|
visitorTypeLabel,
|
</if>
|
<if test="warning != null" >
|
warning,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
#{id,jdbcType=INTEGER},
|
</if>
|
<if test="visitorpersonid != null" >
|
#{visitorpersonid,jdbcType=INTEGER},
|
</if>
|
<if test="visiteepersonid != null" >
|
#{visiteepersonid,jdbcType=INTEGER},
|
</if>
|
<if test="matterid != null" >
|
#{matterid,jdbcType=INTEGER},
|
</if>
|
<if test="remark != null" >
|
#{remark,jdbcType=VARCHAR},
|
</if>
|
<if test="laststatus != null" >
|
#{laststatus,jdbcType=INTEGER},
|
</if>
|
<if test="starttime != null" >
|
#{starttime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="lasttime != null" >
|
#{lasttime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="visitortypelabel != null" >
|
#{visitortypelabel,jdbcType=VARCHAR},
|
</if>
|
<if test="warning != null" >
|
#{warning,jdbcType=VARCHAR},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="cn.com.basic.face.discern.visit.entity.Visit" >
|
update t_visit
|
<set >
|
<if test="visitorpersonid != null" >
|
visitorPersonID = #{visitorpersonid,jdbcType=INTEGER},
|
</if>
|
<if test="visiteepersonid != null" >
|
visiteePersonID = #{visiteepersonid,jdbcType=INTEGER},
|
</if>
|
<if test="matterid != null" >
|
matterID = #{matterid,jdbcType=INTEGER},
|
</if>
|
<if test="remark != null" >
|
remark = #{remark,jdbcType=VARCHAR},
|
</if>
|
<if test="laststatus != null" >
|
lastStatus = #{laststatus,jdbcType=INTEGER},
|
</if>
|
<if test="starttime != null" >
|
startTime = #{starttime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="lasttime != null" >
|
lastTime = #{lasttime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="visitortypelabel != null" >
|
visitorTypeLabel = #{visitortypelabel,jdbcType=VARCHAR},
|
</if>
|
<if test="warning != null" >
|
warning = #{warning,jdbcType=VARCHAR},
|
</if>
|
</set>
|
where ID = #{id,jdbcType=INTEGER}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="cn.com.basic.face.discern.visit.entity.Visit" >
|
update t_visit
|
set visitorPersonID = #{visitorpersonid,jdbcType=INTEGER},
|
visiteePersonID = #{visiteepersonid,jdbcType=INTEGER},
|
matterID = #{matterid,jdbcType=INTEGER},
|
remark = #{remark,jdbcType=VARCHAR},
|
lastStatus = #{laststatus,jdbcType=INTEGER},
|
startTime = #{starttime,jdbcType=TIMESTAMP},
|
lastTime = #{lasttime,jdbcType=TIMESTAMP},
|
visitorTypeLabel = #{visitortypelabel,jdbcType=VARCHAR},
|
warning = #{warning,jdbcType=VARCHAR}
|
where ID = #{id,jdbcType=INTEGER}
|
</update>
|
</mapper>
|