CrmGuiderMapper.xml
2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?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.runsa.portal.base.dao.CrmGuiderMapper" >
<resultMap id="BaseResultMap" type="cn.runsa.portal.base.entity.CrmGuider" >
<id column="ID" property="id" jdbcType="INTEGER" />
<id column="GUIDER_ID" property="guiderId" jdbcType="VARCHAR" />
<result column="EMP_ID" property="empId" jdbcType="INTEGER" />
<result column="SITE_ID" property="siteId" jdbcType="INTEGER" />
<result column="role" property="role" jdbcType="INTEGER" />
<result column="HEADER" property="header" jdbcType="VARCHAR" />
<result column="role_description" property="roleDescription" jdbcType="INTEGER" />
<result column="state" property="state" jdbcType="INTEGER" />
<result column="REC_TIME" property="recTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
ID, GUIDER_ID, EMP_ID, SITE_ID, role, HEADER, role_description, state, REC_TIME
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from crm_guider
where ID = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from crm_guider
where ID = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="cn.runsa.portal.base.entity.CrmGuider" >
insert into crm_guider (GUIDER_ID, EMP_ID, SITE_ID,
role, HEADER, role_description, state,
REC_TIME)
values (#{guiderId,jdbcType=VARCHAR}, #{empId,jdbcType=INTEGER}, #{siteId,jdbcType=INTEGER},
#{role,jdbcType=INTEGER}, #{header,jdbcType=VARCHAR}, #{roleDescription,jdbcType=INTEGER}, #{state,jdbcType=INTEGER},
now())
</insert>
<update id="updateByPrimaryKey" parameterType="cn.runsa.portal.base.entity.CrmGuider" >
update crm_guider
set
GUIDER_ID = #{guiderId,jdbcType=VARCHAR},
EMP_ID = #{empId,jdbcType=INTEGER},
SITE_ID = #{siteId,jdbcType=INTEGER},
role = #{role,jdbcType=INTEGER},
HEADER = #{header,jdbcType=VARCHAR},
role_description = #{roleDescription,jdbcType=INTEGER},
state = #{state,jdbcType=INTEGER},
REC_TIME = now()
where ID = #{id,jdbcType=INTEGER}
</update>
<update id="updateRoleByPrimaryKey" parameterType="cn.runsa.portal.base.entity.CrmGuider" >
UPDATE crm_guider t SET t.role = #{role,jdbcType=INTEGER} WHERE t.ID = #{id,jdbcType=INTEGER}
</update>
<delete id="deleteBySiid" parameterType="java.lang.Integer" >
delete from crm_guider
where SITE_ID = #{siid,jdbcType=INTEGER}
</delete>
</mapper>