|
@@ -0,0 +1,135 @@
|
|
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.community.huiju.dao.TaSysMenuMapper" >
|
|
4
|
+ <resultMap id="BaseResultMap" type="com.community.huiju.model.TaSysMenu" >
|
|
5
|
+ <id column="id" property="id" jdbcType="INTEGER" />
|
|
6
|
+ <result column="community_id" property="communityId" jdbcType="INTEGER" />
|
|
7
|
+ <result column="menu_name" property="menuName" jdbcType="VARCHAR" />
|
|
8
|
+ <result column="menu_url" property="menuUrl" jdbcType="VARCHAR" />
|
|
9
|
+ <result column="parent_id" property="parentId" jdbcType="INTEGER" />
|
|
10
|
+ <result column="sort" property="sort" jdbcType="INTEGER" />
|
|
11
|
+ <result column="menu_type" property="menuType" jdbcType="CHAR" />
|
|
12
|
+ <result column="status" property="status" jdbcType="CHAR" />
|
|
13
|
+ </resultMap>
|
|
14
|
+ <sql id="Base_Column_List" >
|
|
15
|
+ id, community_id, menu_name, menu_url, parent_id, sort, menu_type, status
|
|
16
|
+ </sql>
|
|
17
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
|
18
|
+ select
|
|
19
|
+ <include refid="Base_Column_List" />
|
|
20
|
+ from ta_sys_menu
|
|
21
|
+ where id = #{id,jdbcType=INTEGER}
|
|
22
|
+ </select>
|
|
23
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
|
24
|
+ delete from ta_sys_menu
|
|
25
|
+ where id = #{id,jdbcType=INTEGER}
|
|
26
|
+ </delete>
|
|
27
|
+ <insert id="insert" parameterType="com.community.huiju.model.TaSysMenu" >
|
|
28
|
+ insert into ta_sys_menu (id, community_id, menu_name,
|
|
29
|
+ menu_url, parent_id, sort,
|
|
30
|
+ menu_type, status)
|
|
31
|
+ values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{menuName,jdbcType=VARCHAR},
|
|
32
|
+ #{menuUrl,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
|
|
33
|
+ #{menuType,jdbcType=CHAR}, #{status,jdbcType=CHAR})
|
|
34
|
+ </insert>
|
|
35
|
+ <insert id="insertSelective" parameterType="com.community.huiju.model.TaSysMenu" >
|
|
36
|
+ insert into ta_sys_menu
|
|
37
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
38
|
+ <if test="id != null" >
|
|
39
|
+ id,
|
|
40
|
+ </if>
|
|
41
|
+ <if test="communityId != null" >
|
|
42
|
+ community_id,
|
|
43
|
+ </if>
|
|
44
|
+ <if test="menuName != null" >
|
|
45
|
+ menu_name,
|
|
46
|
+ </if>
|
|
47
|
+ <if test="menuUrl != null" >
|
|
48
|
+ menu_url,
|
|
49
|
+ </if>
|
|
50
|
+ <if test="parentId != null" >
|
|
51
|
+ parent_id,
|
|
52
|
+ </if>
|
|
53
|
+ <if test="sort != null" >
|
|
54
|
+ sort,
|
|
55
|
+ </if>
|
|
56
|
+ <if test="menuType != null" >
|
|
57
|
+ menu_type,
|
|
58
|
+ </if>
|
|
59
|
+ <if test="status != null" >
|
|
60
|
+ status,
|
|
61
|
+ </if>
|
|
62
|
+ </trim>
|
|
63
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
64
|
+ <if test="id != null" >
|
|
65
|
+ #{id,jdbcType=INTEGER},
|
|
66
|
+ </if>
|
|
67
|
+ <if test="communityId != null" >
|
|
68
|
+ #{communityId,jdbcType=INTEGER},
|
|
69
|
+ </if>
|
|
70
|
+ <if test="menuName != null" >
|
|
71
|
+ #{menuName,jdbcType=VARCHAR},
|
|
72
|
+ </if>
|
|
73
|
+ <if test="menuUrl != null" >
|
|
74
|
+ #{menuUrl,jdbcType=VARCHAR},
|
|
75
|
+ </if>
|
|
76
|
+ <if test="parentId != null" >
|
|
77
|
+ #{parentId,jdbcType=INTEGER},
|
|
78
|
+ </if>
|
|
79
|
+ <if test="sort != null" >
|
|
80
|
+ #{sort,jdbcType=INTEGER},
|
|
81
|
+ </if>
|
|
82
|
+ <if test="menuType != null" >
|
|
83
|
+ #{menuType,jdbcType=CHAR},
|
|
84
|
+ </if>
|
|
85
|
+ <if test="status != null" >
|
|
86
|
+ #{status,jdbcType=CHAR},
|
|
87
|
+ </if>
|
|
88
|
+ </trim>
|
|
89
|
+ </insert>
|
|
90
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TaSysMenu" >
|
|
91
|
+ update ta_sys_menu
|
|
92
|
+ <set >
|
|
93
|
+ <if test="communityId != null" >
|
|
94
|
+ community_id = #{communityId,jdbcType=INTEGER},
|
|
95
|
+ </if>
|
|
96
|
+ <if test="menuName != null" >
|
|
97
|
+ menu_name = #{menuName,jdbcType=VARCHAR},
|
|
98
|
+ </if>
|
|
99
|
+ <if test="menuUrl != null" >
|
|
100
|
+ menu_url = #{menuUrl,jdbcType=VARCHAR},
|
|
101
|
+ </if>
|
|
102
|
+ <if test="parentId != null" >
|
|
103
|
+ parent_id = #{parentId,jdbcType=INTEGER},
|
|
104
|
+ </if>
|
|
105
|
+ <if test="sort != null" >
|
|
106
|
+ sort = #{sort,jdbcType=INTEGER},
|
|
107
|
+ </if>
|
|
108
|
+ <if test="menuType != null" >
|
|
109
|
+ menu_type = #{menuType,jdbcType=CHAR},
|
|
110
|
+ </if>
|
|
111
|
+ <if test="status != null" >
|
|
112
|
+ status = #{status,jdbcType=CHAR},
|
|
113
|
+ </if>
|
|
114
|
+ </set>
|
|
115
|
+ where id = #{id,jdbcType=INTEGER}
|
|
116
|
+ </update>
|
|
117
|
+ <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TaSysMenu" >
|
|
118
|
+ update ta_sys_menu
|
|
119
|
+ set community_id = #{communityId,jdbcType=INTEGER},
|
|
120
|
+ menu_name = #{menuName,jdbcType=VARCHAR},
|
|
121
|
+ menu_url = #{menuUrl,jdbcType=VARCHAR},
|
|
122
|
+ parent_id = #{parentId,jdbcType=INTEGER},
|
|
123
|
+ sort = #{sort,jdbcType=INTEGER},
|
|
124
|
+ menu_type = #{menuType,jdbcType=CHAR},
|
|
125
|
+ status = #{status,jdbcType=CHAR}
|
|
126
|
+ where id = #{id,jdbcType=INTEGER}
|
|
127
|
+ </update>
|
|
128
|
+
|
|
129
|
+ <select id="selectByCommunity" resultMap="BaseResultMap">
|
|
130
|
+ select
|
|
131
|
+ <include refid="Base_Column_List" />
|
|
132
|
+ from ta_sys_menu
|
|
133
|
+ where community_id = #{communityId,jdbcType=INTEGER}
|
|
134
|
+ </select>
|
|
135
|
+</mapper>
|