傅行帆 6 年前
父节点
当前提交
3ddf21431a

+ 8
- 0
SmartCommunity/mybatisGeneratorCode/src/main/java/com/community/huiju/common/base/BaseController.java 查看文件

@@ -0,0 +1,8 @@
1
+package com.community.huiju.common.base;
2
+
3
+/**
4
+ * @author FXF
5
+ * @date 2018-12-18
6
+ */
7
+public class BaseController {
8
+}

SmartCommunity/mybatisGeneratorCode/src/main/java/com/baomidou/ant/tp/controller/UserController.java → SmartCommunity/mybatisGeneratorCode/src/main/java/com/community/huiju/tp/controller/UserController.java 查看文件

@@ -1,9 +1,10 @@
1
-package com.baomidou.ant.tp.controller;
1
+package com.community.huiju.tp.controller;
2 2
 
3 3
 
4 4
 import org.springframework.web.bind.annotation.RequestMapping;
5 5
 
6 6
 import org.springframework.web.bind.annotation.RestController;
7
+import com.community.huiju.common.base.BaseController;
7 8
 
8 9
 /**
9 10
  * <p>
@@ -15,6 +16,6 @@ import org.springframework.web.bind.annotation.RestController;
15 16
  */
16 17
 @RestController
17 18
 @RequestMapping("/tp/user")
18
-public class UserController {
19
+public class UserController extends BaseController {
19 20
 
20 21
 }

SmartCommunity/mybatisGeneratorCode/src/main/java/com/baomidou/ant/tp/entity/User.java → SmartCommunity/mybatisGeneratorCode/src/main/java/com/community/huiju/tp/entity/User.java 查看文件

@@ -1,4 +1,4 @@
1
-package com.baomidou.ant.tp.entity;
1
+package com.community.huiju.tp.entity;
2 2
 
3 3
 import com.baomidou.mybatisplus.annotation.TableName;
4 4
 import java.time.LocalDateTime;

SmartCommunity/mybatisGeneratorCode/src/main/java/com/baomidou/ant/tp/mapper/UserMapper.java → SmartCommunity/mybatisGeneratorCode/src/main/java/com/community/huiju/tp/mapper/UserMapper.java 查看文件

@@ -1,6 +1,6 @@
1
-package com.baomidou.ant.tp.mapper;
1
+package com.community.huiju.tp.mapper;
2 2
 
3
-import com.baomidou.ant.tp.entity.User;
3
+import com.community.huiju.tp.entity.User;
4 4
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5 5
 
6 6
 /**

SmartCommunity/mybatisGeneratorCode/src/main/java/com/baomidou/ant/tp/service/IUserService.java → SmartCommunity/mybatisGeneratorCode/src/main/java/com/community/huiju/tp/service/IUserService.java 查看文件

@@ -1,6 +1,6 @@
1
-package com.baomidou.ant.tp.service;
1
+package com.community.huiju.tp.service;
2 2
 
3
-import com.baomidou.ant.tp.entity.User;
3
+import com.community.huiju.tp.entity.User;
4 4
 import com.baomidou.mybatisplus.extension.service.IService;
5 5
 
6 6
 /**

SmartCommunity/mybatisGeneratorCode/src/main/java/com/baomidou/ant/tp/service/impl/UserServiceImpl.java → SmartCommunity/mybatisGeneratorCode/src/main/java/com/community/huiju/tp/service/impl/UserServiceImpl.java 查看文件

@@ -1,8 +1,8 @@
1
-package com.baomidou.ant.tp.service.impl;
1
+package com.community.huiju.tp.service.impl;
2 2
 
3
-import com.baomidou.ant.tp.entity.User;
4
-import com.baomidou.ant.tp.mapper.UserMapper;
5
-import com.baomidou.ant.tp.service.IUserService;
3
+import com.community.huiju.tp.entity.User;
4
+import com.community.huiju.tp.mapper.UserMapper;
5
+import com.community.huiju.tp.service.IUserService;
6 6
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
7 7
 import org.springframework.stereotype.Service;
8 8
 

+ 1
- 1
SmartCommunity/mybatisGeneratorCode/src/main/java/com/example/demo/MybatiesPlus.java 查看文件

@@ -116,7 +116,7 @@ public class MybatiesPlus {
116 116
 			//strategy.setSuperEntityClass("com.baomidou.ant.common.BaseEntity");
117 117
 			strategy.setEntityLombokModel(true);
118 118
 			strategy.setRestControllerStyle(true);
119
-			//strategy.setSuperControllerClass("com.baomidou.ant.common.BaseController");
119
+			strategy.setSuperControllerClass("com.community.huiju.common.base.BaseController");
120 120
 			strategy.setInclude(scanner("表名"));
121 121
 			strategy.setSuperEntityColumns("id");
122 122
 			strategy.setControllerMappingHyphenStyle(true);

+ 0
- 235
SmartCommunity/mybatisGeneratorCode/src/main/resources/com/community/huiju/dao/TpMessageMapper.xml 查看文件

@@ -1,235 +0,0 @@
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="dao.TpMessageMapper" >
4
-  <resultMap id="BaseResultMap" type="com.community.huiju.model.TpMessage" >
5
-    <id column="id" property="id" jdbcType="INTEGER" />
6
-    <result column="community_id" property="communityId" jdbcType="INTEGER" />
7
-    <result column="message_type" property="messageType" jdbcType="CHAR" />
8
-    <result column="advice_type" property="adviceType" jdbcType="CHAR" />
9
-    <result column="model_type" property="modelType" jdbcType="CHAR" />
10
-    <result column="uuid" property="uuid" jdbcType="INTEGER" />
11
-    <result column="uuid_type" property="uuidType" jdbcType="CHAR" />
12
-    <result column="source" property="source" jdbcType="CHAR" />
13
-    <result column="message_content" property="messageContent" jdbcType="VARCHAR" />
14
-    <result column="status" property="status" jdbcType="CHAR" />
15
-    <result column="result" property="result" jdbcType="VARCHAR" />
16
-    <result column="meaasge_type_id" property="meaasgeTypeId" jdbcType="VARCHAR" />
17
-    <result column="read_status" property="readStatus" jdbcType="CHAR" />
18
-    <result column="create_user" property="createUser" jdbcType="INTEGER" />
19
-    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
20
-    <result column="update_user" property="updateUser" jdbcType="INTEGER" />
21
-    <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
22
-  </resultMap>
23
-  <sql id="Base_Column_List" >
24
-    id, community_id, message_type, advice_type, model_type, uuid, uuid_type, source, 
25
-    message_content, status, result, meaasge_type_id, read_status, create_user, create_date, 
26
-    update_user, update_date
27
-  </sql>
28
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
29
-    select 
30
-    <include refid="Base_Column_List" />
31
-    from tp_message
32
-    where id = #{id,jdbcType=INTEGER}
33
-  </select>
34
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
35
-    delete from tp_message
36
-    where id = #{id,jdbcType=INTEGER}
37
-  </delete>
38
-  <insert id="insert" parameterType="com.community.huiju.model.TpMessage" >
39
-    insert into tp_message (id, community_id, message_type, 
40
-      advice_type, model_type, uuid, 
41
-      uuid_type, source, message_content, 
42
-      status, result, meaasge_type_id, 
43
-      read_status, create_user, create_date, 
44
-      update_user, update_date)
45
-    values (#{id,jdbcType=INTEGER}, #{communityId,jdbcType=INTEGER}, #{messageType,jdbcType=CHAR}, 
46
-      #{adviceType,jdbcType=CHAR}, #{modelType,jdbcType=CHAR}, #{uuid,jdbcType=INTEGER}, 
47
-      #{uuidType,jdbcType=CHAR}, #{source,jdbcType=CHAR}, #{messageContent,jdbcType=VARCHAR}, 
48
-      #{status,jdbcType=CHAR}, #{result,jdbcType=VARCHAR}, #{meaasgeTypeId,jdbcType=VARCHAR}, 
49
-      #{readStatus,jdbcType=CHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
50
-      #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
51
-  </insert>
52
-  <insert id="insertSelective" parameterType="com.community.huiju.model.TpMessage" >
53
-    insert into tp_message
54
-    <trim prefix="(" suffix=")" suffixOverrides="," >
55
-      <if test="id != null" >
56
-        id,
57
-      </if>
58
-      <if test="communityId != null" >
59
-        community_id,
60
-      </if>
61
-      <if test="messageType != null" >
62
-        message_type,
63
-      </if>
64
-      <if test="adviceType != null" >
65
-        advice_type,
66
-      </if>
67
-      <if test="modelType != null" >
68
-        model_type,
69
-      </if>
70
-      <if test="uuid != null" >
71
-        uuid,
72
-      </if>
73
-      <if test="uuidType != null" >
74
-        uuid_type,
75
-      </if>
76
-      <if test="source != null" >
77
-        source,
78
-      </if>
79
-      <if test="messageContent != null" >
80
-        message_content,
81
-      </if>
82
-      <if test="status != null" >
83
-        status,
84
-      </if>
85
-      <if test="result != null" >
86
-        result,
87
-      </if>
88
-      <if test="meaasgeTypeId != null" >
89
-        meaasge_type_id,
90
-      </if>
91
-      <if test="readStatus != null" >
92
-        read_status,
93
-      </if>
94
-      <if test="createUser != null" >
95
-        create_user,
96
-      </if>
97
-      <if test="createDate != null" >
98
-        create_date,
99
-      </if>
100
-      <if test="updateUser != null" >
101
-        update_user,
102
-      </if>
103
-      <if test="updateDate != null" >
104
-        update_date,
105
-      </if>
106
-    </trim>
107
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
108
-      <if test="id != null" >
109
-        #{id,jdbcType=INTEGER},
110
-      </if>
111
-      <if test="communityId != null" >
112
-        #{communityId,jdbcType=INTEGER},
113
-      </if>
114
-      <if test="messageType != null" >
115
-        #{messageType,jdbcType=CHAR},
116
-      </if>
117
-      <if test="adviceType != null" >
118
-        #{adviceType,jdbcType=CHAR},
119
-      </if>
120
-      <if test="modelType != null" >
121
-        #{modelType,jdbcType=CHAR},
122
-      </if>
123
-      <if test="uuid != null" >
124
-        #{uuid,jdbcType=INTEGER},
125
-      </if>
126
-      <if test="uuidType != null" >
127
-        #{uuidType,jdbcType=CHAR},
128
-      </if>
129
-      <if test="source != null" >
130
-        #{source,jdbcType=CHAR},
131
-      </if>
132
-      <if test="messageContent != null" >
133
-        #{messageContent,jdbcType=VARCHAR},
134
-      </if>
135
-      <if test="status != null" >
136
-        #{status,jdbcType=CHAR},
137
-      </if>
138
-      <if test="result != null" >
139
-        #{result,jdbcType=VARCHAR},
140
-      </if>
141
-      <if test="meaasgeTypeId != null" >
142
-        #{meaasgeTypeId,jdbcType=VARCHAR},
143
-      </if>
144
-      <if test="readStatus != null" >
145
-        #{readStatus,jdbcType=CHAR},
146
-      </if>
147
-      <if test="createUser != null" >
148
-        #{createUser,jdbcType=INTEGER},
149
-      </if>
150
-      <if test="createDate != null" >
151
-        #{createDate,jdbcType=TIMESTAMP},
152
-      </if>
153
-      <if test="updateUser != null" >
154
-        #{updateUser,jdbcType=INTEGER},
155
-      </if>
156
-      <if test="updateDate != null" >
157
-        #{updateDate,jdbcType=TIMESTAMP},
158
-      </if>
159
-    </trim>
160
-  </insert>
161
-  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.TpMessage" >
162
-    update tp_message
163
-    <set >
164
-      <if test="communityId != null" >
165
-        community_id = #{communityId,jdbcType=INTEGER},
166
-      </if>
167
-      <if test="messageType != null" >
168
-        message_type = #{messageType,jdbcType=CHAR},
169
-      </if>
170
-      <if test="adviceType != null" >
171
-        advice_type = #{adviceType,jdbcType=CHAR},
172
-      </if>
173
-      <if test="modelType != null" >
174
-        model_type = #{modelType,jdbcType=CHAR},
175
-      </if>
176
-      <if test="uuid != null" >
177
-        uuid = #{uuid,jdbcType=INTEGER},
178
-      </if>
179
-      <if test="uuidType != null" >
180
-        uuid_type = #{uuidType,jdbcType=CHAR},
181
-      </if>
182
-      <if test="source != null" >
183
-        source = #{source,jdbcType=CHAR},
184
-      </if>
185
-      <if test="messageContent != null" >
186
-        message_content = #{messageContent,jdbcType=VARCHAR},
187
-      </if>
188
-      <if test="status != null" >
189
-        status = #{status,jdbcType=CHAR},
190
-      </if>
191
-      <if test="result != null" >
192
-        result = #{result,jdbcType=VARCHAR},
193
-      </if>
194
-      <if test="meaasgeTypeId != null" >
195
-        meaasge_type_id = #{meaasgeTypeId,jdbcType=VARCHAR},
196
-      </if>
197
-      <if test="readStatus != null" >
198
-        read_status = #{readStatus,jdbcType=CHAR},
199
-      </if>
200
-      <if test="createUser != null" >
201
-        create_user = #{createUser,jdbcType=INTEGER},
202
-      </if>
203
-      <if test="createDate != null" >
204
-        create_date = #{createDate,jdbcType=TIMESTAMP},
205
-      </if>
206
-      <if test="updateUser != null" >
207
-        update_user = #{updateUser,jdbcType=INTEGER},
208
-      </if>
209
-      <if test="updateDate != null" >
210
-        update_date = #{updateDate,jdbcType=TIMESTAMP},
211
-      </if>
212
-    </set>
213
-    where id = #{id,jdbcType=INTEGER}
214
-  </update>
215
-  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.TpMessage" >
216
-    update tp_message
217
-    set community_id = #{communityId,jdbcType=INTEGER},
218
-      message_type = #{messageType,jdbcType=CHAR},
219
-      advice_type = #{adviceType,jdbcType=CHAR},
220
-      model_type = #{modelType,jdbcType=CHAR},
221
-      uuid = #{uuid,jdbcType=INTEGER},
222
-      uuid_type = #{uuidType,jdbcType=CHAR},
223
-      source = #{source,jdbcType=CHAR},
224
-      message_content = #{messageContent,jdbcType=VARCHAR},
225
-      status = #{status,jdbcType=CHAR},
226
-      result = #{result,jdbcType=VARCHAR},
227
-      meaasge_type_id = #{meaasgeTypeId,jdbcType=VARCHAR},
228
-      read_status = #{readStatus,jdbcType=CHAR},
229
-      create_user = #{createUser,jdbcType=INTEGER},
230
-      create_date = #{createDate,jdbcType=TIMESTAMP},
231
-      update_user = #{updateUser,jdbcType=INTEGER},
232
-      update_date = #{updateDate,jdbcType=TIMESTAMP}
233
-    where id = #{id,jdbcType=INTEGER}
234
-  </update>
235
-</mapper>

+ 1
- 1
SmartCommunity/mybatisGeneratorCode/src/main/resources/mapper/tp/UserMapper.xml 查看文件

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.baomidou.ant.tp.mapper.UserMapper">
3
+<mapper namespace="com.community.huiju.tp.mapper.UserMapper">
4 4
 
5 5
 </mapper>