作者 王勇

格式化xml代码规范

@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 <resultMap id="ExchangeAndHostMap" extends="BaseResultMap" 22 <resultMap id="ExchangeAndHostMap" extends="BaseResultMap"
23 type="com.sunyo.wlpt.message.bus.service.domain.BusExchange"> 23 type="com.sunyo.wlpt.message.bus.service.domain.BusExchange">
24 <association property="virtualHost" javaType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost"> 24 <association property="virtualHost" javaType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost">
25 - <id column="id" property="id"></id> 25 + <id column="id" property="id"/>
26 <result column="virtual_host_name" property="virtualHostName"/> 26 <result column="virtual_host_name" property="virtualHostName"/>
27 </association> 27 </association>
28 </resultMap> 28 </resultMap>
@@ -43,17 +43,27 @@ @@ -43,17 +43,27 @@
43 <!-- 获取交换机列表 --> 43 <!-- 获取交换机列表 -->
44 <select id="selectBusExchangeList" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusExchange" 44 <select id="selectBusExchangeList" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusExchange"
45 resultMap="ExchangeAndHostMap"> 45 resultMap="ExchangeAndHostMap">
46 - select  
47 - e.id, e.exchange_name, e.virtual_host_id, e.exchange_type, e.durability, e.auto_delete, e.internal,  
48 - e.arguments, e.description, e.gmt_create, e.gmt_modified,v.virtual_host_name  
49 - from bus_exchange as e,virtual_host as v 46 + select e.id,
  47 + e.exchange_name,
  48 + e.virtual_host_id,
  49 + e.exchange_type,
  50 + e.durability,
  51 + e.auto_delete,
  52 + e.internal,
  53 + e.arguments,
  54 + e.description,
  55 + e.gmt_create,
  56 + e.gmt_modified,
  57 + v.virtual_host_name
  58 + from bus_exchange as e,
  59 + virtual_host as v
50 <where> 60 <where>
51 <!-- 所属虚拟主机ID --> 61 <!-- 所属虚拟主机ID -->
52 - <if test="virtualHostId != null and virtualHostId !=''"> 62 + <if test="virtualHostId != null and virtualHostId != ''">
53 e.virtual_host_id = #{virtualHostId,jdbcType=VARCHAR} 63 e.virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}
54 </if> 64 </if>
55 <!-- 交换机名称 --> 65 <!-- 交换机名称 -->
56 - <if test="exchangeName != null and exchangeName !=''"> 66 + <if test="exchangeName != null and exchangeName != ''">
57 and e.exchange_name = #{exchangeName,jdbcType=VARCHAR} 67 and e.exchange_name = #{exchangeName,jdbcType=VARCHAR}
58 </if> 68 </if>
59 and e.virtual_host_id = v.id 69 and e.virtual_host_id = v.id
@@ -67,7 +77,7 @@ @@ -67,7 +77,7 @@
67 from bus_exchange 77 from bus_exchange
68 <where> 78 <where>
69 <!-- 交换机名称 --> 79 <!-- 交换机名称 -->
70 - <if test="exchangeName != null and exchangeName !=''"> 80 + <if test="exchangeName != null and exchangeName != ''">
71 exchange_name = #{exchangeName,jdbcType=VARCHAR} 81 exchange_name = #{exchangeName,jdbcType=VARCHAR}
72 </if> 82 </if>
73 </where> 83 </where>
@@ -79,7 +89,7 @@ @@ -79,7 +89,7 @@
79 from bus_exchange 89 from bus_exchange
80 <where> 90 <where>
81 <!-- 所属虚拟主机ID --> 91 <!-- 所属虚拟主机ID -->
82 - <if test="virtualHostId != null and virtualHostId !=''"> 92 + <if test="virtualHostId != null and virtualHostId != ''">
83 virtual_host_id = #{virtualHostId,jdbcType=VARCHAR} 93 virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}
84 </if> 94 </if>
85 </where> 95 </where>
@@ -87,7 +97,8 @@ @@ -87,7 +97,8 @@
87 97
88 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 98 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
89 <!--@mbg.generated--> 99 <!--@mbg.generated-->
90 - delete from bus_exchange 100 + delete
  101 + from bus_exchange
91 where id = #{id,jdbcType=VARCHAR} 102 where id = #{id,jdbcType=VARCHAR}
92 </delete> 103 </delete>
93 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusExchange"> 104 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusExchange">
@@ -227,5 +238,4 @@ @@ -227,5 +238,4 @@
227 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} 238 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
228 where id = #{id,jdbcType=VARCHAR} 239 where id = #{id,jdbcType=VARCHAR}
229 </update> 240 </update>
230 -  
231 </mapper> 241 </mapper>
@@ -4,17 +4,17 @@ @@ -4,17 +4,17 @@
4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> 4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.BusQueue">
5 <!--@mbg.generated--> 5 <!--@mbg.generated-->
6 <!--@Table bus_queue--> 6 <!--@Table bus_queue-->
7 - <id column="id" jdbcType="VARCHAR" property="id" />  
8 - <result column="queue_name" jdbcType="VARCHAR" property="queueName" />  
9 - <result column="user_id" jdbcType="VARCHAR" property="userId" />  
10 - <result column="username" jdbcType="VARCHAR" property="username" />  
11 - <result column="virtual_host_id" jdbcType="VARCHAR" property="virtualHostId" />  
12 - <result column="durability" jdbcType="BOOLEAN" property="durability" />  
13 - <result column="auto_delete" jdbcType="BOOLEAN" property="autoDelete" />  
14 - <result column="arguments" jdbcType="VARCHAR" property="arguments" />  
15 - <result column="description" jdbcType="VARCHAR" property="description" />  
16 - <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />  
17 - <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" /> 7 + <id column="id" jdbcType="VARCHAR" property="id"/>
  8 + <result column="queue_name" jdbcType="VARCHAR" property="queueName"/>
  9 + <result column="user_id" jdbcType="VARCHAR" property="userId"/>
  10 + <result column="username" jdbcType="VARCHAR" property="username"/>
  11 + <result column="virtual_host_id" jdbcType="VARCHAR" property="virtualHostId"/>
  12 + <result column="durability" jdbcType="BOOLEAN" property="durability"/>
  13 + <result column="auto_delete" jdbcType="BOOLEAN" property="autoDelete"/>
  14 + <result column="arguments" jdbcType="VARCHAR" property="arguments"/>
  15 + <result column="description" jdbcType="VARCHAR" property="description"/>
  16 + <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>
  17 + <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified"/>
18 </resultMap> 18 </resultMap>
19 <sql id="Base_Column_List"> 19 <sql id="Base_Column_List">
20 <!--@mbg.generated--> 20 <!--@mbg.generated-->
@@ -24,13 +24,14 @@ @@ -24,13 +24,14 @@
24 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> 24 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
25 <!--@mbg.generated--> 25 <!--@mbg.generated-->
26 select 26 select
27 - <include refid="Base_Column_List" /> 27 + <include refid="Base_Column_List"/>
28 from bus_queue 28 from bus_queue
29 where id = #{id,jdbcType=VARCHAR} 29 where id = #{id,jdbcType=VARCHAR}
30 </select> 30 </select>
31 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 31 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
32 <!--@mbg.generated--> 32 <!--@mbg.generated-->
33 - delete from bus_queue 33 + delete
  34 + from bus_queue
34 where id = #{id,jdbcType=VARCHAR} 35 where id = #{id,jdbcType=VARCHAR}
35 </delete> 36 </delete>
36 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> 37 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue">
@@ -174,55 +175,71 @@ @@ -174,55 +175,71 @@
174 <!-- 该Mapper映射关系的作用,是队列与虚拟主机的1:1的关系映射 --> 175 <!-- 该Mapper映射关系的作用,是队列与虚拟主机的1:1的关系映射 -->
175 <resultMap extends="BaseResultMap" id="QueueAndHostMap" type="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> 176 <resultMap extends="BaseResultMap" id="QueueAndHostMap" type="com.sunyo.wlpt.message.bus.service.domain.BusQueue">
176 <association javaType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost" property="virtualHost"> 177 <association javaType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost" property="virtualHost">
177 - <id column="id" property="id" />  
178 - <result column="virtual_host_name" property="virtualHostName" /> 178 + <id column="id" property="id"/>
  179 + <result column="virtual_host_name" property="virtualHostName"/>
179 </association> 180 </association>
180 </resultMap> 181 </resultMap>
181 <!-- 获取消息队列,列表 --> 182 <!-- 获取消息队列,列表 -->
182 - <select id="selectBusQueueList" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue" resultMap="QueueAndHostMap">  
183 - select  
184 - q.id, q.queue_name, q.virtual_host_id, q.durability, q.auto_delete, q.arguments, q.description,q.user_id,q.username,  
185 - q.gmt_create, q.gmt_modified,v.virtual_host_name  
186 - from bus_queue as q,virtual_host v 183 + <select id="selectBusQueueList" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"
  184 + resultMap="QueueAndHostMap">
  185 + select q.id,
  186 + q.queue_name,
  187 + q.virtual_host_id,
  188 + q.durability,
  189 + q.auto_delete,
  190 + q.arguments,
  191 + q.description,
  192 + q.user_id,
  193 + q.username,
  194 + q.gmt_create,
  195 + q.gmt_modified,
  196 + v.virtual_host_name
  197 + from bus_queue as q,
  198 + virtual_host v
187 <where> 199 <where>
188 <!-- 所属虚拟主机Id --> 200 <!-- 所属虚拟主机Id -->
189 - <if test="virtualHostId != null and virtualHostId !=''"> 201 + <if test="virtualHostId != null and virtualHostId != ''">
190 virtual_host_id = #{virtualHostId,jdbcType=VARCHAR} 202 virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}
191 </if> 203 </if>
  204 + <!-- 用户名称 -->
  205 + <if test="username != null and username != ''">
  206 + and username = #{username,jdbcType=VARCHAR}
  207 + </if>
192 <!-- 消息队列名称 --> 208 <!-- 消息队列名称 -->
193 - <if test="queueName != null and queueName !=''"> 209 + <if test="queueName != null and queueName != ''">
194 and queue_name = #{queueName,jdbcType=VARCHAR} 210 and queue_name = #{queueName,jdbcType=VARCHAR}
195 </if> 211 </if>
196 and v.id = q.virtual_host_id 212 and v.id = q.virtual_host_id
197 </where> 213 </where>
198 </select> 214 </select>
199 <!-- 校验消息队列是否已存在--> 215 <!-- 校验消息队列是否已存在-->
200 - <select id="validateBusQueue" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue" resultMap="BaseResultMap"> 216 + <select id="validateBusQueue" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"
  217 + resultMap="BaseResultMap">
201 select 218 select
202 - <include refid="Base_Column_List" /> 219 + <include refid="Base_Column_List"/>
203 from bus_queue 220 from bus_queue
204 <where> 221 <where>
205 <!-- 消息队列名称 --> 222 <!-- 消息队列名称 -->
206 - <if test="queueName != null and queueName !=''"> 223 + <if test="queueName != null and queueName != ''">
207 queue_name = #{queueName,jdbcType=VARCHAR} 224 queue_name = #{queueName,jdbcType=VARCHAR}
208 </if> 225 </if>
209 </where> 226 </where>
210 </select> 227 </select>
211 228
212 <!-- 仅,查询队列列表 --> 229 <!-- 仅,查询队列列表 -->
213 - <select id="getQueueList" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue" resultMap="BaseResultMap"> 230 + <select id="getQueueList" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"
  231 + resultMap="BaseResultMap">
214 select 232 select
215 - <include refid="Base_Column_List" /> 233 + <include refid="Base_Column_List"/>
216 from bus_queue 234 from bus_queue
217 <where> 235 <where>
218 <!-- 所属虚拟主机Id --> 236 <!-- 所属虚拟主机Id -->
219 - <if test="virtualHostId != null and virtualHostId !=''"> 237 + <if test="virtualHostId != null and virtualHostId != ''">
220 virtual_host_id = #{virtualHostId,jdbcType=VARCHAR} 238 virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}
221 </if> 239 </if>
222 - <if test="userId != null and userId !=''"> 240 + <if test="userId != null and userId != ''">
223 and user_id = #{userId,jdbcType=VARCHAR} 241 and user_id = #{userId,jdbcType=VARCHAR}
224 </if> 242 </if>
225 </where> 243 </where>
226 </select> 244 </select>
227 -  
228 </mapper> 245 </mapper>
@@ -60,17 +60,26 @@ @@ -60,17 +60,26 @@
60 60
61 <!-- 查询服务器和虚拟主机基本信息(id,名称) --> 61 <!-- 查询服务器和虚拟主机基本信息(id,名称) -->
62 <select id="getServerAndHostList" resultMap="ServerAndVirtualHostMap"> 62 <select id="getServerAndHostList" resultMap="ServerAndVirtualHostMap">
63 - select  
64 - s.id,s.server_name,v.id as vid,v.virtual_host_name  
65 - from bus_server as s, virtual_host as v 63 + select s.id,
  64 + s.server_name,
  65 + v.id as vid,
  66 + v.virtual_host_name
  67 + from bus_server as s,
  68 + virtual_host as v
66 where s.id = v.server_id 69 where s.id = v.server_id
67 </select> 70 </select>
68 71
69 <!-- 查询服务器和虚拟主机以及虚拟机基本信息(id,名称) --> 72 <!-- 查询服务器和虚拟主机以及虚拟机基本信息(id,名称) -->
70 <select id="getServerAndHostAndExchangeList" resultMap="ServerAndHostAndExchangeMap"> 73 <select id="getServerAndHostAndExchangeList" resultMap="ServerAndHostAndExchangeMap">
71 - select  
72 - s.id,s.server_name,v.id as vid,v.virtual_host_name,e.id as eid,e.exchange_name  
73 - from bus_server as s, virtual_host as v,bus_exchange as e 74 + select s.id,
  75 + s.server_name,
  76 + v.id as vid,
  77 + v.virtual_host_name,
  78 + e.id as eid,
  79 + e.exchange_name
  80 + from bus_server as s,
  81 + virtual_host as v,
  82 + bus_exchange as e
74 where s.id = v.server_id 83 where s.id = v.server_id
75 and v.id = e.virtual_host_id 84 and v.id = e.virtual_host_id
76 </select> 85 </select>
@@ -82,7 +91,7 @@ @@ -82,7 +91,7 @@
82 from bus_server 91 from bus_server
83 <where> 92 <where>
84 <!-- 服务器名称 --> 93 <!-- 服务器名称 -->
85 - <if test="serverName != null and serverName !=''"> 94 + <if test="serverName != null and serverName != ''">
86 server_name = #{serverName,jdbcType=VARCHAR} 95 server_name = #{serverName,jdbcType=VARCHAR}
87 </if> 96 </if>
88 </where> 97 </where>
@@ -96,7 +105,7 @@ @@ -96,7 +105,7 @@
96 from bus_server 105 from bus_server
97 <where> 106 <where>
98 <!-- 服务器名称 --> 107 <!-- 服务器名称 -->
99 - <if test="serverName != null and serverName !=''"> 108 + <if test="serverName != null and serverName != ''">
100 server_name = #{serverName,jdbcType=VARCHAR} 109 server_name = #{serverName,jdbcType=VARCHAR}
101 </if> 110 </if>
102 </where> 111 </where>
@@ -109,11 +118,11 @@ @@ -109,11 +118,11 @@
109 from bus_server 118 from bus_server
110 <where> 119 <where>
111 <!-- 服务器的ip --> 120 <!-- 服务器的ip -->
112 - <if test="serverIp != null and serverIp !=''"> 121 + <if test="serverIp != null and serverIp != ''">
113 server_ip = #{serverIp,jdbcType=VARCHAR} 122 server_ip = #{serverIp,jdbcType=VARCHAR}
114 </if> 123 </if>
115 <!-- 服务器的port --> 124 <!-- 服务器的port -->
116 - <if test="serverPort != null and serverPort !=''"> 125 + <if test="serverPort != null and serverPort != ''">
117 AND server_port = #{serverPort,jdbcType=VARCHAR} 126 AND server_port = #{serverPort,jdbcType=VARCHAR}
118 </if> 127 </if>
119 </where> 128 </where>
@@ -121,7 +130,8 @@ @@ -121,7 +130,8 @@
121 130
122 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 131 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
123 <!--@mbg.generated--> 132 <!--@mbg.generated-->
124 - delete from bus_server 133 + delete
  134 + from bus_server
125 where id = #{id,jdbcType=VARCHAR} 135 where id = #{id,jdbcType=VARCHAR}
126 </delete> 136 </delete>
127 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusServer"> 137 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusServer">
@@ -219,6 +229,4 @@ @@ -219,6 +229,4 @@
219 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} 229 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
220 where id = #{id,jdbcType=VARCHAR} 230 where id = #{id,jdbcType=VARCHAR}
221 </update> 231 </update>
222 -  
223 -  
224 </mapper> 232 </mapper>
@@ -4,25 +4,25 @@ @@ -4,25 +4,25 @@
4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> 4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.MessageNote">
5 <!--@mbg.generated--> 5 <!--@mbg.generated-->
6 <!--@Table message_note--> 6 <!--@Table message_note-->
7 - <id column="id" jdbcType="VARCHAR" property="id" />  
8 - <result column="user_id" jdbcType="VARCHAR" property="userId" />  
9 - <result column="username" jdbcType="VARCHAR" property="username" />  
10 - <result column="server_id" jdbcType="VARCHAR" property="serverId" />  
11 - <result column="server_name" jdbcType="VARCHAR" property="serverName" />  
12 - <result column="virtual_host_id" jdbcType="VARCHAR" property="virtualHostId" />  
13 - <result column="virtual_host_name" jdbcType="VARCHAR" property="virtualHostName" />  
14 - <result column="exchange_id" jdbcType="VARCHAR" property="exchangeId" />  
15 - <result column="exchange_name" jdbcType="VARCHAR" property="exchangeName" />  
16 - <result column="queue_id" jdbcType="VARCHAR" property="queueId" />  
17 - <result column="queue_name" jdbcType="VARCHAR" property="queueName" />  
18 - <result column="routing_key_id" jdbcType="VARCHAR" property="routingKeyId" />  
19 - <result column="routing_key_name" jdbcType="VARCHAR" property="routingKeyName" />  
20 - <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />  
21 - <result column="receive_time" jdbcType="TIMESTAMP" property="receiveTime" />  
22 - <result column="send_content" jdbcType="BLOB" property="sendContent" />  
23 - <result column="description" jdbcType="VARCHAR" property="description" />  
24 - <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />  
25 - <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" /> 7 + <id column="id" jdbcType="VARCHAR" property="id"/>
  8 + <result column="user_id" jdbcType="VARCHAR" property="userId"/>
  9 + <result column="username" jdbcType="VARCHAR" property="username"/>
  10 + <result column="server_id" jdbcType="VARCHAR" property="serverId"/>
  11 + <result column="server_name" jdbcType="VARCHAR" property="serverName"/>
  12 + <result column="virtual_host_id" jdbcType="VARCHAR" property="virtualHostId"/>
  13 + <result column="virtual_host_name" jdbcType="VARCHAR" property="virtualHostName"/>
  14 + <result column="exchange_id" jdbcType="VARCHAR" property="exchangeId"/>
  15 + <result column="exchange_name" jdbcType="VARCHAR" property="exchangeName"/>
  16 + <result column="queue_id" jdbcType="VARCHAR" property="queueId"/>
  17 + <result column="queue_name" jdbcType="VARCHAR" property="queueName"/>
  18 + <result column="routing_key_id" jdbcType="VARCHAR" property="routingKeyId"/>
  19 + <result column="routing_key_name" jdbcType="VARCHAR" property="routingKeyName"/>
  20 + <result column="send_time" jdbcType="TIMESTAMP" property="sendTime"/>
  21 + <result column="receive_time" jdbcType="TIMESTAMP" property="receiveTime"/>
  22 + <result column="send_content" jdbcType="BLOB" property="sendContent"/>
  23 + <result column="description" jdbcType="VARCHAR" property="description"/>
  24 + <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>
  25 + <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified"/>
26 </resultMap> 26 </resultMap>
27 <sql id="Base_Column_List"> 27 <sql id="Base_Column_List">
28 <!--@mbg.generated--> 28 <!--@mbg.generated-->
@@ -33,13 +33,14 @@ @@ -33,13 +33,14 @@
33 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> 33 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
34 <!--@mbg.generated--> 34 <!--@mbg.generated-->
35 select 35 select
36 - <include refid="Base_Column_List" /> 36 + <include refid="Base_Column_List"/>
37 from message_note 37 from message_note
38 where id = #{id,jdbcType=VARCHAR} 38 where id = #{id,jdbcType=VARCHAR}
39 </select> 39 </select>
40 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 40 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
41 <!--@mbg.generated--> 41 <!--@mbg.generated-->
42 - delete from message_note 42 + delete
  43 + from message_note
43 where id = #{id,jdbcType=VARCHAR} 44 where id = #{id,jdbcType=VARCHAR}
44 </delete> 45 </delete>
45 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> 46 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote">
@@ -267,48 +268,50 @@ @@ -267,48 +268,50 @@
267 </update> 268 </update>
268 269
269 <!-- 获取,消息收发记录列表 --> 270 <!-- 获取,消息收发记录列表 -->
270 - <select id="selectMessageNoteList" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote" resultMap="BaseResultMap"> 271 + <select id="selectMessageNoteList" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"
  272 + resultMap="BaseResultMap">
271 select 273 select
272 - <include refid="Base_Column_List" /> 274 + <include refid="Base_Column_List"/>
273 from message_note 275 from message_note
274 <where> 276 <where>
275 <!-- 所属用户登陆名称 --> 277 <!-- 所属用户登陆名称 -->
276 - <if test="username != null and username !=''"> 278 + <if test="username != null and username != ''">
277 username = #{username,jdbcType=VARCHAR} 279 username = #{username,jdbcType=VARCHAR}
278 </if> 280 </if>
279 <!-- 所属服务器名称 --> 281 <!-- 所属服务器名称 -->
280 - <if test="serverName != null and serverName !=''"> 282 + <if test="serverName != null and serverName != ''">
281 AND server_name = #{serverName,jdbcType=VARCHAR} 283 AND server_name = #{serverName,jdbcType=VARCHAR}
282 </if> 284 </if>
283 <!-- 所属虚拟主机名称 --> 285 <!-- 所属虚拟主机名称 -->
284 - <if test="virtualHostName != null and virtualHostName !=''"> 286 + <if test="virtualHostName != null and virtualHostName != ''">
285 AND virtual_host_name = #{virtualHostName,jdbcType=VARCHAR} 287 AND virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}
286 </if> 288 </if>
287 <!-- 所属交换机名称 --> 289 <!-- 所属交换机名称 -->
288 - <if test="exchangeName != null and exchangeName !=''"> 290 + <if test="exchangeName != null and exchangeName != ''">
289 AND exchange_name = #{exchangeName,jdbcType=VARCHAR} 291 AND exchange_name = #{exchangeName,jdbcType=VARCHAR}
290 </if> 292 </if>
291 <!-- 所属路由键名称 --> 293 <!-- 所属路由键名称 -->
292 - <if test="routingKeyName != null and routingKeyName !=''"> 294 + <if test="routingKeyName != null and routingKeyName != ''">
293 AND routing_key_name = #{routingKeyName,jdbcType=VARCHAR} 295 AND routing_key_name = #{routingKeyName,jdbcType=VARCHAR}
294 </if> 296 </if>
295 <!-- 所属队列名称 --> 297 <!-- 所属队列名称 -->
296 - <if test="queueName != null and queueName !=''"> 298 + <if test="queueName != null and queueName != ''">
297 AND queue_name = #{queueName,jdbcType=VARCHAR} 299 AND queue_name = #{queueName,jdbcType=VARCHAR}
298 </if> 300 </if>
299 <!-- 消息发送时间 --> 301 <!-- 消息发送时间 -->
300 <if test="sendTime != null"> 302 <if test="sendTime != null">
301 - AND DATE_FORMAT(send_time,'%Y-%m-%d') = #{sendTime,jdbcType=DATE} 303 + AND DATE_FORMAT(send_time, '%Y-%m-%d') = #{sendTime,jdbcType=DATE}
302 </if> 304 </if>
303 <!-- 消息接收时间 --> 305 <!-- 消息接收时间 -->
304 <if test="receiveTime != null"> 306 <if test="receiveTime != null">
305 - AND DATE_FORMAT(receive_time,'%Y-%m-%d') = #{receiveTime,jdbcType=DATE} 307 + AND DATE_FORMAT(receive_time, '%Y-%m-%d') = #{receiveTime,jdbcType=DATE}
306 </if> 308 </if>
307 </where> 309 </where>
308 </select> 310 </select>
309 <!-- 自动删除 message_note记录 --> 311 <!-- 自动删除 message_note记录 -->
310 <delete id="autoDelete" parameterType="java.lang.Integer"> 312 <delete id="autoDelete" parameterType="java.lang.Integer">
311 - delete from message_note  
312 - where to_days(now())-to_days(gmt_create) &gt;= #{deleteTime,jdbcType=INTEGER} 313 + delete
  314 + from message_note
  315 + where to_days(now()) - to_days(gmt_create) &gt;= #{deleteTime,jdbcType=INTEGER}
313 </delete> 316 </delete>
314 </mapper> 317 </mapper>
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <resultMap id="RoutingKeyAndExchangeMap" extends="BaseResultMap" 17 <resultMap id="RoutingKeyAndExchangeMap" extends="BaseResultMap"
18 type="com.sunyo.wlpt.message.bus.service.domain.RoutingKey"> 18 type="com.sunyo.wlpt.message.bus.service.domain.RoutingKey">
19 <association property="busExchange" javaType="com.sunyo.wlpt.message.bus.service.domain.BusExchange"> 19 <association property="busExchange" javaType="com.sunyo.wlpt.message.bus.service.domain.BusExchange">
20 - <id column="id" property="id"></id> 20 + <id column="id" property="id"/>
21 <result column="exchange_name" property="exchangeName"/> 21 <result column="exchange_name" property="exchangeName"/>
22 </association> 22 </association>
23 </resultMap> 23 </resultMap>
@@ -37,16 +37,22 @@ @@ -37,16 +37,22 @@
37 <!-- 查询路由键列表 --> 37 <!-- 查询路由键列表 -->
38 <select id="selectRoutingKeyList" parameterType="com.sunyo.wlpt.message.bus.service.domain.RoutingKey" 38 <select id="selectRoutingKeyList" parameterType="com.sunyo.wlpt.message.bus.service.domain.RoutingKey"
39 resultMap="RoutingKeyAndExchangeMap"> 39 resultMap="RoutingKeyAndExchangeMap">
40 - select  
41 - r.id, r.routing_key_name, r.exchange_id, r.description, r.gmt_create, r.gmt_modified, e.exchange_name  
42 - from routing_key as r,bus_exchange as e 40 + select r.id,
  41 + r.routing_key_name,
  42 + r.exchange_id,
  43 + r.description,
  44 + r.gmt_create,
  45 + r.gmt_modified,
  46 + e.exchange_name
  47 + from routing_key as r,
  48 + bus_exchange as e
43 <where> 49 <where>
44 <!-- 所属交换机ID --> 50 <!-- 所属交换机ID -->
45 - <if test="exchangeId != null and exchangeId !=''"> 51 + <if test="exchangeId != null and exchangeId != ''">
46 exchange_id = #{exchangeId,jdbcType=VARCHAR} 52 exchange_id = #{exchangeId,jdbcType=VARCHAR}
47 </if> 53 </if>
48 <!-- 路由键名称 --> 54 <!-- 路由键名称 -->
49 - <if test="routingKeyName != null and routingKeyName !=''"> 55 + <if test="routingKeyName != null and routingKeyName != ''">
50 and routing_key_name = #{routingKeyName,jdbcType=VARCHAR} 56 and routing_key_name = #{routingKeyName,jdbcType=VARCHAR}
51 </if> 57 </if>
52 and r.exchange_id = e.id 58 and r.exchange_id = e.id
@@ -60,7 +66,7 @@ @@ -60,7 +66,7 @@
60 from routing_key 66 from routing_key
61 <where> 67 <where>
62 <!-- 路由键名称 --> 68 <!-- 路由键名称 -->
63 - <if test="routingKeyName != null and routingKeyName !=''"> 69 + <if test="routingKeyName != null and routingKeyName != ''">
64 routing_key_name = #{routingKeyName,jdbcType=VARCHAR} 70 routing_key_name = #{routingKeyName,jdbcType=VARCHAR}
65 </if> 71 </if>
66 </where> 72 </where>
@@ -73,7 +79,7 @@ @@ -73,7 +79,7 @@
73 from routing_key 79 from routing_key
74 <where> 80 <where>
75 <!-- 所属交换机ID --> 81 <!-- 所属交换机ID -->
76 - <if test="exchangeId != null and exchangeId !=''"> 82 + <if test="exchangeId != null and exchangeId != ''">
77 exchange_id = #{exchangeId,jdbcType=VARCHAR} 83 exchange_id = #{exchangeId,jdbcType=VARCHAR}
78 </if> 84 </if>
79 </where> 85 </where>
@@ -81,17 +87,16 @@ @@ -81,17 +87,16 @@
81 87
82 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 88 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
83 <!--@mbg.generated--> 89 <!--@mbg.generated-->
84 - delete from routing_key 90 + delete
  91 + from routing_key
85 where id = #{id,jdbcType=VARCHAR} 92 where id = #{id,jdbcType=VARCHAR}
86 </delete> 93 </delete>
87 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.RoutingKey"> 94 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.RoutingKey">
88 <!--@mbg.generated--> 95 <!--@mbg.generated-->
89 insert into routing_key (id, routing_key_name, exchange_id, 96 insert into routing_key (id, routing_key_name, exchange_id,
90 - description, gmt_create, gmt_modified  
91 - ) 97 + description, gmt_create, gmt_modified)
92 values (#{id,jdbcType=VARCHAR}, #{routingKeyName,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR}, 98 values (#{id,jdbcType=VARCHAR}, #{routingKeyName,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR},
93 - #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}  
94 - ) 99 + #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
95 </insert> 100 </insert>
96 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.RoutingKey"> 101 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.RoutingKey">
97 <!--@mbg.generated--> 102 <!--@mbg.generated-->
@@ -169,5 +174,4 @@ @@ -169,5 +174,4 @@
169 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} 174 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
170 where id = #{id,jdbcType=VARCHAR} 175 where id = #{id,jdbcType=VARCHAR}
171 </update> 176 </update>
172 -  
173 </mapper> 177 </mapper>
@@ -4,10 +4,10 @@ @@ -4,10 +4,10 @@
4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete"> 4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete">
5 <!--@mbg.generated--> 5 <!--@mbg.generated-->
6 <!--@Table scheduling_delete--> 6 <!--@Table scheduling_delete-->
7 - <id column="id" jdbcType="VARCHAR" property="id" />  
8 - <result column="delete_time" jdbcType="INTEGER" property="deleteTime" />  
9 - <result column="delete_type" jdbcType="VARCHAR" property="deleteType" />  
10 - <result column="description" jdbcType="VARCHAR" property="description" /> 7 + <id column="id" jdbcType="VARCHAR" property="id"/>
  8 + <result column="delete_time" jdbcType="INTEGER" property="deleteTime"/>
  9 + <result column="delete_type" jdbcType="VARCHAR" property="deleteType"/>
  10 + <result column="description" jdbcType="VARCHAR" property="description"/>
11 </resultMap> 11 </resultMap>
12 <sql id="Base_Column_List"> 12 <sql id="Base_Column_List">
13 <!--@mbg.generated--> 13 <!--@mbg.generated-->
@@ -16,13 +16,14 @@ @@ -16,13 +16,14 @@
16 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> 16 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
17 <!--@mbg.generated--> 17 <!--@mbg.generated-->
18 select 18 select
19 - <include refid="Base_Column_List" /> 19 + <include refid="Base_Column_List"/>
20 from scheduling_delete 20 from scheduling_delete
21 where id = #{id,jdbcType=VARCHAR} 21 where id = #{id,jdbcType=VARCHAR}
22 </select> 22 </select>
23 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 23 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
24 <!--@mbg.generated--> 24 <!--@mbg.generated-->
25 - delete from scheduling_delete 25 + delete
  26 + from scheduling_delete
26 where id = #{id,jdbcType=VARCHAR} 27 where id = #{id,jdbcType=VARCHAR}
27 </delete> 28 </delete>
28 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete"> 29 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete">
@@ -91,11 +92,11 @@ @@ -91,11 +92,11 @@
91 92
92 <select id="selectByType" parameterType="java.lang.String" resultMap="BaseResultMap"> 93 <select id="selectByType" parameterType="java.lang.String" resultMap="BaseResultMap">
93 select 94 select
94 - <include refid="Base_Column_List" /> 95 + <include refid="Base_Column_List"/>
95 from scheduling_delete 96 from scheduling_delete
96 <where> 97 <where>
97 <!-- 删除类型 --> 98 <!-- 删除类型 -->
98 - <if test="deleteType != null and deleteType !=''"> 99 + <if test="deleteType != null and deleteType != ''">
99 delete_type = #{deleteType,jdbcType=VARCHAR} 100 delete_type = #{deleteType,jdbcType=VARCHAR}
100 </if> 101 </if>
101 </where> 102 </where>
@@ -4,12 +4,12 @@ @@ -4,12 +4,12 @@
4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserInfo"> 4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserInfo">
5 <!--@mbg.generated--> 5 <!--@mbg.generated-->
6 <!--@Table user_info--> 6 <!--@Table user_info-->
7 - <id column="id" jdbcType="VARCHAR" property="id" />  
8 - <result column="username" jdbcType="VARCHAR" property="username" />  
9 - <result column="password" jdbcType="VARCHAR" property="password" />  
10 - <result column="description" jdbcType="VARCHAR" property="description" />  
11 - <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />  
12 - <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" /> 7 + <id column="id" jdbcType="VARCHAR" property="id"/>
  8 + <result column="username" jdbcType="VARCHAR" property="username"/>
  9 + <result column="password" jdbcType="VARCHAR" property="password"/>
  10 + <result column="description" jdbcType="VARCHAR" property="description"/>
  11 + <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>
  12 + <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified"/>
13 </resultMap> 13 </resultMap>
14 <sql id="Base_Column_List"> 14 <sql id="Base_Column_List">
15 <!--@mbg.generated--> 15 <!--@mbg.generated-->
@@ -18,31 +18,33 @@ @@ -18,31 +18,33 @@
18 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> 18 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
19 <!--@mbg.generated--> 19 <!--@mbg.generated-->
20 select 20 select
21 - <include refid="Base_Column_List" /> 21 + <include refid="Base_Column_List"/>
22 from user_info 22 from user_info
23 where id = #{id,jdbcType=VARCHAR} 23 where id = #{id,jdbcType=VARCHAR}
24 </select> 24 </select>
25 25
26 <select id="getUserInfoList" resultMap="BaseResultMap"> 26 <select id="getUserInfoList" resultMap="BaseResultMap">
27 <!--@mbg.generated--> 27 <!--@mbg.generated-->
28 - select  
29 - id, username, description, gmt_create, gmt_modified 28 + select id,
  29 + username,
  30 + description,
  31 + gmt_create,
  32 + gmt_modified
30 from user_info 33 from user_info
31 </select> 34 </select>
32 35
33 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 36 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
34 <!--@mbg.generated--> 37 <!--@mbg.generated-->
35 - delete from user_info 38 + delete
  39 + from user_info
36 where id = #{id,jdbcType=VARCHAR} 40 where id = #{id,jdbcType=VARCHAR}
37 </delete> 41 </delete>
38 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserInfo"> 42 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserInfo">
39 <!--@mbg.generated--> 43 <!--@mbg.generated-->
40 insert into user_info (id, username, `password`, 44 insert into user_info (id, username, `password`,
41 - description, gmt_create, gmt_modified  
42 - ) 45 + description, gmt_create, gmt_modified)
43 values (#{id,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 46 values (#{id,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
44 - #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}  
45 - ) 47 + #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
46 </insert> 48 </insert>
47 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserInfo"> 49 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserInfo">
48 <!--@mbg.generated--> 50 <!--@mbg.generated-->
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"> 1 +<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  2 + "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3 <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.UserMessageBindingMapper"> 3 <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.UserMessageBindingMapper">
4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding"> 4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding">
5 - <!--@mbg.generated-->  
6 - <!--@Table user_message_binding-->  
7 - <id column="id" jdbcType="VARCHAR" property="id" />  
8 - <result column="user_id" jdbcType="VARCHAR" property="userId" />  
9 - <result column="username" jdbcType="VARCHAR" property="username" />  
10 - <result column="server_id" jdbcType="VARCHAR" property="serverId" />  
11 - <result column="server_name" jdbcType="VARCHAR" property="serverName" />  
12 - <result column="virtual_host_id" jdbcType="VARCHAR" property="virtualHostId" />  
13 - <result column="virtual_host_name" jdbcType="VARCHAR" property="virtualHostName" />  
14 - <result column="exchange_id" jdbcType="VARCHAR" property="exchangeId" />  
15 - <result column="exchange_name" jdbcType="VARCHAR" property="exchangeName" />  
16 - <result column="queue_id" jdbcType="VARCHAR" property="queueId" />  
17 - <result column="queue_name" jdbcType="VARCHAR" property="queueName" />  
18 - <result column="routing_key_id" jdbcType="VARCHAR" property="routingKeyId" />  
19 - <result column="routing_key_name" jdbcType="VARCHAR" property="routingKeyName" />  
20 - <result column="subscriber" jdbcType="VARCHAR" property="subscriber" />  
21 - <result column="description" jdbcType="VARCHAR" property="description" />  
22 - <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />  
23 - <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" /> 5 + <!--@mbg.generated--><!--@Table user_message_binding-->
  6 + <id column="id" jdbcType="VARCHAR" property="id"/>
  7 + <result column="user_id" jdbcType="VARCHAR" property="userId"/>
  8 + <result column="username" jdbcType="VARCHAR" property="username"/>
  9 + <result column="server_id" jdbcType="VARCHAR" property="serverId"/>
  10 + <result column="server_name" jdbcType="VARCHAR" property="serverName"/>
  11 + <result column="virtual_host_id" jdbcType="VARCHAR" property="virtualHostId"/>
  12 + <result column="virtual_host_name" jdbcType="VARCHAR" property="virtualHostName"/>
  13 + <result column="exchange_id" jdbcType="VARCHAR" property="exchangeId"/>
  14 + <result column="exchange_name" jdbcType="VARCHAR" property="exchangeName"/>
  15 + <result column="queue_id" jdbcType="VARCHAR" property="queueId"/>
  16 + <result column="queue_name" jdbcType="VARCHAR" property="queueName"/>
  17 + <result column="routing_key_id" jdbcType="VARCHAR" property="routingKeyId"/>
  18 + <result column="routing_key_name" jdbcType="VARCHAR" property="routingKeyName"/>
  19 + <result column="subscriber" jdbcType="VARCHAR" property="subscriber"/>
  20 + <result column="description" jdbcType="VARCHAR" property="description"/>
  21 + <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>
  22 + <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified"/>
24 </resultMap> 23 </resultMap>
25 <sql id="Base_Column_List"> 24 <sql id="Base_Column_List">
26 - <!--@mbg.generated-->  
27 - id, user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name, 25 + <!--@mbg.generated-->id, user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name,
28 exchange_id, exchange_name, queue_id, queue_name, routing_key_id, routing_key_name, 26 exchange_id, exchange_name, queue_id, queue_name, routing_key_id, routing_key_name,
29 subscriber, description, gmt_create, gmt_modified 27 subscriber, description, gmt_create, gmt_modified
30 </sql> 28 </sql>
31 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> 29 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
32 - <!--@mbg.generated-->  
33 - select  
34 - <include refid="Base_Column_List" /> 30 + <!--@mbg.generated-->select
  31 +
  32 + <include refid="Base_Column_List"/>
  33 +
35 from user_message_binding 34 from user_message_binding
36 where id = #{id,jdbcType=VARCHAR} 35 where id = #{id,jdbcType=VARCHAR}
  36 +
37 </select> 37 </select>
38 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 38 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
39 - <!--@mbg.generated-->  
40 - delete from user_message_binding 39 + <!--@mbg.generated-->delete
  40 + from user_message_binding
41 where id = #{id,jdbcType=VARCHAR} 41 where id = #{id,jdbcType=VARCHAR}
  42 +
42 </delete> 43 </delete>
43 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding"> 44 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding">
44 - <!--@mbg.generated-->  
45 - insert into user_message_binding (id, user_id, username, 45 + <!--@mbg.generated-->insert into user_message_binding (id, user_id, username,
46 server_id, `server_name`, virtual_host_id, 46 server_id, `server_name`, virtual_host_id,
47 virtual_host_name, exchange_id, exchange_name, 47 virtual_host_name, exchange_id, exchange_name,
48 queue_id, queue_name, routing_key_id, 48 queue_id, queue_name, routing_key_id,
49 routing_key_name, subscriber, description, 49 routing_key_name, subscriber, description,
50 gmt_create, gmt_modified) 50 gmt_create, gmt_modified)
51 values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, 51 values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
52 - #{serverId,jdbcType=VARCHAR}, #{serverName,jdbcType=VARCHAR}, #{virtualHostId,jdbcType=VARCHAR},  
53 - #{virtualHostName,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR}, #{exchangeName,jdbcType=VARCHAR},  
54 - #{queueId,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR}, #{routingKeyId,jdbcType=VARCHAR},  
55 - #{routingKeyName,jdbcType=VARCHAR}, #{subscriber,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, 52 + #{serverId,jdbcType=VARCHAR}, #{serverName,jdbcType=VARCHAR},
  53 + #{virtualHostId,jdbcType=VARCHAR},
  54 + #{virtualHostName,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR},
  55 + #{exchangeName,jdbcType=VARCHAR},
  56 + #{queueId,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR},
  57 + #{routingKeyId,jdbcType=VARCHAR},
  58 + #{routingKeyName,jdbcType=VARCHAR}, #{subscriber,jdbcType=VARCHAR},
  59 + #{description,jdbcType=VARCHAR},
56 #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}) 60 #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
  61 +
57 </insert> 62 </insert>
58 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding"> 63 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding">
59 - <!--@mbg.generated-->  
60 - insert into user_message_binding 64 + <!--@mbg.generated-->insert into user_message_binding
  65 +
61 <trim prefix="(" suffix=")" suffixOverrides=","> 66 <trim prefix="(" suffix=")" suffixOverrides=",">
62 <if test="id != null"> 67 <if test="id != null">
63 id, 68 id,
  69 +
64 </if> 70 </if>
65 <if test="userId != null"> 71 <if test="userId != null">
  72 +
66 user_id, 73 user_id,
  74 +
67 </if> 75 </if>
68 <if test="username != null"> 76 <if test="username != null">
  77 +
69 username, 78 username,
  79 +
70 </if> 80 </if>
71 <if test="serverId != null"> 81 <if test="serverId != null">
  82 +
72 server_id, 83 server_id,
  84 +
73 </if> 85 </if>
74 <if test="serverName != null"> 86 <if test="serverName != null">
  87 +
75 `server_name`, 88 `server_name`,
  89 +
76 </if> 90 </if>
77 <if test="virtualHostId != null"> 91 <if test="virtualHostId != null">
  92 +
78 virtual_host_id, 93 virtual_host_id,
  94 +
79 </if> 95 </if>
80 <if test="virtualHostName != null"> 96 <if test="virtualHostName != null">
  97 +
81 virtual_host_name, 98 virtual_host_name,
  99 +
82 </if> 100 </if>
83 <if test="exchangeId != null"> 101 <if test="exchangeId != null">
  102 +
84 exchange_id, 103 exchange_id,
  104 +
85 </if> 105 </if>
86 <if test="exchangeName != null"> 106 <if test="exchangeName != null">
  107 +
87 exchange_name, 108 exchange_name,
  109 +
88 </if> 110 </if>
89 <if test="queueId != null"> 111 <if test="queueId != null">
  112 +
90 queue_id, 113 queue_id,
  114 +
91 </if> 115 </if>
92 <if test="queueName != null"> 116 <if test="queueName != null">
  117 +
93 queue_name, 118 queue_name,
  119 +
94 </if> 120 </if>
95 <if test="routingKeyId != null"> 121 <if test="routingKeyId != null">
  122 +
96 routing_key_id, 123 routing_key_id,
  124 +
97 </if> 125 </if>
98 <if test="routingKeyName != null"> 126 <if test="routingKeyName != null">
  127 +
99 routing_key_name, 128 routing_key_name,
  129 +
100 </if> 130 </if>
101 <if test="subscriber != null"> 131 <if test="subscriber != null">
  132 +
102 subscriber, 133 subscriber,
  134 +
103 </if> 135 </if>
104 <if test="description != null"> 136 <if test="description != null">
  137 +
105 description, 138 description,
  139 +
106 </if> 140 </if>
107 <if test="gmtCreate != null"> 141 <if test="gmtCreate != null">
  142 +
108 gmt_create, 143 gmt_create,
  144 +
109 </if> 145 </if>
110 <if test="gmtModified != null"> 146 <if test="gmtModified != null">
  147 +
111 gmt_modified, 148 gmt_modified,
112 </if> 149 </if>
113 </trim> 150 </trim>
114 <trim prefix="values (" suffix=")" suffixOverrides=","> 151 <trim prefix="values (" suffix=")" suffixOverrides=",">
115 <if test="id != null"> 152 <if test="id != null">
116 #{id,jdbcType=VARCHAR}, 153 #{id,jdbcType=VARCHAR},
  154 +
117 </if> 155 </if>
118 <if test="userId != null"> 156 <if test="userId != null">
  157 +
119 #{userId,jdbcType=VARCHAR}, 158 #{userId,jdbcType=VARCHAR},
  159 +
120 </if> 160 </if>
121 <if test="username != null"> 161 <if test="username != null">
  162 +
122 #{username,jdbcType=VARCHAR}, 163 #{username,jdbcType=VARCHAR},
  164 +
123 </if> 165 </if>
124 <if test="serverId != null"> 166 <if test="serverId != null">
  167 +
125 #{serverId,jdbcType=VARCHAR}, 168 #{serverId,jdbcType=VARCHAR},
  169 +
126 </if> 170 </if>
127 <if test="serverName != null"> 171 <if test="serverName != null">
  172 +
128 #{serverName,jdbcType=VARCHAR}, 173 #{serverName,jdbcType=VARCHAR},
  174 +
129 </if> 175 </if>
130 <if test="virtualHostId != null"> 176 <if test="virtualHostId != null">
  177 +
131 #{virtualHostId,jdbcType=VARCHAR}, 178 #{virtualHostId,jdbcType=VARCHAR},
  179 +
132 </if> 180 </if>
133 <if test="virtualHostName != null"> 181 <if test="virtualHostName != null">
  182 +
134 #{virtualHostName,jdbcType=VARCHAR}, 183 #{virtualHostName,jdbcType=VARCHAR},
  184 +
135 </if> 185 </if>
136 <if test="exchangeId != null"> 186 <if test="exchangeId != null">
  187 +
137 #{exchangeId,jdbcType=VARCHAR}, 188 #{exchangeId,jdbcType=VARCHAR},
  189 +
138 </if> 190 </if>
139 <if test="exchangeName != null"> 191 <if test="exchangeName != null">
  192 +
140 #{exchangeName,jdbcType=VARCHAR}, 193 #{exchangeName,jdbcType=VARCHAR},
  194 +
141 </if> 195 </if>
142 <if test="queueId != null"> 196 <if test="queueId != null">
  197 +
143 #{queueId,jdbcType=VARCHAR}, 198 #{queueId,jdbcType=VARCHAR},
  199 +
144 </if> 200 </if>
145 <if test="queueName != null"> 201 <if test="queueName != null">
  202 +
146 #{queueName,jdbcType=VARCHAR}, 203 #{queueName,jdbcType=VARCHAR},
  204 +
147 </if> 205 </if>
148 <if test="routingKeyId != null"> 206 <if test="routingKeyId != null">
  207 +
149 #{routingKeyId,jdbcType=VARCHAR}, 208 #{routingKeyId,jdbcType=VARCHAR},
  209 +
150 </if> 210 </if>
151 <if test="routingKeyName != null"> 211 <if test="routingKeyName != null">
  212 +
152 #{routingKeyName,jdbcType=VARCHAR}, 213 #{routingKeyName,jdbcType=VARCHAR},
  214 +
153 </if> 215 </if>
154 <if test="subscriber != null"> 216 <if test="subscriber != null">
  217 +
155 #{subscriber,jdbcType=VARCHAR}, 218 #{subscriber,jdbcType=VARCHAR},
  219 +
156 </if> 220 </if>
157 <if test="description != null"> 221 <if test="description != null">
  222 +
158 #{description,jdbcType=VARCHAR}, 223 #{description,jdbcType=VARCHAR},
  224 +
159 </if> 225 </if>
160 <if test="gmtCreate != null"> 226 <if test="gmtCreate != null">
  227 +
161 #{gmtCreate,jdbcType=TIMESTAMP}, 228 #{gmtCreate,jdbcType=TIMESTAMP},
  229 +
162 </if> 230 </if>
163 <if test="gmtModified != null"> 231 <if test="gmtModified != null">
  232 +
164 #{gmtModified,jdbcType=TIMESTAMP}, 233 #{gmtModified,jdbcType=TIMESTAMP},
165 </if> 234 </if>
166 </trim> 235 </trim>
167 </insert> 236 </insert>
168 <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding"> 237 <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding">
169 - <!--@mbg.generated-->  
170 - update user_message_binding 238 + <!--@mbg.generated-->update user_message_binding
  239 +
171 <set> 240 <set>
172 <if test="userId != null"> 241 <if test="userId != null">
173 user_id = #{userId,jdbcType=VARCHAR}, 242 user_id = #{userId,jdbcType=VARCHAR},
  243 +
174 </if> 244 </if>
175 <if test="username != null"> 245 <if test="username != null">
  246 +
176 username = #{username,jdbcType=VARCHAR}, 247 username = #{username,jdbcType=VARCHAR},
  248 +
177 </if> 249 </if>
178 <if test="serverId != null"> 250 <if test="serverId != null">
  251 +
179 server_id = #{serverId,jdbcType=VARCHAR}, 252 server_id = #{serverId,jdbcType=VARCHAR},
  253 +
180 </if> 254 </if>
181 <if test="serverName != null"> 255 <if test="serverName != null">
  256 +
182 `server_name` = #{serverName,jdbcType=VARCHAR}, 257 `server_name` = #{serverName,jdbcType=VARCHAR},
  258 +
183 </if> 259 </if>
184 <if test="virtualHostId != null"> 260 <if test="virtualHostId != null">
  261 +
185 virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, 262 virtual_host_id = #{virtualHostId,jdbcType=VARCHAR},
  263 +
186 </if> 264 </if>
187 <if test="virtualHostName != null"> 265 <if test="virtualHostName != null">
  266 +
188 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, 267 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR},
  268 +
189 </if> 269 </if>
190 <if test="exchangeId != null"> 270 <if test="exchangeId != null">
  271 +
191 exchange_id = #{exchangeId,jdbcType=VARCHAR}, 272 exchange_id = #{exchangeId,jdbcType=VARCHAR},
  273 +
192 </if> 274 </if>
193 <if test="exchangeName != null"> 275 <if test="exchangeName != null">
  276 +
194 exchange_name = #{exchangeName,jdbcType=VARCHAR}, 277 exchange_name = #{exchangeName,jdbcType=VARCHAR},
  278 +
195 </if> 279 </if>
196 <if test="queueId != null"> 280 <if test="queueId != null">
  281 +
197 queue_id = #{queueId,jdbcType=VARCHAR}, 282 queue_id = #{queueId,jdbcType=VARCHAR},
  283 +
198 </if> 284 </if>
199 <if test="queueName != null"> 285 <if test="queueName != null">
  286 +
200 queue_name = #{queueName,jdbcType=VARCHAR}, 287 queue_name = #{queueName,jdbcType=VARCHAR},
  288 +
201 </if> 289 </if>
202 <if test="routingKeyId != null"> 290 <if test="routingKeyId != null">
  291 +
203 routing_key_id = #{routingKeyId,jdbcType=VARCHAR}, 292 routing_key_id = #{routingKeyId,jdbcType=VARCHAR},
  293 +
204 </if> 294 </if>
205 <if test="routingKeyName != null"> 295 <if test="routingKeyName != null">
  296 +
206 routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, 297 routing_key_name = #{routingKeyName,jdbcType=VARCHAR},
  298 +
207 </if> 299 </if>
208 <if test="subscriber != null"> 300 <if test="subscriber != null">
  301 +
209 subscriber = #{subscriber,jdbcType=VARCHAR}, 302 subscriber = #{subscriber,jdbcType=VARCHAR},
  303 +
210 </if> 304 </if>
211 <if test="description != null"> 305 <if test="description != null">
  306 +
212 description = #{description,jdbcType=VARCHAR}, 307 description = #{description,jdbcType=VARCHAR},
  308 +
213 </if> 309 </if>
214 <if test="gmtCreate != null"> 310 <if test="gmtCreate != null">
  311 +
215 gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, 312 gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
  313 +
216 </if> 314 </if>
217 <if test="gmtModified != null"> 315 <if test="gmtModified != null">
  316 +
218 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, 317 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP},
219 </if> 318 </if>
220 </set> 319 </set>
  320 +
221 where id = #{id,jdbcType=VARCHAR} 321 where id = #{id,jdbcType=VARCHAR}
  322 +
222 </update> 323 </update>
223 <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding"> 324 <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding">
224 - <!--@mbg.generated-->  
225 - update user_message_binding 325 + <!--@mbg.generated-->update user_message_binding
226 set user_id = #{userId,jdbcType=VARCHAR}, 326 set user_id = #{userId,jdbcType=VARCHAR},
227 username = #{username,jdbcType=VARCHAR}, 327 username = #{username,jdbcType=VARCHAR},
228 server_id = #{serverId,jdbcType=VARCHAR}, 328 server_id = #{serverId,jdbcType=VARCHAR},
@@ -240,47 +340,81 @@ @@ -240,47 +340,81 @@
240 gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, 340 gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
241 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} 341 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
242 where id = #{id,jdbcType=VARCHAR} 342 where id = #{id,jdbcType=VARCHAR}
  343 +
243 </update> 344 </update>
244 <!-- 查询列表,选择性 --> 345 <!-- 查询列表,选择性 -->
245 - <select id="selectUserMessageBindingList" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding" resultMap="BaseResultMap">  
246 - select  
247 - user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name,  
248 - exchange_id, exchange_name, routing_key_id, routing_key_name,  
249 - GROUP_CONCAT(id) as id, GROUP_CONCAT(queue_id) as queue_id, GROUP_CONCAT(queue_name) as queue_name, 346 + <select id="selectUserMessageBindingList"
  347 + parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding" resultMap="BaseResultMap">
  348 +
  349 + select user_id,
  350 + username,
  351 + server_id,
  352 + `server_name`,
  353 + virtual_host_id,
  354 + virtual_host_name,
  355 + exchange_id,
  356 + exchange_name,
  357 + routing_key_id,
  358 + routing_key_name,
  359 + GROUP_CONCAT(id) as id,
  360 + GROUP_CONCAT(queue_id) as queue_id,
  361 + GROUP_CONCAT(queue_name) as queue_name,
250 GROUP_CONCAT(description) as description 362 GROUP_CONCAT(description) as description
251 from user_message_binding 363 from user_message_binding
  364 +
252 <where> 365 <where>
253 <!-- 所属用户登陆名称 --> 366 <!-- 所属用户登陆名称 -->
254 - <if test="username != null and username !=''"> 367 + <if test="username != null and username != ''">
255 username = #{username,jdbcType=VARCHAR} 368 username = #{username,jdbcType=VARCHAR}
  369 +
256 </if> 370 </if>
257 <!-- 所属服务器名称 --> 371 <!-- 所属服务器名称 -->
258 - <if test="serverName != null and serverName !=''"> 372 + <if test="serverName != null and serverName != ''">
  373 +
259 AND `server_name` = #{serverName,jdbcType=VARCHAR} 374 AND `server_name` = #{serverName,jdbcType=VARCHAR}
  375 +
260 </if> 376 </if>
261 <!-- 所属虚拟主机名称 --> 377 <!-- 所属虚拟主机名称 -->
262 - <if test="virtualHostName != null and virtualHostName !=''"> 378 + <if test="virtualHostName != null and virtualHostName != ''">
  379 +
263 AND virtual_host_name = #{virtualHostName,jdbcType=VARCHAR} 380 AND virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}
  381 +
264 </if> 382 </if>
265 <!-- 所属交换机名称 --> 383 <!-- 所属交换机名称 -->
266 - <if test="exchangeName != null and exchangeName !=''"> 384 + <if test="exchangeName != null and exchangeName != ''">
  385 +
267 AND exchange_name = #{exchangeName,jdbcType=VARCHAR} 386 AND exchange_name = #{exchangeName,jdbcType=VARCHAR}
  387 +
268 </if> 388 </if>
269 <!-- 所属队列名称 --> 389 <!-- 所属队列名称 -->
270 - <if test="queueName != null and queueName !=''"> 390 + <if test="queueName != null and queueName != ''">
  391 +
271 AND queue_name = #{queueName,jdbcType=VARCHAR} 392 AND queue_name = #{queueName,jdbcType=VARCHAR}
  393 +
272 </if> 394 </if>
273 <!-- 所属路由键名称 --> 395 <!-- 所属路由键名称 -->
274 - <if test="routingKeyName != null and routingKeyName !=''"> 396 + <if test="routingKeyName != null and routingKeyName != ''">
  397 +
275 AND routing_key_name = #{routingKeyName,jdbcType=VARCHAR} 398 AND routing_key_name = #{routingKeyName,jdbcType=VARCHAR}
276 </if> 399 </if>
277 <!-- 订阅者 --> 400 <!-- 订阅者 -->
278 -<!-- <if test="subscriber != null and subscriber !=''">-->  
279 -<!-- AND subscriber = #{subscriber,jdbcType=VARCHAR}-->  
280 -<!-- </if>--> 401 + <!-- <if test="subscriber != null and subscriber !=''">-->
  402 + <!-- AND subscriber = #{subscriber,jdbcType=VARCHAR}-->
  403 + <!-- </if>-->
281 </where> 404 </where>
  405 +
282 group by user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name, 406 group by user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name,
283 exchange_id, exchange_name, routing_key_id, routing_key_name 407 exchange_id, exchange_name, routing_key_id, routing_key_name
  408 +
284 </select> 409 </select>
  410 + <!-- 校验是否已存在 -->
  411 + <select id="validateBinding" resultMap="BaseResultMap">
  412 +
  413 + select
285 414
  415 + <include refid="Base_Column_List"/>
  416 +
  417 + from user_message_binding
  418 +
  419 + </select>
286 </mapper> 420 </mapper>
@@ -4,12 +4,12 @@ @@ -4,12 +4,12 @@
4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost"> 4 <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost">
5 <!--@mbg.generated--> 5 <!--@mbg.generated-->
6 <!--@Table user_server_virtual_host--> 6 <!--@Table user_server_virtual_host-->
7 - <id column="id" jdbcType="VARCHAR" property="id" />  
8 - <result column="username" jdbcType="VARCHAR" property="username" />  
9 - <result column="server_id" jdbcType="VARCHAR" property="serverId" />  
10 - <result column="virtual_host_id" jdbcType="VARCHAR" property="virtualHostId" />  
11 - <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />  
12 - <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" /> 7 + <id column="id" jdbcType="VARCHAR" property="id"/>
  8 + <result column="username" jdbcType="VARCHAR" property="username"/>
  9 + <result column="server_id" jdbcType="VARCHAR" property="serverId"/>
  10 + <result column="virtual_host_id" jdbcType="VARCHAR" property="virtualHostId"/>
  11 + <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>
  12 + <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified"/>
13 </resultMap> 13 </resultMap>
14 <sql id="Base_Column_List"> 14 <sql id="Base_Column_List">
15 <!--@mbg.generated--> 15 <!--@mbg.generated-->
@@ -18,23 +18,22 @@ @@ -18,23 +18,22 @@
18 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> 18 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
19 <!--@mbg.generated--> 19 <!--@mbg.generated-->
20 select 20 select
21 - <include refid="Base_Column_List" /> 21 + <include refid="Base_Column_List"/>
22 from user_server_virtual_host 22 from user_server_virtual_host
23 where id = #{id,jdbcType=VARCHAR} 23 where id = #{id,jdbcType=VARCHAR}
24 </select> 24 </select>
25 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 25 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
26 <!--@mbg.generated--> 26 <!--@mbg.generated-->
27 - delete from user_server_virtual_host 27 + delete
  28 + from user_server_virtual_host
28 where id = #{id,jdbcType=VARCHAR} 29 where id = #{id,jdbcType=VARCHAR}
29 </delete> 30 </delete>
30 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost"> 31 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost">
31 <!--@mbg.generated--> 32 <!--@mbg.generated-->
32 insert into user_server_virtual_host (id, username, server_id, 33 insert into user_server_virtual_host (id, username, server_id,
33 - virtual_host_id, gmt_create, gmt_modified  
34 - ) 34 + virtual_host_id, gmt_create, gmt_modified)
35 values (#{id,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{serverId,jdbcType=VARCHAR}, 35 values (#{id,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{serverId,jdbcType=VARCHAR},
36 - #{virtualHostId,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}  
37 - ) 36 + #{virtualHostId,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
38 </insert> 37 </insert>
39 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost"> 38 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost">
40 <!--@mbg.generated--> 39 <!--@mbg.generated-->
@@ -80,7 +79,8 @@ @@ -80,7 +79,8 @@
80 </if> 79 </if>
81 </trim> 80 </trim>
82 </insert> 81 </insert>
83 - <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost"> 82 + <update id="updateByPrimaryKeySelective"
  83 + parameterType="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost">
84 <!--@mbg.generated--> 84 <!--@mbg.generated-->
85 update user_server_virtual_host 85 update user_server_virtual_host
86 <set> 86 <set>
@@ -15,8 +15,8 @@ @@ -15,8 +15,8 @@
15 <resultMap id="HostAndServerMap" extends="BaseResultMap" 15 <resultMap id="HostAndServerMap" extends="BaseResultMap"
16 type="com.sunyo.wlpt.message.bus.service.domain.VirtualHost"> 16 type="com.sunyo.wlpt.message.bus.service.domain.VirtualHost">
17 <association property="busServer" javaType="com.sunyo.wlpt.message.bus.service.domain.BusServer"> 17 <association property="busServer" javaType="com.sunyo.wlpt.message.bus.service.domain.BusServer">
18 - <id column="id" property="id"></id>  
19 - <result column="server_name" property="serverName"></result> 18 + <id column="id" property="id"/>
  19 + <result column="server_name" property="serverName"/>
20 </association> 20 </association>
21 </resultMap> 21 </resultMap>
22 22
@@ -35,19 +35,25 @@ @@ -35,19 +35,25 @@
35 <!-- 查询虚拟主机列表,选择性 --> 35 <!-- 查询虚拟主机列表,选择性 -->
36 <select id="selectVirtualHostList" parameterType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost" 36 <select id="selectVirtualHostList" parameterType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost"
37 resultMap="HostAndServerMap"> 37 resultMap="HostAndServerMap">
38 - select  
39 - v.id, v.virtual_host_name, v.server_id, v.description, v.gmt_create, v.gmt_modified, s.server_name  
40 - from virtual_host as v,bus_server as s 38 + select v.id,
  39 + v.virtual_host_name,
  40 + v.server_id,
  41 + v.description,
  42 + v.gmt_create,
  43 + v.gmt_modified,
  44 + s.server_name
  45 + from virtual_host as v,
  46 + bus_server as s
41 <where> 47 <where>
42 <!-- 所属服务器ID --> 48 <!-- 所属服务器ID -->
43 - <if test="serverId != null and serverId !=''"> 49 + <if test="serverId != null and serverId != ''">
44 v.server_id = #{serverId,jdbcType=VARCHAR} 50 v.server_id = #{serverId,jdbcType=VARCHAR}
45 </if> 51 </if>
46 <!-- 虚拟主机名称 --> 52 <!-- 虚拟主机名称 -->
47 - <if test="virtualHostName != null and virtualHostName !=''"> 53 + <if test="virtualHostName != null and virtualHostName != ''">
48 and v.virtual_host_name = #{virtualHostName,jdbcType=VARCHAR} 54 and v.virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}
49 </if> 55 </if>
50 - and v.server_id=s.id 56 + and v.server_id = s.id
51 </where> 57 </where>
52 </select> 58 </select>
53 59
@@ -78,7 +84,7 @@ @@ -78,7 +84,7 @@
78 from virtual_host 84 from virtual_host
79 <where> 85 <where>
80 <!-- 虚拟主机名称 --> 86 <!-- 虚拟主机名称 -->
81 - <if test="virtualHostName != null and virtualHostName !=''"> 87 + <if test="virtualHostName != null and virtualHostName != ''">
82 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR} 88 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}
83 </if> 89 </if>
84 </where> 90 </where>
@@ -90,7 +96,7 @@ @@ -90,7 +96,7 @@
90 from virtual_host 96 from virtual_host
91 <where> 97 <where>
92 <!-- 所属服务器ID --> 98 <!-- 所属服务器ID -->
93 - <if test="serverId != null and serverId !=''"> 99 + <if test="serverId != null and serverId != ''">
94 server_id = #{serverId,jdbcType=VARCHAR} 100 server_id = #{serverId,jdbcType=VARCHAR}
95 </if> 101 </if>
96 </where> 102 </where>
@@ -98,17 +104,16 @@ @@ -98,17 +104,16 @@
98 104
99 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 105 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
100 <!--@mbg.generated--> 106 <!--@mbg.generated-->
101 - delete from virtual_host 107 + delete
  108 + from virtual_host
102 where id = #{id,jdbcType=VARCHAR} 109 where id = #{id,jdbcType=VARCHAR}
103 </delete> 110 </delete>
104 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost"> 111 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost">
105 <!--@mbg.generated--> 112 <!--@mbg.generated-->
106 insert into virtual_host (id, virtual_host_name, server_id, 113 insert into virtual_host (id, virtual_host_name, server_id,
107 - description, gmt_create, gmt_modified  
108 - ) 114 + description, gmt_create, gmt_modified)
109 values (#{id,jdbcType=VARCHAR}, #{virtualHostName,jdbcType=VARCHAR}, #{serverId,jdbcType=VARCHAR}, 115 values (#{id,jdbcType=VARCHAR}, #{virtualHostName,jdbcType=VARCHAR}, #{serverId,jdbcType=VARCHAR},
110 - #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}  
111 - ) 116 + #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
112 </insert> 117 </insert>
113 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost"> 118 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost">
114 <!--@mbg.generated--> 119 <!--@mbg.generated-->
@@ -186,5 +191,4 @@ @@ -186,5 +191,4 @@
186 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} 191 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
187 where id = #{id,jdbcType=VARCHAR} 192 where id = #{id,jdbcType=VARCHAR}
188 </update> 193 </update>
189 -  
190 </mapper> 194 </mapper>