|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
2
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
3
|
+<mapper namespace="com.chinaitop.agile.mapper.BasicEnumMapper" >
|
|
|
4
|
+ <resultMap id="BaseResultMap" type="com.chinaitop.agile.model.BasicEnum" >
|
|
|
5
|
+ <id column="enumId" property="enumid" jdbcType="INTEGER" />
|
|
|
6
|
+ <result column="enumCode" property="enumcode" jdbcType="VARCHAR" />
|
|
|
7
|
+ <result column="enumName" property="enumname" jdbcType="VARCHAR" />
|
|
|
8
|
+ <result column="gbCode" property="gbcode" jdbcType="VARCHAR" />
|
|
|
9
|
+ <result column="parentId" property="parentid" jdbcType="INTEGER" />
|
|
|
10
|
+ <result column="createDate" property="createdate" jdbcType="TIMESTAMP" />
|
|
|
11
|
+ <result column="remark" property="remark" jdbcType="VARCHAR" />
|
|
|
12
|
+ <result column="delFlag" property="delflag" jdbcType="INTEGER" />
|
|
|
13
|
+ </resultMap>
|
|
|
14
|
+ <sql id="Example_Where_Clause" >
|
|
|
15
|
+ <where >
|
|
|
16
|
+ <foreach collection="oredCriteria" item="criteria" separator="or" >
|
|
|
17
|
+ <if test="criteria.valid" >
|
|
|
18
|
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
|
|
|
19
|
+ <foreach collection="criteria.criteria" item="criterion" >
|
|
|
20
|
+ <choose >
|
|
|
21
|
+ <when test="criterion.noValue" >
|
|
|
22
|
+ and ${criterion.condition}
|
|
|
23
|
+ </when>
|
|
|
24
|
+ <when test="criterion.singleValue" >
|
|
|
25
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
26
|
+ </when>
|
|
|
27
|
+ <when test="criterion.betweenValue" >
|
|
|
28
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
29
|
+ </when>
|
|
|
30
|
+ <when test="criterion.listValue" >
|
|
|
31
|
+ and ${criterion.condition}
|
|
|
32
|
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
|
|
33
|
+ #{listItem}
|
|
|
34
|
+ </foreach>
|
|
|
35
|
+ </when>
|
|
|
36
|
+ </choose>
|
|
|
37
|
+ </foreach>
|
|
|
38
|
+ </trim>
|
|
|
39
|
+ </if>
|
|
|
40
|
+ </foreach>
|
|
|
41
|
+ </where>
|
|
|
42
|
+ </sql>
|
|
|
43
|
+ <sql id="Update_By_Example_Where_Clause" >
|
|
|
44
|
+ <where >
|
|
|
45
|
+ <foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
|
|
46
|
+ <if test="criteria.valid" >
|
|
|
47
|
+ <trim prefix="(" suffix=")" prefixOverrides="and" >
|
|
|
48
|
+ <foreach collection="criteria.criteria" item="criterion" >
|
|
|
49
|
+ <choose >
|
|
|
50
|
+ <when test="criterion.noValue" >
|
|
|
51
|
+ and ${criterion.condition}
|
|
|
52
|
+ </when>
|
|
|
53
|
+ <when test="criterion.singleValue" >
|
|
|
54
|
+ and ${criterion.condition} #{criterion.value}
|
|
|
55
|
+ </when>
|
|
|
56
|
+ <when test="criterion.betweenValue" >
|
|
|
57
|
+ and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
|
58
|
+ </when>
|
|
|
59
|
+ <when test="criterion.listValue" >
|
|
|
60
|
+ and ${criterion.condition}
|
|
|
61
|
+ <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
|
|
62
|
+ #{listItem}
|
|
|
63
|
+ </foreach>
|
|
|
64
|
+ </when>
|
|
|
65
|
+ </choose>
|
|
|
66
|
+ </foreach>
|
|
|
67
|
+ </trim>
|
|
|
68
|
+ </if>
|
|
|
69
|
+ </foreach>
|
|
|
70
|
+ </where>
|
|
|
71
|
+ </sql>
|
|
|
72
|
+ <sql id="Base_Column_List" >
|
|
|
73
|
+ enumId, enumCode, enumName, gbCode, parentId, createDate, remark, delFlag
|
|
|
74
|
+ </sql>
|
|
|
75
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
|
76
|
+ select
|
|
|
77
|
+ <include refid="Base_Column_List" />
|
|
|
78
|
+ from basic_enum
|
|
|
79
|
+ where enumId = #{enumid,jdbcType=INTEGER}
|
|
|
80
|
+ </select>
|
|
|
81
|
+
|
|
|
82
|
+</mapper>
|