作者 王勇

账户信息绑定配置表,添加字段(虚拟主机ID,交换机ID,队列ID,路由键ID)

@@ -3,50 +3,74 @@ package com.sunyo.wlpt.message.bus.service.domain; @@ -3,50 +3,74 @@ package com.sunyo.wlpt.message.bus.service.domain;
3 import java.io.Serializable; 3 import java.io.Serializable;
4 import java.util.Date; 4 import java.util.Date;
5 5
6 -import com.fasterxml.jackson.annotation.JsonFormat;  
7 import lombok.AllArgsConstructor; 6 import lombok.AllArgsConstructor;
8 import lombok.Data; 7 import lombok.Data;
9 import lombok.NoArgsConstructor; 8 import lombok.NoArgsConstructor;
10 9
11 /** 10 /**
12 * @author 子诚 11 * @author 子诚
13 - * Description:账户消息绑定配置表  
14 - * 时间:2020/6/29 17:37 12 + * Description:账户信息绑定配置表
  13 + * 时间:2020/7/13 14:24
15 */ 14 */
16 @Data 15 @Data
17 @AllArgsConstructor 16 @AllArgsConstructor
18 @NoArgsConstructor 17 @NoArgsConstructor
19 public class UserMessageBinding implements Serializable { 18 public class UserMessageBinding implements Serializable {
20 19
21 - private static final long serialVersionUID = 1L; 20 + private static final long serialVersionUID = -7983498309821536414L;
22 21
23 /** 22 /**
24 - * 账户息绑定配置表的ID 23 + * 账户息绑定配置表的ID
25 */ 24 */
26 private String id; 25 private String id;
27 26
28 /** 27 /**
  28 + * 用户的ID
  29 + */
  30 + private String userId;
  31 +
  32 + /**
29 * 所属用户登陆名称 33 * 所属用户登陆名称
30 */ 34 */
31 private String username; 35 private String username;
32 36
33 /** 37 /**
  38 + * 所属虚拟主机的ID
  39 + */
  40 + private String virtualHostId;
  41 +
  42 + /**
34 * 所属虚拟主机名称 43 * 所属虚拟主机名称
35 */ 44 */
36 private String virtualHostName; 45 private String virtualHostName;
37 46
38 /** 47 /**
  48 + * 所属交换机的ID
  49 + */
  50 + private String exchangeId;
  51 +
  52 + /**
39 * 所属交换机名称 53 * 所属交换机名称
40 */ 54 */
41 private String exchangeName; 55 private String exchangeName;
42 56
43 /** 57 /**
  58 + * 所属队列的ID
  59 + */
  60 + private String queueId;
  61 +
  62 + /**
44 * 所属队列名称 63 * 所属队列名称
45 */ 64 */
46 private String queueName; 65 private String queueName;
47 66
48 /** 67 /**
49 - * 所属routing_key的名称 68 + * 所属路由键的ID
  69 + */
  70 + private String routingKeyId;
  71 +
  72 + /**
  73 + * 所属路由键的名称
50 */ 74 */
51 private String routingKeyName; 75 private String routingKeyName;
52 76
@@ -58,13 +82,10 @@ public class UserMessageBinding implements Serializable { @@ -58,13 +82,10 @@ public class UserMessageBinding implements Serializable {
58 /** 82 /**
59 * 创建时间 83 * 创建时间
60 */ 84 */
61 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")  
62 private Date gmtCreate; 85 private Date gmtCreate;
63 86
64 /** 87 /**
65 * 修改时间 88 * 修改时间
66 */ 89 */
67 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")  
68 private Date gmtModified; 90 private Date gmtModified;
69 -  
70 } 91 }
1 package com.sunyo.wlpt.message.bus.service.mapper; 1 package com.sunyo.wlpt.message.bus.service.mapper;
2 2
3 import com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding; 3 import com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding;
4 -import org.apache.ibatis.annotations.Mapper;  
5 -  
6 -import java.util.List; 4 +import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;
7 5
8 /** 6 /**
9 * @author 子诚 7 * @author 子诚
10 * Description: 8 * Description:
11 - * 时间:2020/6/29 17:37 9 + * 时间:2020/7/13 14:24
12 */ 10 */
13 @Mapper 11 @Mapper
14 public interface UserMessageBindingMapper { 12 public interface UserMessageBindingMapper {
15 /** 13 /**
16 - * 根据主键删除 14 + * delete by primary key
17 * 15 *
18 * @param id primaryKey 16 * @param id primaryKey
19 * @return deleteCount 17 * @return deleteCount
@@ -21,7 +19,7 @@ public interface UserMessageBindingMapper { @@ -21,7 +19,7 @@ public interface UserMessageBindingMapper {
21 int deleteByPrimaryKey(String id); 19 int deleteByPrimaryKey(String id);
22 20
23 /** 21 /**
24 - * 新增 22 + * insert record to table
25 * 23 *
26 * @param record the record 24 * @param record the record
27 * @return insert count 25 * @return insert count
@@ -29,7 +27,7 @@ public interface UserMessageBindingMapper { @@ -29,7 +27,7 @@ public interface UserMessageBindingMapper {
29 int insert(UserMessageBinding record); 27 int insert(UserMessageBinding record);
30 28
31 /** 29 /**
32 - * 选择性增加 30 + * insert record to table selective
33 * 31 *
34 * @param record the record 32 * @param record the record
35 * @return insert count 33 * @return insert count
@@ -37,7 +35,7 @@ public interface UserMessageBindingMapper { @@ -37,7 +35,7 @@ public interface UserMessageBindingMapper {
37 int insertSelective(UserMessageBinding record); 35 int insertSelective(UserMessageBinding record);
38 36
39 /** 37 /**
40 - * 根据主键查询 38 + * select by primary key
41 * 39 *
42 * @param id primary key 40 * @param id primary key
43 * @return object by primary key 41 * @return object by primary key
@@ -45,7 +43,7 @@ public interface UserMessageBindingMapper { @@ -45,7 +43,7 @@ public interface UserMessageBindingMapper {
45 UserMessageBinding selectByPrimaryKey(String id); 43 UserMessageBinding selectByPrimaryKey(String id);
46 44
47 /** 45 /**
48 - * 选择性更新,根据主键 46 + * update record selective
49 * 47 *
50 * @param record the updated record 48 * @param record the updated record
51 * @return update count 49 * @return update count
@@ -53,13 +51,14 @@ public interface UserMessageBindingMapper { @@ -53,13 +51,14 @@ public interface UserMessageBindingMapper {
53 int updateByPrimaryKeySelective(UserMessageBinding record); 51 int updateByPrimaryKeySelective(UserMessageBinding record);
54 52
55 /** 53 /**
56 - * 根据主键更新 54 + * update record
57 * 55 *
58 * @param record the updated record 56 * @param record the updated record
59 * @return update count 57 * @return update count
60 */ 58 */
61 int updateByPrimaryKey(UserMessageBinding record); 59 int updateByPrimaryKey(UserMessageBinding record);
62 60
  61 +
63 /** 62 /**
64 * 分页查询,获取账户信息绑定配置列表 63 * 分页查询,获取账户信息绑定配置列表
65 * 64 *
1 package com.sunyo.wlpt.message.bus.service.service; 1 package com.sunyo.wlpt.message.bus.service.service;
2 2
3 import com.github.pagehelper.PageInfo; 3 import com.github.pagehelper.PageInfo;
4 -import com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding; 4 +import com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding;import java.util.List;
5 5
6 /** 6 /**
7 * @author 子诚 7 * @author 子诚
@@ -66,4 +66,7 @@ public interface UserMessageBindingService { @@ -66,4 +66,7 @@ public interface UserMessageBindingService {
66 * @return PageInfo 66 * @return PageInfo
67 */ 67 */
68 PageInfo selectUserMessageBindingList(UserMessageBinding userMessageBinding, Integer pageNum, Integer pageSize); 68 PageInfo selectUserMessageBindingList(UserMessageBinding userMessageBinding, Integer pageNum, Integer pageSize);
  69 +
69 } 70 }
  71 +
  72 +
@@ -2,7 +2,6 @@ package com.sunyo.wlpt.message.bus.service.service.impl; @@ -2,7 +2,6 @@ package com.sunyo.wlpt.message.bus.service.service.impl;
2 2
3 import com.github.pagehelper.PageHelper; 3 import com.github.pagehelper.PageHelper;
4 import com.github.pagehelper.PageInfo; 4 import com.github.pagehelper.PageInfo;
5 -import com.sunyo.wlpt.message.bus.service.domain.BusQueue;  
6 import org.springframework.stereotype.Service; 5 import org.springframework.stereotype.Service;
7 6
8 import javax.annotation.Resource; 7 import javax.annotation.Resource;
@@ -90,3 +89,5 @@ public class UserMessageBindingServiceImpl implements UserMessageBindingService @@ -90,3 +89,5 @@ public class UserMessageBindingServiceImpl implements UserMessageBindingService
90 } 89 }
91 90
92 } 91 }
  92 +
  93 +
@@ -4,62 +4,33 @@ @@ -4,62 +4,33 @@
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--> 5 <!--@mbg.generated-->
6 <!--@Table user_message_binding--> 6 <!--@Table user_message_binding-->
7 - <id column="id" jdbcType="VARCHAR" property="id"/>  
8 - <result column="username" jdbcType="VARCHAR" property="username"/>  
9 - <result column="virtual_host_name" jdbcType="VARCHAR" property="virtualHostName"/>  
10 - <result column="exchange_name" jdbcType="VARCHAR" property="exchangeName"/>  
11 - <result column="queue_name" jdbcType="VARCHAR" property="queueName"/>  
12 - <result column="routing_key_name" jdbcType="VARCHAR" property="routingKeyName"/>  
13 - <result column="subscriber" jdbcType="VARCHAR" property="subscriber"/>  
14 - <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>  
15 - <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="virtual_host_id" jdbcType="VARCHAR" property="virtualHostId" />
  11 + <result column="virtual_host_name" jdbcType="VARCHAR" property="virtualHostName" />
  12 + <result column="exchange_id" jdbcType="VARCHAR" property="exchangeId" />
  13 + <result column="exchange_name" jdbcType="VARCHAR" property="exchangeName" />
  14 + <result column="queue_id" jdbcType="VARCHAR" property="queueId" />
  15 + <result column="queue_name" jdbcType="VARCHAR" property="queueName" />
  16 + <result column="routing_key_id" jdbcType="VARCHAR" property="routingKeyId" />
  17 + <result column="routing_key_name" jdbcType="VARCHAR" property="routingKeyName" />
  18 + <result column="subscriber" jdbcType="VARCHAR" property="subscriber" />
  19 + <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
  20 + <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
16 </resultMap> 21 </resultMap>
17 <sql id="Base_Column_List"> 22 <sql id="Base_Column_List">
18 <!--@mbg.generated--> 23 <!--@mbg.generated-->
19 - id, username, virtual_host_name, exchange_name, queue_name, routing_key_name, subscriber, gmt_create,  
20 - gmt_modified 24 + id, user_id, username, virtual_host_id, virtual_host_name, exchange_id, exchange_name,
  25 + queue_id, queue_name, routing_key_id, routing_key_name, subscriber, gmt_create, gmt_modified
21 </sql> 26 </sql>
22 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> 27 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
23 <!--@mbg.generated--> 28 <!--@mbg.generated-->
24 select 29 select
25 - <include refid="Base_Column_List"/> 30 + <include refid="Base_Column_List" />
26 from user_message_binding 31 from user_message_binding
27 where id = #{id,jdbcType=VARCHAR} 32 where id = #{id,jdbcType=VARCHAR}
28 </select> 33 </select>
29 - <!-- 查询列表,选择性 -->  
30 - <select id="selectUserMessageBindingList"  
31 - parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding" resultMap="BaseResultMap">  
32 - select  
33 - <include refid="Base_Column_List"/>  
34 - from user_message_binding  
35 - <where>  
36 - <!-- 所属用户登陆名称 -->  
37 - <if test="username != null and username !=''">  
38 - username = #{username,jdbcType=VARCHAR}  
39 - </if>  
40 - <!-- 所属虚拟主机名称 -->  
41 - <if test="virtualHostName != null and virtualHostName !=''">  
42 - AND virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}  
43 - </if>  
44 - <!-- 所属交换机名称 -->  
45 - <if test="exchangeName != null and exchangeName !=''">  
46 - AND exchange_name = #{exchangeName,jdbcType=VARCHAR}  
47 - </if>  
48 - <!-- 所属队列名称 -->  
49 - <if test="queueName != null and queueName !=''">  
50 - AND queue_name = #{queueName,jdbcType=VARCHAR}  
51 - </if>  
52 - <!-- 所属路由键名称 -->  
53 - <if test="routingKeyName != null and routingKeyName !=''">  
54 - AND routing_key_name = #{routingKeyName,jdbcType=VARCHAR}  
55 - </if>  
56 - <!-- 订阅者 -->  
57 - <if test="subscriber != null and subscriber !=''">  
58 - AND subscriber = #{subscriber,jdbcType=VARCHAR}  
59 - </if>  
60 - </where>  
61 - </select>  
62 -  
63 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 34 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
64 <!--@mbg.generated--> 35 <!--@mbg.generated-->
65 delete from user_message_binding 36 delete from user_message_binding
@@ -67,11 +38,15 @@ @@ -67,11 +38,15 @@
67 </delete> 38 </delete>
68 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding"> 39 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding">
69 <!--@mbg.generated--> 40 <!--@mbg.generated-->
70 - insert into user_message_binding (id, username, virtual_host_name,  
71 - exchange_name, routing_key_name, subscriber, 41 + insert into user_message_binding (id, user_id, username,
  42 + virtual_host_id, virtual_host_name, exchange_id,
  43 + exchange_name, queue_id, queue_name,
  44 + routing_key_id, routing_key_name, subscriber,
72 gmt_create, gmt_modified) 45 gmt_create, gmt_modified)
73 - values (#{id,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{virtualHostName,jdbcType=VARCHAR},  
74 - #{exchangeName,jdbcType=VARCHAR}, #{routingKeyName,jdbcType=VARCHAR}, #{subscriber,jdbcType=VARCHAR}, 46 + values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
  47 + #{virtualHostId,jdbcType=VARCHAR}, #{virtualHostName,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR},
  48 + #{exchangeName,jdbcType=VARCHAR}, #{queueId,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR},
  49 + #{routingKeyId,jdbcType=VARCHAR}, #{routingKeyName,jdbcType=VARCHAR}, #{subscriber,jdbcType=VARCHAR},
75 #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}) 50 #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
76 </insert> 51 </insert>
77 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding"> 52 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding">
@@ -81,15 +56,33 @@ @@ -81,15 +56,33 @@
81 <if test="id != null"> 56 <if test="id != null">
82 id, 57 id,
83 </if> 58 </if>
  59 + <if test="userId != null">
  60 + user_id,
  61 + </if>
84 <if test="username != null"> 62 <if test="username != null">
85 username, 63 username,
86 </if> 64 </if>
  65 + <if test="virtualHostId != null">
  66 + virtual_host_id,
  67 + </if>
87 <if test="virtualHostName != null"> 68 <if test="virtualHostName != null">
88 virtual_host_name, 69 virtual_host_name,
89 </if> 70 </if>
  71 + <if test="exchangeId != null">
  72 + exchange_id,
  73 + </if>
90 <if test="exchangeName != null"> 74 <if test="exchangeName != null">
91 exchange_name, 75 exchange_name,
92 </if> 76 </if>
  77 + <if test="queueId != null">
  78 + queue_id,
  79 + </if>
  80 + <if test="queueName != null">
  81 + queue_name,
  82 + </if>
  83 + <if test="routingKeyId != null">
  84 + routing_key_id,
  85 + </if>
93 <if test="routingKeyName != null"> 86 <if test="routingKeyName != null">
94 routing_key_name, 87 routing_key_name,
95 </if> 88 </if>
@@ -107,15 +100,33 @@ @@ -107,15 +100,33 @@
107 <if test="id != null"> 100 <if test="id != null">
108 #{id,jdbcType=VARCHAR}, 101 #{id,jdbcType=VARCHAR},
109 </if> 102 </if>
  103 + <if test="userId != null">
  104 + #{userId,jdbcType=VARCHAR},
  105 + </if>
110 <if test="username != null"> 106 <if test="username != null">
111 #{username,jdbcType=VARCHAR}, 107 #{username,jdbcType=VARCHAR},
112 </if> 108 </if>
  109 + <if test="virtualHostId != null">
  110 + #{virtualHostId,jdbcType=VARCHAR},
  111 + </if>
113 <if test="virtualHostName != null"> 112 <if test="virtualHostName != null">
114 #{virtualHostName,jdbcType=VARCHAR}, 113 #{virtualHostName,jdbcType=VARCHAR},
115 </if> 114 </if>
  115 + <if test="exchangeId != null">
  116 + #{exchangeId,jdbcType=VARCHAR},
  117 + </if>
116 <if test="exchangeName != null"> 118 <if test="exchangeName != null">
117 #{exchangeName,jdbcType=VARCHAR}, 119 #{exchangeName,jdbcType=VARCHAR},
118 </if> 120 </if>
  121 + <if test="queueId != null">
  122 + #{queueId,jdbcType=VARCHAR},
  123 + </if>
  124 + <if test="queueName != null">
  125 + #{queueName,jdbcType=VARCHAR},
  126 + </if>
  127 + <if test="routingKeyId != null">
  128 + #{routingKeyId,jdbcType=VARCHAR},
  129 + </if>
119 <if test="routingKeyName != null"> 130 <if test="routingKeyName != null">
120 #{routingKeyName,jdbcType=VARCHAR}, 131 #{routingKeyName,jdbcType=VARCHAR},
121 </if> 132 </if>
@@ -130,20 +141,37 @@ @@ -130,20 +141,37 @@
130 </if> 141 </if>
131 </trim> 142 </trim>
132 </insert> 143 </insert>
133 - <update id="updateByPrimaryKeySelective"  
134 - parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding"> 144 + <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding">
135 <!--@mbg.generated--> 145 <!--@mbg.generated-->
136 update user_message_binding 146 update user_message_binding
137 <set> 147 <set>
  148 + <if test="userId != null">
  149 + user_id = #{userId,jdbcType=VARCHAR},
  150 + </if>
138 <if test="username != null"> 151 <if test="username != null">
139 username = #{username,jdbcType=VARCHAR}, 152 username = #{username,jdbcType=VARCHAR},
140 </if> 153 </if>
  154 + <if test="virtualHostId != null">
  155 + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR},
  156 + </if>
141 <if test="virtualHostName != null"> 157 <if test="virtualHostName != null">
142 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, 158 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR},
143 </if> 159 </if>
  160 + <if test="exchangeId != null">
  161 + exchange_id = #{exchangeId,jdbcType=VARCHAR},
  162 + </if>
144 <if test="exchangeName != null"> 163 <if test="exchangeName != null">
145 exchange_name = #{exchangeName,jdbcType=VARCHAR}, 164 exchange_name = #{exchangeName,jdbcType=VARCHAR},
146 </if> 165 </if>
  166 + <if test="queueId != null">
  167 + queue_id = #{queueId,jdbcType=VARCHAR},
  168 + </if>
  169 + <if test="queueName != null">
  170 + queue_name = #{queueName,jdbcType=VARCHAR},
  171 + </if>
  172 + <if test="routingKeyId != null">
  173 + routing_key_id = #{routingKeyId,jdbcType=VARCHAR},
  174 + </if>
147 <if test="routingKeyName != null"> 175 <if test="routingKeyName != null">
148 routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, 176 routing_key_name = #{routingKeyName,jdbcType=VARCHAR},
149 </if> 177 </if>
@@ -162,14 +190,52 @@ @@ -162,14 +190,52 @@
162 <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding"> 190 <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding">
163 <!--@mbg.generated--> 191 <!--@mbg.generated-->
164 update user_message_binding 192 update user_message_binding
165 - set username = #{username,jdbcType=VARCHAR}, 193 + set user_id = #{userId,jdbcType=VARCHAR},
  194 + username = #{username,jdbcType=VARCHAR},
  195 + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR},
166 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, 196 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR},
  197 + exchange_id = #{exchangeId,jdbcType=VARCHAR},
167 exchange_name = #{exchangeName,jdbcType=VARCHAR}, 198 exchange_name = #{exchangeName,jdbcType=VARCHAR},
  199 + queue_id = #{queueId,jdbcType=VARCHAR},
  200 + queue_name = #{queueName,jdbcType=VARCHAR},
  201 + routing_key_id = #{routingKeyId,jdbcType=VARCHAR},
168 routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, 202 routing_key_name = #{routingKeyName,jdbcType=VARCHAR},
169 subscriber = #{subscriber,jdbcType=VARCHAR}, 203 subscriber = #{subscriber,jdbcType=VARCHAR},
170 gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, 204 gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
171 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} 205 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
172 where id = #{id,jdbcType=VARCHAR} 206 where id = #{id,jdbcType=VARCHAR}
173 </update> 207 </update>
  208 + <!-- 查询列表,选择性 -->
  209 + <select id="selectUserMessageBindingList" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding" resultMap="BaseResultMap">
  210 + select
  211 + <include refid="Base_Column_List" />
  212 + from user_message_binding
  213 + <where>
  214 + <!-- 所属用户登陆名称 -->
  215 + <if test="username != null and username !=''">
  216 + username = #{username,jdbcType=VARCHAR}
  217 + </if>
  218 + <!-- 所属虚拟主机名称 -->
  219 + <if test="virtualHostName != null and virtualHostName !=''">
  220 + AND virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}
  221 + </if>
  222 + <!-- 所属交换机名称 -->
  223 + <if test="exchangeName != null and exchangeName !=''">
  224 + AND exchange_name = #{exchangeName,jdbcType=VARCHAR}
  225 + </if>
  226 + <!-- 所属队列名称 -->
  227 + <if test="queueName != null and queueName !=''">
  228 + AND queue_name = #{queueName,jdbcType=VARCHAR}
  229 + </if>
  230 + <!-- 所属路由键名称 -->
  231 + <if test="routingKeyName != null and routingKeyName !=''">
  232 + AND routing_key_name = #{routingKeyName,jdbcType=VARCHAR}
  233 + </if>
  234 + <!-- 订阅者 -->
  235 + <if test="subscriber != null and subscriber !=''">
  236 + AND subscriber = #{subscriber,jdbcType=VARCHAR}
  237 + </if>
  238 + </where>
  239 + </select>
174 240
175 </mapper> 241 </mapper>