作者 王勇

消息收发表,添加字段

@@ -3,15 +3,14 @@ package com.sunyo.wlpt.message.bus.service.domain; @@ -3,15 +3,14 @@ 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/7/2 15:21 12 + * Description:消息收发记录表(默认存储七天)
  13 + * 时间:2020/7/13 18:58
15 */ 14 */
16 15
17 @Data 16 @Data
@@ -19,7 +18,7 @@ import lombok.NoArgsConstructor; @@ -19,7 +18,7 @@ import lombok.NoArgsConstructor;
19 @NoArgsConstructor 18 @NoArgsConstructor
20 public class MessageNote implements Serializable { 19 public class MessageNote implements Serializable {
21 20
22 - private static final long serialVersionUID = 6971204112114471516L; 21 + private static final long serialVersionUID = 4952900873210696428L;
23 22
24 /** 23 /**
25 * 消息收发记录表的ID 24 * 消息收发记录表的ID
@@ -30,67 +29,70 @@ public class MessageNote implements Serializable { @@ -30,67 +29,70 @@ public class MessageNote implements Serializable {
30 * 用户的ID 29 * 用户的ID
31 */ 30 */
32 private String userId; 31 private String userId;
  32 +
33 /** 33 /**
34 - * 所属虚拟主机的ID 34 + * 所属用户登陆名称
35 */ 35 */
36 - private String virtualHostId; 36 + private String username;
37 37
38 /** 38 /**
39 - * 所属交换机的ID 39 + * 所属服务器的ID
40 */ 40 */
41 - private String exchangeId; 41 + private String serverId;
42 42
43 /** 43 /**
44 - * 所属队列的ID 44 + * 所属服务器名称
45 */ 45 */
46 - private String queueId; 46 + private String serverName;
47 47
48 /** 48 /**
49 - * 所属路由键的ID 49 + * 所属虚拟主机的ID
50 */ 50 */
51 - private String routingKeyId; 51 + private String virtualHostId;
52 52
  53 + /**
  54 + * 所属虚拟主机名称
  55 + */
  56 + private String virtualHostName;
53 57
54 /** 58 /**
55 - * 用户登陆名称 59 + * 所属交换机的ID
56 */ 60 */
57 - private String username; 61 + private String exchangeId;
58 62
59 /** 63 /**
60 - * 服务器名称 64 + * 所属交换机名称
61 */ 65 */
62 - private String serverName; 66 + private String exchangeName;
63 67
64 /** 68 /**
65 - * 虚拟主机名称 69 + * 所属队列的ID
66 */ 70 */
67 - private String virtualHostName; 71 + private String queueId;
68 72
69 /** 73 /**
70 - * 交换机名称 74 + * 所属队列名称
71 */ 75 */
72 - private String exchangeName; 76 + private String queueName;
73 77
74 /** 78 /**
75 - * routing_key的名称 79 + * 所属路由键的ID
76 */ 80 */
77 - private String routingKeyName; 81 + private String routingKeyId;
78 82
79 /** 83 /**
80 - * 队列名称 84 + * 所属路由键的名称
81 */ 85 */
82 - private String queueName; 86 + private String routingKeyName;
83 87
84 /** 88 /**
85 * 消息发送时间 89 * 消息发送时间
86 */ 90 */
87 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")  
88 private Date sendTime; 91 private Date sendTime;
89 92
90 /** 93 /**
91 * 消息获取时间 94 * 消息获取时间
92 */ 95 */
93 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")  
94 private Date receiveTime; 96 private Date receiveTime;
95 97
96 /** 98 /**
@@ -101,12 +103,11 @@ public class MessageNote implements Serializable { @@ -101,12 +103,11 @@ public class MessageNote implements Serializable {
101 /** 103 /**
102 * 创建时间 104 * 创建时间
103 */ 105 */
104 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")  
105 private Date gmtCreate; 106 private Date gmtCreate;
106 107
107 /** 108 /**
108 * 修改时间 109 * 修改时间
109 */ 110 */
110 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")  
111 private Date gmtModified; 111 private Date gmtModified;
  112 +
112 } 113 }
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.MessageNote; 3 import com.sunyo.wlpt.message.bus.service.domain.MessageNote;
4 -import org.apache.ibatis.annotations.Mapper;  
5 -  
6 -import java.util.List; 4 +import org.apache.ibatis.annotations.Mapper;import java.util.List;
7 5
8 /** 6 /**
9 * @author 子诚 7 * @author 子诚
10 * Description: 8 * Description:
11 - * 时间:2020/7/2 15:21 9 + * 时间:2020/7/13 18:58
12 */ 10 */
13 @Mapper 11 @Mapper
14 public interface MessageNoteMapper { 12 public interface MessageNoteMapper {
15 -  
16 /** 13 /**
17 - * 删除,根据主键 14 + * delete by primary key
18 * 15 *
19 * @param id primaryKey 16 * @param id primaryKey
20 * @return deleteCount 17 * @return deleteCount
@@ -22,7 +19,7 @@ public interface MessageNoteMapper { @@ -22,7 +19,7 @@ public interface MessageNoteMapper {
22 int deleteByPrimaryKey(String id); 19 int deleteByPrimaryKey(String id);
23 20
24 /** 21 /**
25 - * 新增 22 + * insert record to table
26 * 23 *
27 * @param record the record 24 * @param record the record
28 * @return insert count 25 * @return insert count
@@ -30,7 +27,7 @@ public interface MessageNoteMapper { @@ -30,7 +27,7 @@ public interface MessageNoteMapper {
30 int insert(MessageNote record); 27 int insert(MessageNote record);
31 28
32 /** 29 /**
33 - * 新增,选择性 30 + * insert record to table selective
34 * 31 *
35 * @param record the record 32 * @param record the record
36 * @return insert count 33 * @return insert count
@@ -38,7 +35,7 @@ public interface MessageNoteMapper { @@ -38,7 +35,7 @@ public interface MessageNoteMapper {
38 int insertSelective(MessageNote record); 35 int insertSelective(MessageNote record);
39 36
40 /** 37 /**
41 - * 查询,根据主键 38 + * select by primary key
42 * 39 *
43 * @param id primary key 40 * @param id primary key
44 * @return object by primary key 41 * @return object by primary key
@@ -46,7 +43,7 @@ public interface MessageNoteMapper { @@ -46,7 +43,7 @@ public interface MessageNoteMapper {
46 MessageNote selectByPrimaryKey(String id); 43 MessageNote selectByPrimaryKey(String id);
47 44
48 /** 45 /**
49 - * 更新,根据主键,选择性 46 + * update record selective
50 * 47 *
51 * @param record the updated record 48 * @param record the updated record
52 * @return update count 49 * @return update count
@@ -54,7 +51,7 @@ public interface MessageNoteMapper { @@ -54,7 +51,7 @@ public interface MessageNoteMapper {
54 int updateByPrimaryKeySelective(MessageNote record); 51 int updateByPrimaryKeySelective(MessageNote record);
55 52
56 /** 53 /**
57 - * 更新,根据主键 54 + * update record
58 * 55 *
59 * @param record the updated record 56 * @param record the updated record
60 * @return update count 57 * @return update count
@@ -69,3 +69,4 @@ public interface MessageNoteService { @@ -69,3 +69,4 @@ public interface MessageNoteService {
69 PageInfo selectMessageNoteList(MessageNote messageNote, Integer pageNum, Integer pageSize); 69 PageInfo selectMessageNoteList(MessageNote messageNote, Integer pageNum, Integer pageSize);
70 } 70 }
71 71
  72 +
@@ -91,3 +91,4 @@ public class MessageNoteServiceImpl implements MessageNoteService { @@ -91,3 +91,4 @@ public class MessageNoteServiceImpl implements MessageNoteService {
91 91
92 } 92 }
93 93
  94 +
@@ -4,74 +4,38 @@ @@ -4,74 +4,38 @@
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_name" jdbcType="VARCHAR" property="serverName"/>  
11 - <result column="virtual_host_name" jdbcType="VARCHAR" property="virtualHostName"/>  
12 - <result column="exchange_name" jdbcType="VARCHAR" property="exchangeName"/>  
13 - <result column="routing_key_name" jdbcType="VARCHAR" property="routingKeyName"/>  
14 - <result column="queue_name" jdbcType="VARCHAR" property="queueName"/>  
15 - <result column="send_time" jdbcType="TIMESTAMP" property="sendTime"/>  
16 - <result column="receive_time" jdbcType="TIMESTAMP" property="receiveTime"/>  
17 - <result column="send_content" jdbcType="BLOB" property="sendContent"/>  
18 - <result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>  
19 - <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="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
  24 + <result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
20 </resultMap> 25 </resultMap>
21 <sql id="Base_Column_List"> 26 <sql id="Base_Column_List">
22 <!--@mbg.generated--> 27 <!--@mbg.generated-->
23 - id, user_id, username, `server_name`, virtual_host_name, exchange_name, routing_key_name,  
24 - queue_name, send_time, receive_time, send_content, gmt_create, gmt_modified 28 + id, user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name,
  29 + exchange_id, exchange_name, queue_id, queue_name, routing_key_id, routing_key_name,
  30 + send_time, receive_time, send_content, gmt_create, gmt_modified
25 </sql> 31 </sql>
26 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> 32 <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
27 <!--@mbg.generated--> 33 <!--@mbg.generated-->
28 select 34 select
29 - <include refid="Base_Column_List"/> 35 + <include refid="Base_Column_List" />
30 from message_note 36 from message_note
31 where id = #{id,jdbcType=VARCHAR} 37 where id = #{id,jdbcType=VARCHAR}
32 </select> 38 </select>
33 - <!-- 获取,消息收发记录列表 -->  
34 - <select id="selectMessageNoteList" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"  
35 - resultMap="BaseResultMap">  
36 - select  
37 - <include refid="Base_Column_List"/>  
38 - from message_note  
39 - <where>  
40 - <!-- 所属用户登陆名称 -->  
41 - <if test="username != null and username !=''">  
42 - username = #{username,jdbcType=VARCHAR}  
43 - </if>  
44 - <!-- 所属服务器名称 -->  
45 - <if test="serverName != null and serverName !=''">  
46 - AND server_name = #{serverName,jdbcType=VARCHAR}  
47 - </if>  
48 - <!-- 所属虚拟主机名称 -->  
49 - <if test="virtualHostName != null and virtualHostName !=''">  
50 - AND virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}  
51 - </if>  
52 - <!-- 所属交换机名称 -->  
53 - <if test="exchangeName != null and exchangeName !=''">  
54 - AND exchange_name = #{exchangeName,jdbcType=VARCHAR}  
55 - </if>  
56 - <!-- 所属路由键名称 -->  
57 - <if test="routingKeyName != null and routingKeyName !=''">  
58 - AND routing_key_name = #{routingKeyName,jdbcType=VARCHAR}  
59 - </if>  
60 - <!-- 所属队列名称 -->  
61 - <if test="queueName != null and queueName !=''">  
62 - AND queue_name = #{queueName,jdbcType=VARCHAR}  
63 - </if>  
64 - <!-- 消息发送时间 -->  
65 - <if test="sendTime != null">  
66 - AND DATE_FORMAT(send_time,'%Y-%m-%d') = #{sendTime,jdbcType=DATE}  
67 - </if>  
68 - <!-- 消息接收时间 -->  
69 - <if test="receiveTime != null">  
70 - AND DATE_FORMAT(receive_time,'%Y-%m-%d') = #{receiveTime,jdbcType=DATE}  
71 - </if>  
72 - </where>  
73 - </select>  
74 -  
75 <delete id="deleteByPrimaryKey" parameterType="java.lang.String"> 39 <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
76 <!--@mbg.generated--> 40 <!--@mbg.generated-->
77 delete from message_note 41 delete from message_note
@@ -80,15 +44,19 @@ @@ -80,15 +44,19 @@
80 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> 44 <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote">
81 <!--@mbg.generated--> 45 <!--@mbg.generated-->
82 insert into message_note (id, user_id, username, 46 insert into message_note (id, user_id, username,
83 - `server_name`, virtual_host_name, exchange_name,  
84 - routing_key_name, queue_name, send_time,  
85 - receive_time, send_content, gmt_create,  
86 - gmt_modified) 47 + server_id, `server_name`, virtual_host_id,
  48 + virtual_host_name, exchange_id, exchange_name,
  49 + queue_id, queue_name, routing_key_id,
  50 + routing_key_name, send_time, receive_time,
  51 + send_content, gmt_create, gmt_modified
  52 + )
87 values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, 53 values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
88 - #{serverName,jdbcType=VARCHAR}, #{virtualHostName,jdbcType=VARCHAR}, #{exchangeName,jdbcType=VARCHAR},  
89 - #{routingKeyName,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR}, #{sendTime,jdbcType=TIMESTAMP},  
90 - #{receiveTime,jdbcType=TIMESTAMP}, #{sendContent,jdbcType=BLOB}, #{gmtCreate,jdbcType=TIMESTAMP},  
91 - #{gmtModified,jdbcType=TIMESTAMP}) 54 + #{serverId,jdbcType=VARCHAR}, #{serverName,jdbcType=VARCHAR}, #{virtualHostId,jdbcType=VARCHAR},
  55 + #{virtualHostName,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR}, #{exchangeName,jdbcType=VARCHAR},
  56 + #{queueId,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR}, #{routingKeyId,jdbcType=VARCHAR},
  57 + #{routingKeyName,jdbcType=VARCHAR}, #{sendTime,jdbcType=TIMESTAMP}, #{receiveTime,jdbcType=TIMESTAMP},
  58 + #{sendContent,jdbcType=BLOB}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}
  59 + )
92 </insert> 60 </insert>
93 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> 61 <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote">
94 <!--@mbg.generated--> 62 <!--@mbg.generated-->
@@ -103,21 +71,36 @@ @@ -103,21 +71,36 @@
103 <if test="username != null"> 71 <if test="username != null">
104 username, 72 username,
105 </if> 73 </if>
  74 + <if test="serverId != null">
  75 + server_id,
  76 + </if>
106 <if test="serverName != null"> 77 <if test="serverName != null">
107 `server_name`, 78 `server_name`,
108 </if> 79 </if>
  80 + <if test="virtualHostId != null">
  81 + virtual_host_id,
  82 + </if>
109 <if test="virtualHostName != null"> 83 <if test="virtualHostName != null">
110 virtual_host_name, 84 virtual_host_name,
111 </if> 85 </if>
  86 + <if test="exchangeId != null">
  87 + exchange_id,
  88 + </if>
112 <if test="exchangeName != null"> 89 <if test="exchangeName != null">
113 exchange_name, 90 exchange_name,
114 </if> 91 </if>
115 - <if test="routingKeyName != null">  
116 - routing_key_name, 92 + <if test="queueId != null">
  93 + queue_id,
117 </if> 94 </if>
118 <if test="queueName != null"> 95 <if test="queueName != null">
119 queue_name, 96 queue_name,
120 </if> 97 </if>
  98 + <if test="routingKeyId != null">
  99 + routing_key_id,
  100 + </if>
  101 + <if test="routingKeyName != null">
  102 + routing_key_name,
  103 + </if>
121 <if test="sendTime != null"> 104 <if test="sendTime != null">
122 send_time, 105 send_time,
123 </if> 106 </if>
@@ -144,21 +127,36 @@ @@ -144,21 +127,36 @@
144 <if test="username != null"> 127 <if test="username != null">
145 #{username,jdbcType=VARCHAR}, 128 #{username,jdbcType=VARCHAR},
146 </if> 129 </if>
  130 + <if test="serverId != null">
  131 + #{serverId,jdbcType=VARCHAR},
  132 + </if>
147 <if test="serverName != null"> 133 <if test="serverName != null">
148 #{serverName,jdbcType=VARCHAR}, 134 #{serverName,jdbcType=VARCHAR},
149 </if> 135 </if>
  136 + <if test="virtualHostId != null">
  137 + #{virtualHostId,jdbcType=VARCHAR},
  138 + </if>
150 <if test="virtualHostName != null"> 139 <if test="virtualHostName != null">
151 #{virtualHostName,jdbcType=VARCHAR}, 140 #{virtualHostName,jdbcType=VARCHAR},
152 </if> 141 </if>
  142 + <if test="exchangeId != null">
  143 + #{exchangeId,jdbcType=VARCHAR},
  144 + </if>
153 <if test="exchangeName != null"> 145 <if test="exchangeName != null">
154 #{exchangeName,jdbcType=VARCHAR}, 146 #{exchangeName,jdbcType=VARCHAR},
155 </if> 147 </if>
156 - <if test="routingKeyName != null">  
157 - #{routingKeyName,jdbcType=VARCHAR}, 148 + <if test="queueId != null">
  149 + #{queueId,jdbcType=VARCHAR},
158 </if> 150 </if>
159 <if test="queueName != null"> 151 <if test="queueName != null">
160 #{queueName,jdbcType=VARCHAR}, 152 #{queueName,jdbcType=VARCHAR},
161 </if> 153 </if>
  154 + <if test="routingKeyId != null">
  155 + #{routingKeyId,jdbcType=VARCHAR},
  156 + </if>
  157 + <if test="routingKeyName != null">
  158 + #{routingKeyName,jdbcType=VARCHAR},
  159 + </if>
162 <if test="sendTime != null"> 160 <if test="sendTime != null">
163 #{sendTime,jdbcType=TIMESTAMP}, 161 #{sendTime,jdbcType=TIMESTAMP},
164 </if> 162 </if>
@@ -186,21 +184,36 @@ @@ -186,21 +184,36 @@
186 <if test="username != null"> 184 <if test="username != null">
187 username = #{username,jdbcType=VARCHAR}, 185 username = #{username,jdbcType=VARCHAR},
188 </if> 186 </if>
  187 + <if test="serverId != null">
  188 + server_id = #{serverId,jdbcType=VARCHAR},
  189 + </if>
189 <if test="serverName != null"> 190 <if test="serverName != null">
190 `server_name` = #{serverName,jdbcType=VARCHAR}, 191 `server_name` = #{serverName,jdbcType=VARCHAR},
191 </if> 192 </if>
  193 + <if test="virtualHostId != null">
  194 + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR},
  195 + </if>
192 <if test="virtualHostName != null"> 196 <if test="virtualHostName != null">
193 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, 197 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR},
194 </if> 198 </if>
  199 + <if test="exchangeId != null">
  200 + exchange_id = #{exchangeId,jdbcType=VARCHAR},
  201 + </if>
195 <if test="exchangeName != null"> 202 <if test="exchangeName != null">
196 exchange_name = #{exchangeName,jdbcType=VARCHAR}, 203 exchange_name = #{exchangeName,jdbcType=VARCHAR},
197 </if> 204 </if>
198 - <if test="routingKeyName != null">  
199 - routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, 205 + <if test="queueId != null">
  206 + queue_id = #{queueId,jdbcType=VARCHAR},
200 </if> 207 </if>
201 <if test="queueName != null"> 208 <if test="queueName != null">
202 queue_name = #{queueName,jdbcType=VARCHAR}, 209 queue_name = #{queueName,jdbcType=VARCHAR},
203 </if> 210 </if>
  211 + <if test="routingKeyId != null">
  212 + routing_key_id = #{routingKeyId,jdbcType=VARCHAR},
  213 + </if>
  214 + <if test="routingKeyName != null">
  215 + routing_key_name = #{routingKeyName,jdbcType=VARCHAR},
  216 + </if>
204 <if test="sendTime != null"> 217 <if test="sendTime != null">
205 send_time = #{sendTime,jdbcType=TIMESTAMP}, 218 send_time = #{sendTime,jdbcType=TIMESTAMP},
206 </if> 219 </if>
@@ -224,11 +237,16 @@ @@ -224,11 +237,16 @@
224 update message_note 237 update message_note
225 set user_id = #{userId,jdbcType=VARCHAR}, 238 set user_id = #{userId,jdbcType=VARCHAR},
226 username = #{username,jdbcType=VARCHAR}, 239 username = #{username,jdbcType=VARCHAR},
  240 + server_id = #{serverId,jdbcType=VARCHAR},
227 `server_name` = #{serverName,jdbcType=VARCHAR}, 241 `server_name` = #{serverName,jdbcType=VARCHAR},
  242 + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR},
228 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, 243 virtual_host_name = #{virtualHostName,jdbcType=VARCHAR},
  244 + exchange_id = #{exchangeId,jdbcType=VARCHAR},
229 exchange_name = #{exchangeName,jdbcType=VARCHAR}, 245 exchange_name = #{exchangeName,jdbcType=VARCHAR},
230 - routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, 246 + queue_id = #{queueId,jdbcType=VARCHAR},
231 queue_name = #{queueName,jdbcType=VARCHAR}, 247 queue_name = #{queueName,jdbcType=VARCHAR},
  248 + routing_key_id = #{routingKeyId,jdbcType=VARCHAR},
  249 + routing_key_name = #{routingKeyName,jdbcType=VARCHAR},
232 send_time = #{sendTime,jdbcType=TIMESTAMP}, 250 send_time = #{sendTime,jdbcType=TIMESTAMP},
233 receive_time = #{receiveTime,jdbcType=TIMESTAMP}, 251 receive_time = #{receiveTime,jdbcType=TIMESTAMP},
234 send_content = #{sendContent,jdbcType=BLOB}, 252 send_content = #{sendContent,jdbcType=BLOB},
@@ -236,5 +254,45 @@ @@ -236,5 +254,45 @@
236 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} 254 gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
237 where id = #{id,jdbcType=VARCHAR} 255 where id = #{id,jdbcType=VARCHAR}
238 </update> 256 </update>
  257 + <!-- 获取,消息收发记录列表 -->
  258 + <select id="selectMessageNoteList" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote" resultMap="BaseResultMap">
  259 + select
  260 + <include refid="Base_Column_List" />
  261 + from message_note
  262 + <where>
  263 + <!-- 所属用户登陆名称 -->
  264 + <if test="username != null and username !=''">
  265 + username = #{username,jdbcType=VARCHAR}
  266 + </if>
  267 + <!-- 所属服务器名称 -->
  268 + <if test="serverName != null and serverName !=''">
  269 + AND server_name = #{serverName,jdbcType=VARCHAR}
  270 + </if>
  271 + <!-- 所属虚拟主机名称 -->
  272 + <if test="virtualHostName != null and virtualHostName !=''">
  273 + AND virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}
  274 + </if>
  275 + <!-- 所属交换机名称 -->
  276 + <if test="exchangeName != null and exchangeName !=''">
  277 + AND exchange_name = #{exchangeName,jdbcType=VARCHAR}
  278 + </if>
  279 + <!-- 所属路由键名称 -->
  280 + <if test="routingKeyName != null and routingKeyName !=''">
  281 + AND routing_key_name = #{routingKeyName,jdbcType=VARCHAR}
  282 + </if>
  283 + <!-- 所属队列名称 -->
  284 + <if test="queueName != null and queueName !=''">
  285 + AND queue_name = #{queueName,jdbcType=VARCHAR}
  286 + </if>
  287 + <!-- 消息发送时间 -->
  288 + <if test="sendTime != null">
  289 + AND DATE_FORMAT(send_time,'%Y-%m-%d') = #{sendTime,jdbcType=DATE}
  290 + </if>
  291 + <!-- 消息接收时间 -->
  292 + <if test="receiveTime != null">
  293 + AND DATE_FORMAT(receive_time,'%Y-%m-%d') = #{receiveTime,jdbcType=DATE}
  294 + </if>
  295 + </where>
  296 + </select>
239 297
240 </mapper> 298 </mapper>