UserSwitchMapper.xml
2.04 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
<?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.glsx.dj.system.mapper.UserSwitchMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.system.model.UserSwitch" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="switch_group" property="switchGroup" jdbcType="SMALLINT" />
<result column="switch_type" property="switchType" jdbcType="SMALLINT" />
<result column="status" property="status" jdbcType="TINYINT" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
<result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<resultMap id="DTOResultMap" type="cn.com.glsx.dj.system.dto.UserSwitchDTO" extends="BaseResultMap">
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, user_id, switch_group, switch_type, status, created_by, created_date, updated_by,
updated_date, deleted_flag
</sql>
<select id="list" parameterType="cn.com.glsx.dj.system.dto.UserSwitchDTO" resultMap="DTOResultMap">
select <include refid="Base_Column_List"/> from dj_system_user_switch
<where>
deleted_flag = 'N'
<if test="userId != null">
and user_id = #{userId}
</if>
<if test="switchGroup != null">
and switch_group = #{switchGroup}
</if>
<if test="switchType != null">
and switch_type = #{switchType}
</if>
<if test="status != null">
and status = #{status}
</if>
<if test="endDate != null">
and updated_date <![CDATA[ <= ]]> #{endDate}
</if>
</where>
order by id asc
</select>
</mapper>