正在显示
11 个修改的文件
包含
909 行增加
和
726 行删除
@@ -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,19 +97,20 @@ | @@ -87,19 +97,20 @@ | ||
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"> |
94 | <!--@mbg.generated--> | 105 | <!--@mbg.generated--> |
95 | insert into bus_exchange (id, exchange_name, virtual_host_id, | 106 | insert into bus_exchange (id, exchange_name, virtual_host_id, |
96 | - exchange_type, durability, auto_delete, | ||
97 | - internal, arguments, description, | ||
98 | - gmt_create, gmt_modified) | 107 | + exchange_type, durability, auto_delete, |
108 | + internal, arguments, description, | ||
109 | + gmt_create, gmt_modified) | ||
99 | values (#{id,jdbcType=VARCHAR}, #{exchangeName,jdbcType=VARCHAR}, #{virtualHostId,jdbcType=VARCHAR}, | 110 | values (#{id,jdbcType=VARCHAR}, #{exchangeName,jdbcType=VARCHAR}, #{virtualHostId,jdbcType=VARCHAR}, |
100 | - #{exchangeType,jdbcType=VARCHAR}, #{durability,jdbcType=BOOLEAN}, #{autoDelete,jdbcType=BOOLEAN}, | ||
101 | - #{internal,jdbcType=BOOLEAN}, #{arguments,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, | ||
102 | - #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}) | 111 | + #{exchangeType,jdbcType=VARCHAR}, #{durability,jdbcType=BOOLEAN}, #{autoDelete,jdbcType=BOOLEAN}, |
112 | + #{internal,jdbcType=BOOLEAN}, #{arguments,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, | ||
113 | + #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}) | ||
103 | </insert> | 114 | </insert> |
104 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusExchange"> | 115 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusExchange"> |
105 | <!--@mbg.generated--> | 116 | <!--@mbg.generated--> |
@@ -215,17 +226,16 @@ | @@ -215,17 +226,16 @@ | ||
215 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusExchange"> | 226 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusExchange"> |
216 | <!--@mbg.generated--> | 227 | <!--@mbg.generated--> |
217 | update bus_exchange | 228 | update bus_exchange |
218 | - set exchange_name = #{exchangeName,jdbcType=VARCHAR}, | ||
219 | - virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
220 | - exchange_type = #{exchangeType,jdbcType=VARCHAR}, | ||
221 | - durability = #{durability,jdbcType=BOOLEAN}, | ||
222 | - auto_delete = #{autoDelete,jdbcType=BOOLEAN}, | ||
223 | - internal = #{internal,jdbcType=BOOLEAN}, | ||
224 | - arguments = #{arguments,jdbcType=VARCHAR}, | ||
225 | - description = #{description,jdbcType=VARCHAR}, | ||
226 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
227 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | 229 | + set exchange_name = #{exchangeName,jdbcType=VARCHAR}, |
230 | + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
231 | + exchange_type = #{exchangeType,jdbcType=VARCHAR}, | ||
232 | + durability = #{durability,jdbcType=BOOLEAN}, | ||
233 | + auto_delete = #{autoDelete,jdbcType=BOOLEAN}, | ||
234 | + internal = #{internal,jdbcType=BOOLEAN}, | ||
235 | + arguments = #{arguments,jdbcType=VARCHAR}, | ||
236 | + description = #{description,jdbcType=VARCHAR}, | ||
237 | + gmt_create = #{gmtCreate,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> |
1 | <?xml version="1.0" encoding="UTF-8"?> | 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"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.BusQueueMapper"> | 3 | <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.BusQueueMapper"> |
4 | - <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> | ||
5 | - <!--@mbg.generated--> | ||
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" /> | ||
18 | - </resultMap> | 4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> |
5 | + <!--@mbg.generated--> | ||
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"/> | ||
18 | + </resultMap> | ||
19 | <sql id="Base_Column_List"> | 19 | <sql id="Base_Column_List"> |
20 | - <!--@mbg.generated--> | ||
21 | - id, queue_name, user_id, username, virtual_host_id, durability, auto_delete, arguments, | 20 | + <!--@mbg.generated--> |
21 | + id, queue_name, user_id, username, virtual_host_id, durability, auto_delete, arguments, | ||
22 | description, gmt_create, gmt_modified | 22 | description, gmt_create, gmt_modified |
23 | </sql> | 23 | </sql> |
24 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | 24 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
25 | - <!--@mbg.generated--> | ||
26 | - select | ||
27 | - <include refid="Base_Column_List" /> | ||
28 | - from bus_queue | ||
29 | - where id = #{id,jdbcType=VARCHAR} | 25 | + <!--@mbg.generated--> |
26 | + select | ||
27 | + <include refid="Base_Column_List"/> | ||
28 | + from bus_queue | ||
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--> | ||
33 | - delete from bus_queue | ||
34 | - where id = #{id,jdbcType=VARCHAR} | 32 | + <!--@mbg.generated--> |
33 | + delete | ||
34 | + from bus_queue | ||
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"> |
37 | - <!--@mbg.generated--> | ||
38 | - insert into bus_queue (id, queue_name, user_id, | ||
39 | - username, virtual_host_id, durability, | ||
40 | - auto_delete, arguments, description, | ||
41 | - gmt_create, gmt_modified) | ||
42 | - values (#{id,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, | ||
43 | - #{username,jdbcType=VARCHAR}, #{virtualHostId,jdbcType=VARCHAR}, #{durability,jdbcType=BOOLEAN}, | ||
44 | - #{autoDelete,jdbcType=BOOLEAN}, #{arguments,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, | ||
45 | - #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}) | 38 | + <!--@mbg.generated--> |
39 | + insert into bus_queue (id, queue_name, user_id, | ||
40 | + username, virtual_host_id, durability, | ||
41 | + auto_delete, arguments, description, | ||
42 | + gmt_create, gmt_modified) | ||
43 | + values (#{id,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, | ||
44 | + #{username,jdbcType=VARCHAR}, #{virtualHostId,jdbcType=VARCHAR}, #{durability,jdbcType=BOOLEAN}, | ||
45 | + #{autoDelete,jdbcType=BOOLEAN}, #{arguments,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, | ||
46 | + #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}) | ||
46 | </insert> | 47 | </insert> |
47 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> | 48 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> |
48 | - <!--@mbg.generated--> | ||
49 | - insert into bus_queue | ||
50 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
51 | - <if test="id != null"> | ||
52 | - id, | ||
53 | - </if> | 49 | + <!--@mbg.generated--> |
50 | + insert into bus_queue | ||
51 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
52 | + <if test="id != null"> | ||
53 | + id, | ||
54 | + </if> | ||
54 | <if test="queueName != null"> | 55 | <if test="queueName != null"> |
55 | - queue_name, | 56 | + queue_name, |
56 | </if> | 57 | </if> |
57 | <if test="userId != null"> | 58 | <if test="userId != null"> |
58 | - user_id, | 59 | + user_id, |
59 | </if> | 60 | </if> |
60 | <if test="username != null"> | 61 | <if test="username != null"> |
61 | - username, | 62 | + username, |
62 | </if> | 63 | </if> |
63 | <if test="virtualHostId != null"> | 64 | <if test="virtualHostId != null"> |
64 | - virtual_host_id, | 65 | + virtual_host_id, |
65 | </if> | 66 | </if> |
66 | <if test="durability != null"> | 67 | <if test="durability != null"> |
67 | - durability, | 68 | + durability, |
68 | </if> | 69 | </if> |
69 | <if test="autoDelete != null"> | 70 | <if test="autoDelete != null"> |
70 | - auto_delete, | 71 | + auto_delete, |
71 | </if> | 72 | </if> |
72 | <if test="arguments != null"> | 73 | <if test="arguments != null"> |
73 | - arguments, | 74 | + arguments, |
74 | </if> | 75 | </if> |
75 | <if test="description != null"> | 76 | <if test="description != null"> |
76 | - description, | 77 | + description, |
77 | </if> | 78 | </if> |
78 | <if test="gmtCreate != null"> | 79 | <if test="gmtCreate != null"> |
79 | - gmt_create, | 80 | + gmt_create, |
80 | </if> | 81 | </if> |
81 | <if test="gmtModified != null"> | 82 | <if test="gmtModified != null"> |
82 | - gmt_modified, | 83 | + gmt_modified, |
83 | </if> | 84 | </if> |
84 | - </trim> | 85 | + </trim> |
85 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 86 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
86 | - <if test="id != null"> | ||
87 | - #{id,jdbcType=VARCHAR}, | ||
88 | - </if> | 87 | + <if test="id != null"> |
88 | + #{id,jdbcType=VARCHAR}, | ||
89 | + </if> | ||
89 | <if test="queueName != null"> | 90 | <if test="queueName != null"> |
90 | - #{queueName,jdbcType=VARCHAR}, | 91 | + #{queueName,jdbcType=VARCHAR}, |
91 | </if> | 92 | </if> |
92 | <if test="userId != null"> | 93 | <if test="userId != null"> |
93 | - #{userId,jdbcType=VARCHAR}, | 94 | + #{userId,jdbcType=VARCHAR}, |
94 | </if> | 95 | </if> |
95 | <if test="username != null"> | 96 | <if test="username != null"> |
96 | - #{username,jdbcType=VARCHAR}, | 97 | + #{username,jdbcType=VARCHAR}, |
97 | </if> | 98 | </if> |
98 | <if test="virtualHostId != null"> | 99 | <if test="virtualHostId != null"> |
99 | - #{virtualHostId,jdbcType=VARCHAR}, | 100 | + #{virtualHostId,jdbcType=VARCHAR}, |
100 | </if> | 101 | </if> |
101 | <if test="durability != null"> | 102 | <if test="durability != null"> |
102 | - #{durability,jdbcType=BOOLEAN}, | 103 | + #{durability,jdbcType=BOOLEAN}, |
103 | </if> | 104 | </if> |
104 | <if test="autoDelete != null"> | 105 | <if test="autoDelete != null"> |
105 | - #{autoDelete,jdbcType=BOOLEAN}, | 106 | + #{autoDelete,jdbcType=BOOLEAN}, |
106 | </if> | 107 | </if> |
107 | <if test="arguments != null"> | 108 | <if test="arguments != null"> |
108 | - #{arguments,jdbcType=VARCHAR}, | 109 | + #{arguments,jdbcType=VARCHAR}, |
109 | </if> | 110 | </if> |
110 | <if test="description != null"> | 111 | <if test="description != null"> |
111 | - #{description,jdbcType=VARCHAR}, | 112 | + #{description,jdbcType=VARCHAR}, |
112 | </if> | 113 | </if> |
113 | <if test="gmtCreate != null"> | 114 | <if test="gmtCreate != null"> |
114 | - #{gmtCreate,jdbcType=TIMESTAMP}, | 115 | + #{gmtCreate,jdbcType=TIMESTAMP}, |
115 | </if> | 116 | </if> |
116 | <if test="gmtModified != null"> | 117 | <if test="gmtModified != null"> |
117 | - #{gmtModified,jdbcType=TIMESTAMP}, | 118 | + #{gmtModified,jdbcType=TIMESTAMP}, |
118 | </if> | 119 | </if> |
119 | </trim> | 120 | </trim> |
120 | </insert> | 121 | </insert> |
121 | <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> | 122 | <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> |
122 | - <!--@mbg.generated--> | ||
123 | - update bus_queue | ||
124 | - <set> | ||
125 | - <if test="queueName != null"> | ||
126 | - queue_name = #{queueName,jdbcType=VARCHAR}, | ||
127 | - </if> | ||
128 | - <if test="userId != null"> | ||
129 | - user_id = #{userId,jdbcType=VARCHAR}, | ||
130 | - </if> | ||
131 | - <if test="username != null"> | ||
132 | - username = #{username,jdbcType=VARCHAR}, | ||
133 | - </if> | ||
134 | - <if test="virtualHostId != null"> | ||
135 | - virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
136 | - </if> | ||
137 | - <if test="durability != null"> | ||
138 | - durability = #{durability,jdbcType=BOOLEAN}, | ||
139 | - </if> | ||
140 | - <if test="autoDelete != null"> | ||
141 | - auto_delete = #{autoDelete,jdbcType=BOOLEAN}, | ||
142 | - </if> | ||
143 | - <if test="arguments != null"> | ||
144 | - arguments = #{arguments,jdbcType=VARCHAR}, | ||
145 | - </if> | ||
146 | - <if test="description != null"> | ||
147 | - description = #{description,jdbcType=VARCHAR}, | ||
148 | - </if> | ||
149 | - <if test="gmtCreate != null"> | ||
150 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
151 | - </if> | ||
152 | - <if test="gmtModified != null"> | ||
153 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, | ||
154 | - </if> | ||
155 | - </set> | ||
156 | - where id = #{id,jdbcType=VARCHAR} | 123 | + <!--@mbg.generated--> |
124 | + update bus_queue | ||
125 | + <set> | ||
126 | + <if test="queueName != null"> | ||
127 | + queue_name = #{queueName,jdbcType=VARCHAR}, | ||
128 | + </if> | ||
129 | + <if test="userId != null"> | ||
130 | + user_id = #{userId,jdbcType=VARCHAR}, | ||
131 | + </if> | ||
132 | + <if test="username != null"> | ||
133 | + username = #{username,jdbcType=VARCHAR}, | ||
134 | + </if> | ||
135 | + <if test="virtualHostId != null"> | ||
136 | + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
137 | + </if> | ||
138 | + <if test="durability != null"> | ||
139 | + durability = #{durability,jdbcType=BOOLEAN}, | ||
140 | + </if> | ||
141 | + <if test="autoDelete != null"> | ||
142 | + auto_delete = #{autoDelete,jdbcType=BOOLEAN}, | ||
143 | + </if> | ||
144 | + <if test="arguments != null"> | ||
145 | + arguments = #{arguments,jdbcType=VARCHAR}, | ||
146 | + </if> | ||
147 | + <if test="description != null"> | ||
148 | + description = #{description,jdbcType=VARCHAR}, | ||
149 | + </if> | ||
150 | + <if test="gmtCreate != null"> | ||
151 | + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
152 | + </if> | ||
153 | + <if test="gmtModified != null"> | ||
154 | + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, | ||
155 | + </if> | ||
156 | + </set> | ||
157 | + where id = #{id,jdbcType=VARCHAR} | ||
157 | </update> | 158 | </update> |
158 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> | 159 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"> |
159 | - <!--@mbg.generated--> | ||
160 | - update bus_queue | ||
161 | - set queue_name = #{queueName,jdbcType=VARCHAR}, | ||
162 | - user_id = #{userId,jdbcType=VARCHAR}, | ||
163 | - username = #{username,jdbcType=VARCHAR}, | ||
164 | - virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
165 | - durability = #{durability,jdbcType=BOOLEAN}, | ||
166 | - auto_delete = #{autoDelete,jdbcType=BOOLEAN}, | ||
167 | - arguments = #{arguments,jdbcType=VARCHAR}, | ||
168 | - description = #{description,jdbcType=VARCHAR}, | ||
169 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
170 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | ||
171 | - where id = #{id,jdbcType=VARCHAR} | 160 | + <!--@mbg.generated--> |
161 | + update bus_queue | ||
162 | + set queue_name = #{queueName,jdbcType=VARCHAR}, | ||
163 | + user_id = #{userId,jdbcType=VARCHAR}, | ||
164 | + username = #{username,jdbcType=VARCHAR}, | ||
165 | + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
166 | + durability = #{durability,jdbcType=BOOLEAN}, | ||
167 | + auto_delete = #{autoDelete,jdbcType=BOOLEAN}, | ||
168 | + arguments = #{arguments,jdbcType=VARCHAR}, | ||
169 | + description = #{description,jdbcType=VARCHAR}, | ||
170 | + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
171 | + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | ||
172 | + where id = #{id,jdbcType=VARCHAR} | ||
172 | </update> | 173 | </update> |
173 | 174 | ||
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 !=''"> | ||
223 | - and user_id = #{userId,jdbcType=VARCHAR} | 240 | + <if test="userId != null and userId != ''"> |
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,19 +60,28 @@ | @@ -60,19 +60,28 @@ | ||
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> |
77 | <!-- 获取服务器列表,分页 --> | 86 | <!-- 获取服务器列表,分页 --> |
78 | <select id="selectBusServerList" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusServer" | 87 | <select id="selectBusServerList" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusServer" |
@@ -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,17 +130,18 @@ | @@ -121,17 +130,18 @@ | ||
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"> |
128 | <!--@mbg.generated--> | 138 | <!--@mbg.generated--> |
129 | insert into bus_server (id, `server_name`, server_ip, | 139 | insert into bus_server (id, `server_name`, server_ip, |
130 | - server_port, description, gmt_create, | ||
131 | - gmt_modified) | 140 | + server_port, description, gmt_create, |
141 | + gmt_modified) | ||
132 | values (#{id,jdbcType=VARCHAR}, #{serverName,jdbcType=VARCHAR}, #{serverIp,jdbcType=VARCHAR}, | 142 | values (#{id,jdbcType=VARCHAR}, #{serverName,jdbcType=VARCHAR}, #{serverIp,jdbcType=VARCHAR}, |
133 | - #{serverPort,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, | ||
134 | - #{gmtModified,jdbcType=TIMESTAMP}) | 143 | + #{serverPort,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, |
144 | + #{gmtModified,jdbcType=TIMESTAMP}) | ||
135 | </insert> | 145 | </insert> |
136 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusServer"> | 146 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusServer"> |
137 | <!--@mbg.generated--> | 147 | <!--@mbg.generated--> |
@@ -212,13 +222,11 @@ | @@ -212,13 +222,11 @@ | ||
212 | <!--@mbg.generated--> | 222 | <!--@mbg.generated--> |
213 | update bus_server | 223 | update bus_server |
214 | set `server_name` = #{serverName,jdbcType=VARCHAR}, | 224 | set `server_name` = #{serverName,jdbcType=VARCHAR}, |
215 | - server_ip = #{serverIp,jdbcType=VARCHAR}, | ||
216 | - server_port = #{serverPort,jdbcType=VARCHAR}, | ||
217 | - description = #{description,jdbcType=VARCHAR}, | ||
218 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
219 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | 225 | + server_ip = #{serverIp,jdbcType=VARCHAR}, |
226 | + server_port = #{serverPort,jdbcType=VARCHAR}, | ||
227 | + description = #{description,jdbcType=VARCHAR}, | ||
228 | + gmt_create = #{gmtCreate,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> |
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | </sql> | 18 | </sql> |
19 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | 19 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
20 | <!--@mbg.generated--> | 20 | <!--@mbg.generated--> |
21 | - select | 21 | + select |
22 | <include refid="Base_Column_List" /> | 22 | <include refid="Base_Column_List" /> |
23 | from exchange_queue_routing | 23 | from exchange_queue_routing |
24 | where id = #{id,jdbcType=VARCHAR} | 24 | where id = #{id,jdbcType=VARCHAR} |
@@ -30,11 +30,11 @@ | @@ -30,11 +30,11 @@ | ||
30 | </delete> | 30 | </delete> |
31 | <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.ExchangeQueueRouting"> | 31 | <insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.ExchangeQueueRouting"> |
32 | <!--@mbg.generated--> | 32 | <!--@mbg.generated--> |
33 | - insert into exchange_queue_routing (id, exchange_id, queue_id, | ||
34 | - routing_key_id, routing_key_name, gmt_create, | 33 | + insert into exchange_queue_routing (id, exchange_id, queue_id, |
34 | + routing_key_id, routing_key_name, gmt_create, | ||
35 | gmt_modified) | 35 | gmt_modified) |
36 | - values (#{id,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR}, #{queueId,jdbcType=VARCHAR}, | ||
37 | - #{routingKeyId,jdbcType=VARCHAR}, #{routingKeyName,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, | 36 | + values (#{id,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR}, #{queueId,jdbcType=VARCHAR}, |
37 | + #{routingKeyId,jdbcType=VARCHAR}, #{routingKeyName,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, | ||
38 | #{gmtModified,jdbcType=TIMESTAMP}) | 38 | #{gmtModified,jdbcType=TIMESTAMP}) |
39 | </insert> | 39 | </insert> |
40 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.ExchangeQueueRouting"> | 40 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.ExchangeQueueRouting"> |
1 | <?xml version="1.0" encoding="UTF-8"?> | 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"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.MessageNoteMapper"> | 3 | <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.MessageNoteMapper"> |
4 | - <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> | ||
5 | - <!--@mbg.generated--> | ||
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" /> | ||
26 | - </resultMap> | 4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> |
5 | + <!--@mbg.generated--> | ||
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"/> | ||
26 | + </resultMap> | ||
27 | <sql id="Base_Column_List"> | 27 | <sql id="Base_Column_List"> |
28 | - <!--@mbg.generated--> | ||
29 | - id, user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name, | 28 | + <!--@mbg.generated--> |
29 | + id, user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name, | ||
30 | exchange_id, exchange_name, queue_id, queue_name, routing_key_id, routing_key_name, | 30 | exchange_id, exchange_name, queue_id, queue_name, routing_key_id, routing_key_name, |
31 | send_time, receive_time, send_content, description, gmt_create, gmt_modified | 31 | send_time, receive_time, send_content, description, gmt_create, gmt_modified |
32 | </sql> | 32 | </sql> |
33 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | 33 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
34 | - <!--@mbg.generated--> | ||
35 | - select | ||
36 | - <include refid="Base_Column_List" /> | ||
37 | - from message_note | ||
38 | - where id = #{id,jdbcType=VARCHAR} | 34 | + <!--@mbg.generated--> |
35 | + select | ||
36 | + <include refid="Base_Column_List"/> | ||
37 | + from message_note | ||
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--> | ||
42 | - delete from message_note | ||
43 | - where id = #{id,jdbcType=VARCHAR} | 41 | + <!--@mbg.generated--> |
42 | + delete | ||
43 | + from message_note | ||
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"> |
46 | - <!--@mbg.generated--> | ||
47 | - insert into message_note (id, user_id, username, | ||
48 | - server_id, `server_name`, virtual_host_id, | ||
49 | - virtual_host_name, exchange_id, exchange_name, | ||
50 | - queue_id, queue_name, routing_key_id, | ||
51 | - routing_key_name, send_time, receive_time, | ||
52 | - send_content, description, gmt_create, | ||
53 | - gmt_modified) | ||
54 | - values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, | ||
55 | - #{serverId,jdbcType=VARCHAR}, #{serverName,jdbcType=VARCHAR}, #{virtualHostId,jdbcType=VARCHAR}, | ||
56 | - #{virtualHostName,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR}, #{exchangeName,jdbcType=VARCHAR}, | ||
57 | - #{queueId,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR}, #{routingKeyId,jdbcType=VARCHAR}, | ||
58 | - #{routingKeyName,jdbcType=VARCHAR}, #{sendTime,jdbcType=TIMESTAMP}, #{receiveTime,jdbcType=TIMESTAMP}, | ||
59 | - #{sendContent,jdbcType=BLOB}, #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, | ||
60 | - #{gmtModified,jdbcType=TIMESTAMP}) | 47 | + <!--@mbg.generated--> |
48 | + insert into message_note (id, user_id, username, | ||
49 | + server_id, `server_name`, virtual_host_id, | ||
50 | + virtual_host_name, exchange_id, exchange_name, | ||
51 | + queue_id, queue_name, routing_key_id, | ||
52 | + routing_key_name, send_time, receive_time, | ||
53 | + send_content, description, gmt_create, | ||
54 | + gmt_modified) | ||
55 | + values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, | ||
56 | + #{serverId,jdbcType=VARCHAR}, #{serverName,jdbcType=VARCHAR}, #{virtualHostId,jdbcType=VARCHAR}, | ||
57 | + #{virtualHostName,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR}, #{exchangeName,jdbcType=VARCHAR}, | ||
58 | + #{queueId,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR}, #{routingKeyId,jdbcType=VARCHAR}, | ||
59 | + #{routingKeyName,jdbcType=VARCHAR}, #{sendTime,jdbcType=TIMESTAMP}, #{receiveTime,jdbcType=TIMESTAMP}, | ||
60 | + #{sendContent,jdbcType=BLOB}, #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, | ||
61 | + #{gmtModified,jdbcType=TIMESTAMP}) | ||
61 | </insert> | 62 | </insert> |
62 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> | 63 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> |
63 | - <!--@mbg.generated--> | ||
64 | - insert into message_note | ||
65 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
66 | - <if test="id != null"> | ||
67 | - id, | ||
68 | - </if> | 64 | + <!--@mbg.generated--> |
65 | + insert into message_note | ||
66 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
67 | + <if test="id != null"> | ||
68 | + id, | ||
69 | + </if> | ||
69 | <if test="userId != null"> | 70 | <if test="userId != null"> |
70 | - user_id, | 71 | + user_id, |
71 | </if> | 72 | </if> |
72 | <if test="username != null"> | 73 | <if test="username != null"> |
73 | - username, | 74 | + username, |
74 | </if> | 75 | </if> |
75 | <if test="serverId != null"> | 76 | <if test="serverId != null"> |
76 | - server_id, | 77 | + server_id, |
77 | </if> | 78 | </if> |
78 | <if test="serverName != null"> | 79 | <if test="serverName != null"> |
79 | - `server_name`, | 80 | + `server_name`, |
80 | </if> | 81 | </if> |
81 | <if test="virtualHostId != null"> | 82 | <if test="virtualHostId != null"> |
82 | - virtual_host_id, | 83 | + virtual_host_id, |
83 | </if> | 84 | </if> |
84 | <if test="virtualHostName != null"> | 85 | <if test="virtualHostName != null"> |
85 | - virtual_host_name, | 86 | + virtual_host_name, |
86 | </if> | 87 | </if> |
87 | <if test="exchangeId != null"> | 88 | <if test="exchangeId != null"> |
88 | - exchange_id, | 89 | + exchange_id, |
89 | </if> | 90 | </if> |
90 | <if test="exchangeName != null"> | 91 | <if test="exchangeName != null"> |
91 | - exchange_name, | 92 | + exchange_name, |
92 | </if> | 93 | </if> |
93 | <if test="queueId != null"> | 94 | <if test="queueId != null"> |
94 | - queue_id, | 95 | + queue_id, |
95 | </if> | 96 | </if> |
96 | <if test="queueName != null"> | 97 | <if test="queueName != null"> |
97 | - queue_name, | 98 | + queue_name, |
98 | </if> | 99 | </if> |
99 | <if test="routingKeyId != null"> | 100 | <if test="routingKeyId != null"> |
100 | - routing_key_id, | 101 | + routing_key_id, |
101 | </if> | 102 | </if> |
102 | <if test="routingKeyName != null"> | 103 | <if test="routingKeyName != null"> |
103 | - routing_key_name, | 104 | + routing_key_name, |
104 | </if> | 105 | </if> |
105 | <if test="sendTime != null"> | 106 | <if test="sendTime != null"> |
106 | - send_time, | 107 | + send_time, |
107 | </if> | 108 | </if> |
108 | <if test="receiveTime != null"> | 109 | <if test="receiveTime != null"> |
109 | - receive_time, | 110 | + receive_time, |
110 | </if> | 111 | </if> |
111 | <if test="sendContent != null"> | 112 | <if test="sendContent != null"> |
112 | - send_content, | 113 | + send_content, |
113 | </if> | 114 | </if> |
114 | <if test="description != null"> | 115 | <if test="description != null"> |
115 | - description, | 116 | + description, |
116 | </if> | 117 | </if> |
117 | <if test="gmtCreate != null"> | 118 | <if test="gmtCreate != null"> |
118 | - gmt_create, | 119 | + gmt_create, |
119 | </if> | 120 | </if> |
120 | <if test="gmtModified != null"> | 121 | <if test="gmtModified != null"> |
121 | - gmt_modified, | 122 | + gmt_modified, |
122 | </if> | 123 | </if> |
123 | - </trim> | 124 | + </trim> |
124 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 125 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
125 | - <if test="id != null"> | ||
126 | - #{id,jdbcType=VARCHAR}, | ||
127 | - </if> | 126 | + <if test="id != null"> |
127 | + #{id,jdbcType=VARCHAR}, | ||
128 | + </if> | ||
128 | <if test="userId != null"> | 129 | <if test="userId != null"> |
129 | - #{userId,jdbcType=VARCHAR}, | 130 | + #{userId,jdbcType=VARCHAR}, |
130 | </if> | 131 | </if> |
131 | <if test="username != null"> | 132 | <if test="username != null"> |
132 | - #{username,jdbcType=VARCHAR}, | 133 | + #{username,jdbcType=VARCHAR}, |
133 | </if> | 134 | </if> |
134 | <if test="serverId != null"> | 135 | <if test="serverId != null"> |
135 | - #{serverId,jdbcType=VARCHAR}, | 136 | + #{serverId,jdbcType=VARCHAR}, |
136 | </if> | 137 | </if> |
137 | <if test="serverName != null"> | 138 | <if test="serverName != null"> |
138 | - #{serverName,jdbcType=VARCHAR}, | 139 | + #{serverName,jdbcType=VARCHAR}, |
139 | </if> | 140 | </if> |
140 | <if test="virtualHostId != null"> | 141 | <if test="virtualHostId != null"> |
141 | - #{virtualHostId,jdbcType=VARCHAR}, | 142 | + #{virtualHostId,jdbcType=VARCHAR}, |
142 | </if> | 143 | </if> |
143 | <if test="virtualHostName != null"> | 144 | <if test="virtualHostName != null"> |
144 | - #{virtualHostName,jdbcType=VARCHAR}, | 145 | + #{virtualHostName,jdbcType=VARCHAR}, |
145 | </if> | 146 | </if> |
146 | <if test="exchangeId != null"> | 147 | <if test="exchangeId != null"> |
147 | - #{exchangeId,jdbcType=VARCHAR}, | 148 | + #{exchangeId,jdbcType=VARCHAR}, |
148 | </if> | 149 | </if> |
149 | <if test="exchangeName != null"> | 150 | <if test="exchangeName != null"> |
150 | - #{exchangeName,jdbcType=VARCHAR}, | 151 | + #{exchangeName,jdbcType=VARCHAR}, |
151 | </if> | 152 | </if> |
152 | <if test="queueId != null"> | 153 | <if test="queueId != null"> |
153 | - #{queueId,jdbcType=VARCHAR}, | 154 | + #{queueId,jdbcType=VARCHAR}, |
154 | </if> | 155 | </if> |
155 | <if test="queueName != null"> | 156 | <if test="queueName != null"> |
156 | - #{queueName,jdbcType=VARCHAR}, | 157 | + #{queueName,jdbcType=VARCHAR}, |
157 | </if> | 158 | </if> |
158 | <if test="routingKeyId != null"> | 159 | <if test="routingKeyId != null"> |
159 | - #{routingKeyId,jdbcType=VARCHAR}, | 160 | + #{routingKeyId,jdbcType=VARCHAR}, |
160 | </if> | 161 | </if> |
161 | <if test="routingKeyName != null"> | 162 | <if test="routingKeyName != null"> |
162 | - #{routingKeyName,jdbcType=VARCHAR}, | 163 | + #{routingKeyName,jdbcType=VARCHAR}, |
163 | </if> | 164 | </if> |
164 | <if test="sendTime != null"> | 165 | <if test="sendTime != null"> |
165 | - #{sendTime,jdbcType=TIMESTAMP}, | 166 | + #{sendTime,jdbcType=TIMESTAMP}, |
166 | </if> | 167 | </if> |
167 | <if test="receiveTime != null"> | 168 | <if test="receiveTime != null"> |
168 | - #{receiveTime,jdbcType=TIMESTAMP}, | 169 | + #{receiveTime,jdbcType=TIMESTAMP}, |
169 | </if> | 170 | </if> |
170 | <if test="sendContent != null"> | 171 | <if test="sendContent != null"> |
171 | - #{sendContent,jdbcType=BLOB}, | 172 | + #{sendContent,jdbcType=BLOB}, |
172 | </if> | 173 | </if> |
173 | <if test="description != null"> | 174 | <if test="description != null"> |
174 | - #{description,jdbcType=VARCHAR}, | 175 | + #{description,jdbcType=VARCHAR}, |
175 | </if> | 176 | </if> |
176 | <if test="gmtCreate != null"> | 177 | <if test="gmtCreate != null"> |
177 | - #{gmtCreate,jdbcType=TIMESTAMP}, | 178 | + #{gmtCreate,jdbcType=TIMESTAMP}, |
178 | </if> | 179 | </if> |
179 | <if test="gmtModified != null"> | 180 | <if test="gmtModified != null"> |
180 | - #{gmtModified,jdbcType=TIMESTAMP}, | 181 | + #{gmtModified,jdbcType=TIMESTAMP}, |
181 | </if> | 182 | </if> |
182 | </trim> | 183 | </trim> |
183 | </insert> | 184 | </insert> |
184 | <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> | 185 | <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> |
185 | - <!--@mbg.generated--> | ||
186 | - update message_note | ||
187 | - <set> | ||
188 | - <if test="userId != null"> | ||
189 | - user_id = #{userId,jdbcType=VARCHAR}, | ||
190 | - </if> | 186 | + <!--@mbg.generated--> |
187 | + update message_note | ||
188 | + <set> | ||
189 | + <if test="userId != null"> | ||
190 | + user_id = #{userId,jdbcType=VARCHAR}, | ||
191 | + </if> | ||
191 | <if test="username != null"> | 192 | <if test="username != null"> |
192 | - username = #{username,jdbcType=VARCHAR}, | 193 | + username = #{username,jdbcType=VARCHAR}, |
193 | </if> | 194 | </if> |
194 | <if test="serverId != null"> | 195 | <if test="serverId != null"> |
195 | - server_id = #{serverId,jdbcType=VARCHAR}, | 196 | + server_id = #{serverId,jdbcType=VARCHAR}, |
196 | </if> | 197 | </if> |
197 | <if test="serverName != null"> | 198 | <if test="serverName != null"> |
198 | - `server_name` = #{serverName,jdbcType=VARCHAR}, | 199 | + `server_name` = #{serverName,jdbcType=VARCHAR}, |
199 | </if> | 200 | </if> |
200 | <if test="virtualHostId != null"> | 201 | <if test="virtualHostId != null"> |
201 | - virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | 202 | + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, |
202 | </if> | 203 | </if> |
203 | <if test="virtualHostName != null"> | 204 | <if test="virtualHostName != null"> |
204 | - virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, | 205 | + virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, |
205 | </if> | 206 | </if> |
206 | <if test="exchangeId != null"> | 207 | <if test="exchangeId != null"> |
207 | - exchange_id = #{exchangeId,jdbcType=VARCHAR}, | 208 | + exchange_id = #{exchangeId,jdbcType=VARCHAR}, |
208 | </if> | 209 | </if> |
209 | <if test="exchangeName != null"> | 210 | <if test="exchangeName != null"> |
210 | - exchange_name = #{exchangeName,jdbcType=VARCHAR}, | 211 | + exchange_name = #{exchangeName,jdbcType=VARCHAR}, |
211 | </if> | 212 | </if> |
212 | <if test="queueId != null"> | 213 | <if test="queueId != null"> |
213 | - queue_id = #{queueId,jdbcType=VARCHAR}, | 214 | + queue_id = #{queueId,jdbcType=VARCHAR}, |
214 | </if> | 215 | </if> |
215 | <if test="queueName != null"> | 216 | <if test="queueName != null"> |
216 | - queue_name = #{queueName,jdbcType=VARCHAR}, | 217 | + queue_name = #{queueName,jdbcType=VARCHAR}, |
217 | </if> | 218 | </if> |
218 | <if test="routingKeyId != null"> | 219 | <if test="routingKeyId != null"> |
219 | - routing_key_id = #{routingKeyId,jdbcType=VARCHAR}, | 220 | + routing_key_id = #{routingKeyId,jdbcType=VARCHAR}, |
220 | </if> | 221 | </if> |
221 | <if test="routingKeyName != null"> | 222 | <if test="routingKeyName != null"> |
222 | - routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, | 223 | + routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, |
223 | </if> | 224 | </if> |
224 | <if test="sendTime != null"> | 225 | <if test="sendTime != null"> |
225 | - send_time = #{sendTime,jdbcType=TIMESTAMP}, | 226 | + send_time = #{sendTime,jdbcType=TIMESTAMP}, |
226 | </if> | 227 | </if> |
227 | <if test="receiveTime != null"> | 228 | <if test="receiveTime != null"> |
228 | - receive_time = #{receiveTime,jdbcType=TIMESTAMP}, | 229 | + receive_time = #{receiveTime,jdbcType=TIMESTAMP}, |
229 | </if> | 230 | </if> |
230 | <if test="sendContent != null"> | 231 | <if test="sendContent != null"> |
231 | - send_content = #{sendContent,jdbcType=BLOB}, | 232 | + send_content = #{sendContent,jdbcType=BLOB}, |
232 | </if> | 233 | </if> |
233 | <if test="description != null"> | 234 | <if test="description != null"> |
234 | - description = #{description,jdbcType=VARCHAR}, | 235 | + description = #{description,jdbcType=VARCHAR}, |
235 | </if> | 236 | </if> |
236 | <if test="gmtCreate != null"> | 237 | <if test="gmtCreate != null"> |
237 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | 238 | + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, |
238 | </if> | 239 | </if> |
239 | <if test="gmtModified != null"> | 240 | <if test="gmtModified != null"> |
240 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, | 241 | + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, |
241 | </if> | 242 | </if> |
242 | - </set> | ||
243 | - where id = #{id,jdbcType=VARCHAR} | 243 | + </set> |
244 | + where id = #{id,jdbcType=VARCHAR} | ||
244 | </update> | 245 | </update> |
245 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> | 246 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote"> |
246 | - <!--@mbg.generated--> | ||
247 | - update message_note | ||
248 | - set user_id = #{userId,jdbcType=VARCHAR}, | ||
249 | - username = #{username,jdbcType=VARCHAR}, | ||
250 | - server_id = #{serverId,jdbcType=VARCHAR}, | ||
251 | - `server_name` = #{serverName,jdbcType=VARCHAR}, | ||
252 | - virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
253 | - virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, | ||
254 | - exchange_id = #{exchangeId,jdbcType=VARCHAR}, | ||
255 | - exchange_name = #{exchangeName,jdbcType=VARCHAR}, | ||
256 | - queue_id = #{queueId,jdbcType=VARCHAR}, | ||
257 | - queue_name = #{queueName,jdbcType=VARCHAR}, | ||
258 | - routing_key_id = #{routingKeyId,jdbcType=VARCHAR}, | ||
259 | - routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, | ||
260 | - send_time = #{sendTime,jdbcType=TIMESTAMP}, | ||
261 | - receive_time = #{receiveTime,jdbcType=TIMESTAMP}, | ||
262 | - send_content = #{sendContent,jdbcType=BLOB}, | ||
263 | - description = #{description,jdbcType=VARCHAR}, | ||
264 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
265 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | ||
266 | - where id = #{id,jdbcType=VARCHAR} | 247 | + <!--@mbg.generated--> |
248 | + update message_note | ||
249 | + set user_id = #{userId,jdbcType=VARCHAR}, | ||
250 | + username = #{username,jdbcType=VARCHAR}, | ||
251 | + server_id = #{serverId,jdbcType=VARCHAR}, | ||
252 | + `server_name` = #{serverName,jdbcType=VARCHAR}, | ||
253 | + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
254 | + virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, | ||
255 | + exchange_id = #{exchangeId,jdbcType=VARCHAR}, | ||
256 | + exchange_name = #{exchangeName,jdbcType=VARCHAR}, | ||
257 | + queue_id = #{queueId,jdbcType=VARCHAR}, | ||
258 | + queue_name = #{queueName,jdbcType=VARCHAR}, | ||
259 | + routing_key_id = #{routingKeyId,jdbcType=VARCHAR}, | ||
260 | + routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, | ||
261 | + send_time = #{sendTime,jdbcType=TIMESTAMP}, | ||
262 | + receive_time = #{receiveTime,jdbcType=TIMESTAMP}, | ||
263 | + send_content = #{sendContent,jdbcType=BLOB}, | ||
264 | + description = #{description,jdbcType=VARCHAR}, | ||
265 | + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
266 | + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | ||
267 | + where id = #{id,jdbcType=VARCHAR} | ||
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) >= #{deleteTime,jdbcType=INTEGER} | 313 | + delete |
314 | + from message_note | ||
315 | + where to_days(now()) - to_days(gmt_create) >= #{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--> |
@@ -163,11 +168,10 @@ | @@ -163,11 +168,10 @@ | ||
163 | <!--@mbg.generated--> | 168 | <!--@mbg.generated--> |
164 | update routing_key | 169 | update routing_key |
165 | set routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, | 170 | set routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, |
166 | - exchange_id = #{exchangeId,jdbcType=VARCHAR}, | ||
167 | - description = #{description,jdbcType=VARCHAR}, | ||
168 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
169 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | 171 | + exchange_id = #{exchangeId,jdbcType=VARCHAR}, |
172 | + description = #{description,jdbcType=VARCHAR}, | ||
173 | + gmt_create = #{gmtCreate,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> |
1 | <?xml version="1.0" encoding="UTF-8"?> | 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"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.SchedulingDeleteMapper"> | 3 | <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.SchedulingDeleteMapper"> |
4 | - <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete"> | ||
5 | - <!--@mbg.generated--> | ||
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" /> | ||
11 | - </resultMap> | 4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete"> |
5 | + <!--@mbg.generated--> | ||
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"/> | ||
11 | + </resultMap> | ||
12 | <sql id="Base_Column_List"> | 12 | <sql id="Base_Column_List"> |
13 | - <!--@mbg.generated--> | ||
14 | - id, delete_time, delete_type, description | 13 | + <!--@mbg.generated--> |
14 | + id, delete_time, delete_type, description | ||
15 | </sql> | 15 | </sql> |
16 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | 16 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
17 | - <!--@mbg.generated--> | ||
18 | - select | ||
19 | - <include refid="Base_Column_List" /> | ||
20 | - from scheduling_delete | ||
21 | - where id = #{id,jdbcType=VARCHAR} | 17 | + <!--@mbg.generated--> |
18 | + select | ||
19 | + <include refid="Base_Column_List"/> | ||
20 | + from scheduling_delete | ||
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--> | ||
25 | - delete from scheduling_delete | ||
26 | - where id = #{id,jdbcType=VARCHAR} | 24 | + <!--@mbg.generated--> |
25 | + delete | ||
26 | + from scheduling_delete | ||
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"> |
29 | - <!--@mbg.generated--> | ||
30 | - insert into scheduling_delete (id, delete_time, delete_type, | ||
31 | - description) | ||
32 | - values (#{id,jdbcType=VARCHAR}, #{deleteTime,jdbcType=INTEGER}, #{deleteType,jdbcType=VARCHAR}, | ||
33 | - #{description,jdbcType=VARCHAR}) | 30 | + <!--@mbg.generated--> |
31 | + insert into scheduling_delete (id, delete_time, delete_type, | ||
32 | + description) | ||
33 | + values (#{id,jdbcType=VARCHAR}, #{deleteTime,jdbcType=INTEGER}, #{deleteType,jdbcType=VARCHAR}, | ||
34 | + #{description,jdbcType=VARCHAR}) | ||
34 | </insert> | 35 | </insert> |
35 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete"> | 36 | <insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete"> |
36 | - <!--@mbg.generated--> | ||
37 | - insert into scheduling_delete | ||
38 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
39 | - <if test="id != null"> | ||
40 | - id, | ||
41 | - </if> | 37 | + <!--@mbg.generated--> |
38 | + insert into scheduling_delete | ||
39 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
40 | + <if test="id != null"> | ||
41 | + id, | ||
42 | + </if> | ||
42 | <if test="deleteTime != null"> | 43 | <if test="deleteTime != null"> |
43 | - delete_time, | 44 | + delete_time, |
44 | </if> | 45 | </if> |
45 | <if test="deleteType != null"> | 46 | <if test="deleteType != null"> |
46 | - delete_type, | 47 | + delete_type, |
47 | </if> | 48 | </if> |
48 | <if test="description != null"> | 49 | <if test="description != null"> |
49 | - description, | 50 | + description, |
50 | </if> | 51 | </if> |
51 | - </trim> | 52 | + </trim> |
52 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 53 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
53 | - <if test="id != null"> | ||
54 | - #{id,jdbcType=VARCHAR}, | ||
55 | - </if> | 54 | + <if test="id != null"> |
55 | + #{id,jdbcType=VARCHAR}, | ||
56 | + </if> | ||
56 | <if test="deleteTime != null"> | 57 | <if test="deleteTime != null"> |
57 | - #{deleteTime,jdbcType=INTEGER}, | 58 | + #{deleteTime,jdbcType=INTEGER}, |
58 | </if> | 59 | </if> |
59 | <if test="deleteType != null"> | 60 | <if test="deleteType != null"> |
60 | - #{deleteType,jdbcType=VARCHAR}, | 61 | + #{deleteType,jdbcType=VARCHAR}, |
61 | </if> | 62 | </if> |
62 | <if test="description != null"> | 63 | <if test="description != null"> |
63 | - #{description,jdbcType=VARCHAR}, | 64 | + #{description,jdbcType=VARCHAR}, |
64 | </if> | 65 | </if> |
65 | </trim> | 66 | </trim> |
66 | </insert> | 67 | </insert> |
67 | <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete"> | 68 | <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete"> |
68 | - <!--@mbg.generated--> | ||
69 | - update scheduling_delete | ||
70 | - <set> | ||
71 | - <if test="deleteTime != null"> | ||
72 | - delete_time = #{deleteTime,jdbcType=INTEGER}, | ||
73 | - </if> | 69 | + <!--@mbg.generated--> |
70 | + update scheduling_delete | ||
71 | + <set> | ||
72 | + <if test="deleteTime != null"> | ||
73 | + delete_time = #{deleteTime,jdbcType=INTEGER}, | ||
74 | + </if> | ||
74 | <if test="deleteType != null"> | 75 | <if test="deleteType != null"> |
75 | - delete_type = #{deleteType,jdbcType=VARCHAR}, | 76 | + delete_type = #{deleteType,jdbcType=VARCHAR}, |
76 | </if> | 77 | </if> |
77 | <if test="description != null"> | 78 | <if test="description != null"> |
78 | - description = #{description,jdbcType=VARCHAR}, | 79 | + description = #{description,jdbcType=VARCHAR}, |
79 | </if> | 80 | </if> |
80 | - </set> | ||
81 | - where id = #{id,jdbcType=VARCHAR} | 81 | + </set> |
82 | + where id = #{id,jdbcType=VARCHAR} | ||
82 | </update> | 83 | </update> |
83 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete"> | 84 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete"> |
84 | - <!--@mbg.generated--> | ||
85 | - update scheduling_delete | ||
86 | - set delete_time = #{deleteTime,jdbcType=INTEGER}, | ||
87 | - delete_type = #{deleteType,jdbcType=VARCHAR}, | ||
88 | - description = #{description,jdbcType=VARCHAR} | ||
89 | - where id = #{id,jdbcType=VARCHAR} | 85 | + <!--@mbg.generated--> |
86 | + update scheduling_delete | ||
87 | + set delete_time = #{deleteTime,jdbcType=INTEGER}, | ||
88 | + delete_type = #{deleteType,jdbcType=VARCHAR}, | ||
89 | + description = #{description,jdbcType=VARCHAR} | ||
90 | + where id = #{id,jdbcType=VARCHAR} | ||
90 | </update> | 91 | </update> |
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 | - <include refid="Base_Column_List" /> | ||
95 | - from scheduling_delete | ||
96 | - <where> | ||
97 | - <!-- 删除类型 --> | ||
98 | - <if test="deleteType != null and deleteType !=''"> | ||
99 | - delete_type = #{deleteType,jdbcType=VARCHAR} | ||
100 | - </if> | ||
101 | - </where> | ||
102 | - limit 1 | 94 | + select |
95 | + <include refid="Base_Column_List"/> | ||
96 | + from scheduling_delete | ||
97 | + <where> | ||
98 | + <!-- 删除类型 --> | ||
99 | + <if test="deleteType != null and deleteType != ''"> | ||
100 | + delete_type = #{deleteType,jdbcType=VARCHAR} | ||
101 | + </if> | ||
102 | + </where> | ||
103 | + limit 1 | ||
103 | </select> | 104 | </select> |
104 | </mapper> | 105 | </mapper> |
1 | <?xml version="1.0" encoding="UTF-8"?> | 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"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.UserInfoMapper"> | 3 | <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.UserInfoMapper"> |
4 | - <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserInfo"> | ||
5 | - <!--@mbg.generated--> | ||
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" /> | ||
13 | - </resultMap> | 4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserInfo"> |
5 | + <!--@mbg.generated--> | ||
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"/> | ||
13 | + </resultMap> | ||
14 | <sql id="Base_Column_List"> | 14 | <sql id="Base_Column_List"> |
15 | - <!--@mbg.generated--> | ||
16 | - id, username, `password`, description, gmt_create, gmt_modified | 15 | + <!--@mbg.generated--> |
16 | + id, username, `password`, description, gmt_create, gmt_modified | ||
17 | </sql> | 17 | </sql> |
18 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | 18 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
19 | - <!--@mbg.generated--> | ||
20 | - select | ||
21 | - <include refid="Base_Column_List" /> | ||
22 | - from user_info | ||
23 | - where id = #{id,jdbcType=VARCHAR} | 19 | + <!--@mbg.generated--> |
20 | + select | ||
21 | + <include refid="Base_Column_List"/> | ||
22 | + from user_info | ||
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--> | ||
28 | - select | ||
29 | - id, username, description, gmt_create, gmt_modified | ||
30 | - from user_info | 27 | + <!--@mbg.generated--> |
28 | + select id, | ||
29 | + username, | ||
30 | + description, | ||
31 | + gmt_create, | ||
32 | + gmt_modified | ||
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--> | ||
35 | - delete from user_info | ||
36 | - where id = #{id,jdbcType=VARCHAR} | 37 | + <!--@mbg.generated--> |
38 | + delete | ||
39 | + from user_info | ||
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--> | ||
40 | - insert into user_info (id, username, `password`, | ||
41 | - description, gmt_create, gmt_modified | ||
42 | - ) | ||
43 | - values (#{id,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, | ||
44 | - #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP} | ||
45 | - ) | 43 | + <!--@mbg.generated--> |
44 | + insert into user_info (id, username, `password`, | ||
45 | + description, gmt_create, gmt_modified) | ||
46 | + values (#{id,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, | ||
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--> | ||
49 | - insert into user_info | ||
50 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
51 | - <if test="id != null"> | ||
52 | - id, | ||
53 | - </if> | 50 | + <!--@mbg.generated--> |
51 | + insert into user_info | ||
52 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
53 | + <if test="id != null"> | ||
54 | + id, | ||
55 | + </if> | ||
54 | <if test="username != null"> | 56 | <if test="username != null"> |
55 | - username, | 57 | + username, |
56 | </if> | 58 | </if> |
57 | <if test="password != null"> | 59 | <if test="password != null"> |
58 | - `password`, | 60 | + `password`, |
59 | </if> | 61 | </if> |
60 | <if test="description != null"> | 62 | <if test="description != null"> |
61 | - description, | 63 | + description, |
62 | </if> | 64 | </if> |
63 | <if test="gmtCreate != null"> | 65 | <if test="gmtCreate != null"> |
64 | - gmt_create, | 66 | + gmt_create, |
65 | </if> | 67 | </if> |
66 | <if test="gmtModified != null"> | 68 | <if test="gmtModified != null"> |
67 | - gmt_modified, | 69 | + gmt_modified, |
68 | </if> | 70 | </if> |
69 | - </trim> | 71 | + </trim> |
70 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 72 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
71 | - <if test="id != null"> | ||
72 | - #{id,jdbcType=VARCHAR}, | ||
73 | - </if> | 73 | + <if test="id != null"> |
74 | + #{id,jdbcType=VARCHAR}, | ||
75 | + </if> | ||
74 | <if test="username != null"> | 76 | <if test="username != null"> |
75 | - #{username,jdbcType=VARCHAR}, | 77 | + #{username,jdbcType=VARCHAR}, |
76 | </if> | 78 | </if> |
77 | <if test="password != null"> | 79 | <if test="password != null"> |
78 | - #{password,jdbcType=VARCHAR}, | 80 | + #{password,jdbcType=VARCHAR}, |
79 | </if> | 81 | </if> |
80 | <if test="description != null"> | 82 | <if test="description != null"> |
81 | - #{description,jdbcType=VARCHAR}, | 83 | + #{description,jdbcType=VARCHAR}, |
82 | </if> | 84 | </if> |
83 | <if test="gmtCreate != null"> | 85 | <if test="gmtCreate != null"> |
84 | - #{gmtCreate,jdbcType=TIMESTAMP}, | 86 | + #{gmtCreate,jdbcType=TIMESTAMP}, |
85 | </if> | 87 | </if> |
86 | <if test="gmtModified != null"> | 88 | <if test="gmtModified != null"> |
87 | - #{gmtModified,jdbcType=TIMESTAMP}, | 89 | + #{gmtModified,jdbcType=TIMESTAMP}, |
88 | </if> | 90 | </if> |
89 | </trim> | 91 | </trim> |
90 | </insert> | 92 | </insert> |
91 | <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserInfo"> | 93 | <update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserInfo"> |
92 | - <!--@mbg.generated--> | ||
93 | - update user_info | ||
94 | - <set> | ||
95 | - <if test="username != null"> | ||
96 | - username = #{username,jdbcType=VARCHAR}, | ||
97 | - </if> | 94 | + <!--@mbg.generated--> |
95 | + update user_info | ||
96 | + <set> | ||
97 | + <if test="username != null"> | ||
98 | + username = #{username,jdbcType=VARCHAR}, | ||
99 | + </if> | ||
98 | <if test="password != null"> | 100 | <if test="password != null"> |
99 | - `password` = #{password,jdbcType=VARCHAR}, | 101 | + `password` = #{password,jdbcType=VARCHAR}, |
100 | </if> | 102 | </if> |
101 | <if test="description != null"> | 103 | <if test="description != null"> |
102 | - description = #{description,jdbcType=VARCHAR}, | 104 | + description = #{description,jdbcType=VARCHAR}, |
103 | </if> | 105 | </if> |
104 | <if test="gmtCreate != null"> | 106 | <if test="gmtCreate != null"> |
105 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | 107 | + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, |
106 | </if> | 108 | </if> |
107 | <if test="gmtModified != null"> | 109 | <if test="gmtModified != null"> |
108 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, | 110 | + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, |
109 | </if> | 111 | </if> |
110 | - </set> | ||
111 | - where id = #{id,jdbcType=VARCHAR} | 112 | + </set> |
113 | + where id = #{id,jdbcType=VARCHAR} | ||
112 | </update> | 114 | </update> |
113 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserInfo"> | 115 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserInfo"> |
114 | - <!--@mbg.generated--> | ||
115 | - update user_info | ||
116 | - set username = #{username,jdbcType=VARCHAR}, | ||
117 | - `password` = #{password,jdbcType=VARCHAR}, | ||
118 | - description = #{description,jdbcType=VARCHAR}, | ||
119 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
120 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | ||
121 | - where id = #{id,jdbcType=VARCHAR} | 116 | + <!--@mbg.generated--> |
117 | + update user_info | ||
118 | + set username = #{username,jdbcType=VARCHAR}, | ||
119 | + `password` = #{password,jdbcType=VARCHAR}, | ||
120 | + description = #{description,jdbcType=VARCHAR}, | ||
121 | + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
122 | + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | ||
123 | + where id = #{id,jdbcType=VARCHAR} | ||
122 | </update> | 124 | </update> |
123 | </mapper> | 125 | </mapper> |
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"> | ||
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" /> | ||
24 | - </resultMap> | 4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding"> |
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"/> | ||
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" /> | ||
35 | - from user_message_binding | ||
36 | - where id = #{id,jdbcType=VARCHAR} | 30 | + <!--@mbg.generated-->select |
31 | + | ||
32 | + <include refid="Base_Column_List"/> | ||
33 | + | ||
34 | + from user_message_binding | ||
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 | ||
41 | - where id = #{id,jdbcType=VARCHAR} | 39 | + <!--@mbg.generated-->delete |
40 | + from user_message_binding | ||
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, | ||
46 | - server_id, `server_name`, virtual_host_id, | ||
47 | - virtual_host_name, exchange_id, exchange_name, | ||
48 | - queue_id, queue_name, routing_key_id, | ||
49 | - routing_key_name, subscriber, description, | ||
50 | - gmt_create, gmt_modified) | ||
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}, | ||
56 | - #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}) | 45 | + <!--@mbg.generated-->insert into user_message_binding (id, user_id, username, |
46 | + server_id, `server_name`, virtual_host_id, | ||
47 | + virtual_host_name, exchange_id, exchange_name, | ||
48 | + queue_id, queue_name, routing_key_id, | ||
49 | + routing_key_name, subscriber, description, | ||
50 | + gmt_create, gmt_modified) | ||
51 | + values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{username,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}, | ||
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 | ||
61 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
62 | - <if test="id != null"> | ||
63 | - id, | ||
64 | - </if> | 64 | + <!--@mbg.generated-->insert into user_message_binding |
65 | + | ||
66 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
67 | + <if test="id != null"> | ||
68 | + id, | ||
69 | + | ||
70 | + </if> | ||
65 | <if test="userId != null"> | 71 | <if test="userId != null"> |
66 | - user_id, | 72 | + |
73 | + user_id, | ||
74 | + | ||
67 | </if> | 75 | </if> |
68 | <if test="username != null"> | 76 | <if test="username != null"> |
69 | - username, | 77 | + |
78 | + username, | ||
79 | + | ||
70 | </if> | 80 | </if> |
71 | <if test="serverId != null"> | 81 | <if test="serverId != null"> |
72 | - server_id, | 82 | + |
83 | + server_id, | ||
84 | + | ||
73 | </if> | 85 | </if> |
74 | <if test="serverName != null"> | 86 | <if test="serverName != null"> |
75 | - `server_name`, | 87 | + |
88 | + `server_name`, | ||
89 | + | ||
76 | </if> | 90 | </if> |
77 | <if test="virtualHostId != null"> | 91 | <if test="virtualHostId != null"> |
78 | - virtual_host_id, | 92 | + |
93 | + virtual_host_id, | ||
94 | + | ||
79 | </if> | 95 | </if> |
80 | <if test="virtualHostName != null"> | 96 | <if test="virtualHostName != null"> |
81 | - virtual_host_name, | 97 | + |
98 | + virtual_host_name, | ||
99 | + | ||
82 | </if> | 100 | </if> |
83 | <if test="exchangeId != null"> | 101 | <if test="exchangeId != null"> |
84 | - exchange_id, | 102 | + |
103 | + exchange_id, | ||
104 | + | ||
85 | </if> | 105 | </if> |
86 | <if test="exchangeName != null"> | 106 | <if test="exchangeName != null"> |
87 | - exchange_name, | 107 | + |
108 | + exchange_name, | ||
109 | + | ||
88 | </if> | 110 | </if> |
89 | <if test="queueId != null"> | 111 | <if test="queueId != null"> |
90 | - queue_id, | 112 | + |
113 | + queue_id, | ||
114 | + | ||
91 | </if> | 115 | </if> |
92 | <if test="queueName != null"> | 116 | <if test="queueName != null"> |
93 | - queue_name, | 117 | + |
118 | + queue_name, | ||
119 | + | ||
94 | </if> | 120 | </if> |
95 | <if test="routingKeyId != null"> | 121 | <if test="routingKeyId != null"> |
96 | - routing_key_id, | 122 | + |
123 | + routing_key_id, | ||
124 | + | ||
97 | </if> | 125 | </if> |
98 | <if test="routingKeyName != null"> | 126 | <if test="routingKeyName != null"> |
99 | - routing_key_name, | 127 | + |
128 | + routing_key_name, | ||
129 | + | ||
100 | </if> | 130 | </if> |
101 | <if test="subscriber != null"> | 131 | <if test="subscriber != null"> |
102 | - subscriber, | 132 | + |
133 | + subscriber, | ||
134 | + | ||
103 | </if> | 135 | </if> |
104 | <if test="description != null"> | 136 | <if test="description != null"> |
105 | - description, | 137 | + |
138 | + description, | ||
139 | + | ||
106 | </if> | 140 | </if> |
107 | <if test="gmtCreate != null"> | 141 | <if test="gmtCreate != null"> |
108 | - gmt_create, | 142 | + |
143 | + gmt_create, | ||
144 | + | ||
109 | </if> | 145 | </if> |
110 | <if test="gmtModified != null"> | 146 | <if test="gmtModified != null"> |
111 | - gmt_modified, | 147 | + |
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"> | ||
116 | - #{id,jdbcType=VARCHAR}, | ||
117 | - </if> | 152 | + <if test="id != null"> |
153 | + #{id,jdbcType=VARCHAR}, | ||
154 | + | ||
155 | + </if> | ||
118 | <if test="userId != null"> | 156 | <if test="userId != null"> |
119 | - #{userId,jdbcType=VARCHAR}, | 157 | + |
158 | + #{userId,jdbcType=VARCHAR}, | ||
159 | + | ||
120 | </if> | 160 | </if> |
121 | <if test="username != null"> | 161 | <if test="username != null"> |
122 | - #{username,jdbcType=VARCHAR}, | 162 | + |
163 | + #{username,jdbcType=VARCHAR}, | ||
164 | + | ||
123 | </if> | 165 | </if> |
124 | <if test="serverId != null"> | 166 | <if test="serverId != null"> |
125 | - #{serverId,jdbcType=VARCHAR}, | 167 | + |
168 | + #{serverId,jdbcType=VARCHAR}, | ||
169 | + | ||
126 | </if> | 170 | </if> |
127 | <if test="serverName != null"> | 171 | <if test="serverName != null"> |
128 | - #{serverName,jdbcType=VARCHAR}, | 172 | + |
173 | + #{serverName,jdbcType=VARCHAR}, | ||
174 | + | ||
129 | </if> | 175 | </if> |
130 | <if test="virtualHostId != null"> | 176 | <if test="virtualHostId != null"> |
131 | - #{virtualHostId,jdbcType=VARCHAR}, | 177 | + |
178 | + #{virtualHostId,jdbcType=VARCHAR}, | ||
179 | + | ||
132 | </if> | 180 | </if> |
133 | <if test="virtualHostName != null"> | 181 | <if test="virtualHostName != null"> |
134 | - #{virtualHostName,jdbcType=VARCHAR}, | 182 | + |
183 | + #{virtualHostName,jdbcType=VARCHAR}, | ||
184 | + | ||
135 | </if> | 185 | </if> |
136 | <if test="exchangeId != null"> | 186 | <if test="exchangeId != null"> |
137 | - #{exchangeId,jdbcType=VARCHAR}, | 187 | + |
188 | + #{exchangeId,jdbcType=VARCHAR}, | ||
189 | + | ||
138 | </if> | 190 | </if> |
139 | <if test="exchangeName != null"> | 191 | <if test="exchangeName != null"> |
140 | - #{exchangeName,jdbcType=VARCHAR}, | 192 | + |
193 | + #{exchangeName,jdbcType=VARCHAR}, | ||
194 | + | ||
141 | </if> | 195 | </if> |
142 | <if test="queueId != null"> | 196 | <if test="queueId != null"> |
143 | - #{queueId,jdbcType=VARCHAR}, | 197 | + |
198 | + #{queueId,jdbcType=VARCHAR}, | ||
199 | + | ||
144 | </if> | 200 | </if> |
145 | <if test="queueName != null"> | 201 | <if test="queueName != null"> |
146 | - #{queueName,jdbcType=VARCHAR}, | 202 | + |
203 | + #{queueName,jdbcType=VARCHAR}, | ||
204 | + | ||
147 | </if> | 205 | </if> |
148 | <if test="routingKeyId != null"> | 206 | <if test="routingKeyId != null"> |
149 | - #{routingKeyId,jdbcType=VARCHAR}, | 207 | + |
208 | + #{routingKeyId,jdbcType=VARCHAR}, | ||
209 | + | ||
150 | </if> | 210 | </if> |
151 | <if test="routingKeyName != null"> | 211 | <if test="routingKeyName != null"> |
152 | - #{routingKeyName,jdbcType=VARCHAR}, | 212 | + |
213 | + #{routingKeyName,jdbcType=VARCHAR}, | ||
214 | + | ||
153 | </if> | 215 | </if> |
154 | <if test="subscriber != null"> | 216 | <if test="subscriber != null"> |
155 | - #{subscriber,jdbcType=VARCHAR}, | 217 | + |
218 | + #{subscriber,jdbcType=VARCHAR}, | ||
219 | + | ||
156 | </if> | 220 | </if> |
157 | <if test="description != null"> | 221 | <if test="description != null"> |
158 | - #{description,jdbcType=VARCHAR}, | 222 | + |
223 | + #{description,jdbcType=VARCHAR}, | ||
224 | + | ||
159 | </if> | 225 | </if> |
160 | <if test="gmtCreate != null"> | 226 | <if test="gmtCreate != null"> |
161 | - #{gmtCreate,jdbcType=TIMESTAMP}, | 227 | + |
228 | + #{gmtCreate,jdbcType=TIMESTAMP}, | ||
229 | + | ||
162 | </if> | 230 | </if> |
163 | <if test="gmtModified != null"> | 231 | <if test="gmtModified != null"> |
164 | - #{gmtModified,jdbcType=TIMESTAMP}, | 232 | + |
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 | ||
171 | - <set> | ||
172 | - <if test="userId != null"> | ||
173 | - user_id = #{userId,jdbcType=VARCHAR}, | ||
174 | - </if> | 238 | + <!--@mbg.generated-->update user_message_binding |
239 | + | ||
240 | + <set> | ||
241 | + <if test="userId != null"> | ||
242 | + user_id = #{userId,jdbcType=VARCHAR}, | ||
243 | + | ||
244 | + </if> | ||
175 | <if test="username != null"> | 245 | <if test="username != null"> |
176 | - username = #{username,jdbcType=VARCHAR}, | 246 | + |
247 | + username = #{username,jdbcType=VARCHAR}, | ||
248 | + | ||
177 | </if> | 249 | </if> |
178 | <if test="serverId != null"> | 250 | <if test="serverId != null"> |
179 | - server_id = #{serverId,jdbcType=VARCHAR}, | 251 | + |
252 | + server_id = #{serverId,jdbcType=VARCHAR}, | ||
253 | + | ||
180 | </if> | 254 | </if> |
181 | <if test="serverName != null"> | 255 | <if test="serverName != null"> |
182 | - `server_name` = #{serverName,jdbcType=VARCHAR}, | 256 | + |
257 | + `server_name` = #{serverName,jdbcType=VARCHAR}, | ||
258 | + | ||
183 | </if> | 259 | </if> |
184 | <if test="virtualHostId != null"> | 260 | <if test="virtualHostId != null"> |
185 | - virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | 261 | + |
262 | + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
263 | + | ||
186 | </if> | 264 | </if> |
187 | <if test="virtualHostName != null"> | 265 | <if test="virtualHostName != null"> |
188 | - virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, | 266 | + |
267 | + virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, | ||
268 | + | ||
189 | </if> | 269 | </if> |
190 | <if test="exchangeId != null"> | 270 | <if test="exchangeId != null"> |
191 | - exchange_id = #{exchangeId,jdbcType=VARCHAR}, | 271 | + |
272 | + exchange_id = #{exchangeId,jdbcType=VARCHAR}, | ||
273 | + | ||
192 | </if> | 274 | </if> |
193 | <if test="exchangeName != null"> | 275 | <if test="exchangeName != null"> |
194 | - exchange_name = #{exchangeName,jdbcType=VARCHAR}, | 276 | + |
277 | + exchange_name = #{exchangeName,jdbcType=VARCHAR}, | ||
278 | + | ||
195 | </if> | 279 | </if> |
196 | <if test="queueId != null"> | 280 | <if test="queueId != null"> |
197 | - queue_id = #{queueId,jdbcType=VARCHAR}, | 281 | + |
282 | + queue_id = #{queueId,jdbcType=VARCHAR}, | ||
283 | + | ||
198 | </if> | 284 | </if> |
199 | <if test="queueName != null"> | 285 | <if test="queueName != null"> |
200 | - queue_name = #{queueName,jdbcType=VARCHAR}, | 286 | + |
287 | + queue_name = #{queueName,jdbcType=VARCHAR}, | ||
288 | + | ||
201 | </if> | 289 | </if> |
202 | <if test="routingKeyId != null"> | 290 | <if test="routingKeyId != null"> |
203 | - routing_key_id = #{routingKeyId,jdbcType=VARCHAR}, | 291 | + |
292 | + routing_key_id = #{routingKeyId,jdbcType=VARCHAR}, | ||
293 | + | ||
204 | </if> | 294 | </if> |
205 | <if test="routingKeyName != null"> | 295 | <if test="routingKeyName != null"> |
206 | - routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, | 296 | + |
297 | + routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, | ||
298 | + | ||
207 | </if> | 299 | </if> |
208 | <if test="subscriber != null"> | 300 | <if test="subscriber != null"> |
209 | - subscriber = #{subscriber,jdbcType=VARCHAR}, | 301 | + |
302 | + subscriber = #{subscriber,jdbcType=VARCHAR}, | ||
303 | + | ||
210 | </if> | 304 | </if> |
211 | <if test="description != null"> | 305 | <if test="description != null"> |
212 | - description = #{description,jdbcType=VARCHAR}, | 306 | + |
307 | + description = #{description,jdbcType=VARCHAR}, | ||
308 | + | ||
213 | </if> | 309 | </if> |
214 | <if test="gmtCreate != null"> | 310 | <if test="gmtCreate != null"> |
215 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | 311 | + |
312 | + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
313 | + | ||
216 | </if> | 314 | </if> |
217 | <if test="gmtModified != null"> | 315 | <if test="gmtModified != null"> |
218 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, | 316 | + |
317 | + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, | ||
219 | </if> | 318 | </if> |
220 | - </set> | ||
221 | - where id = #{id,jdbcType=VARCHAR} | 319 | + </set> |
320 | + | ||
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 | ||
226 | - set user_id = #{userId,jdbcType=VARCHAR}, | ||
227 | - username = #{username,jdbcType=VARCHAR}, | ||
228 | - server_id = #{serverId,jdbcType=VARCHAR}, | ||
229 | - `server_name` = #{serverName,jdbcType=VARCHAR}, | ||
230 | - virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
231 | - virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, | ||
232 | - exchange_id = #{exchangeId,jdbcType=VARCHAR}, | ||
233 | - exchange_name = #{exchangeName,jdbcType=VARCHAR}, | ||
234 | - queue_id = #{queueId,jdbcType=VARCHAR}, | ||
235 | - queue_name = #{queueName,jdbcType=VARCHAR}, | ||
236 | - routing_key_id = #{routingKeyId,jdbcType=VARCHAR}, | ||
237 | - routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, | ||
238 | - subscriber = #{subscriber,jdbcType=VARCHAR}, | ||
239 | - description = #{description,jdbcType=VARCHAR}, | ||
240 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
241 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | ||
242 | - where id = #{id,jdbcType=VARCHAR} | 325 | + <!--@mbg.generated-->update user_message_binding |
326 | + set user_id = #{userId,jdbcType=VARCHAR}, | ||
327 | + username = #{username,jdbcType=VARCHAR}, | ||
328 | + server_id = #{serverId,jdbcType=VARCHAR}, | ||
329 | + `server_name` = #{serverName,jdbcType=VARCHAR}, | ||
330 | + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
331 | + virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, | ||
332 | + exchange_id = #{exchangeId,jdbcType=VARCHAR}, | ||
333 | + exchange_name = #{exchangeName,jdbcType=VARCHAR}, | ||
334 | + queue_id = #{queueId,jdbcType=VARCHAR}, | ||
335 | + queue_name = #{queueName,jdbcType=VARCHAR}, | ||
336 | + routing_key_id = #{routingKeyId,jdbcType=VARCHAR}, | ||
337 | + routing_key_name = #{routingKeyName,jdbcType=VARCHAR}, | ||
338 | + subscriber = #{subscriber,jdbcType=VARCHAR}, | ||
339 | + description = #{description,jdbcType=VARCHAR}, | ||
340 | + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
341 | + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | ||
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, | ||
250 | - GROUP_CONCAT(description) as description | 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, | ||
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 | - <!-- 所属服务器名称 --> | ||
258 | - <if test="serverName != null and serverName !=''"> | 371 | + <!-- 所属服务器名称 --> |
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> |
1 | <?xml version="1.0" encoding="UTF-8"?> | 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"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
3 | <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.UserServerVirtualHostMapper"> | 3 | <mapper namespace="com.sunyo.wlpt.message.bus.service.mapper.UserServerVirtualHostMapper"> |
4 | - <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost"> | ||
5 | - <!--@mbg.generated--> | ||
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" /> | ||
13 | - </resultMap> | 4 | + <resultMap id="BaseResultMap" type="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost"> |
5 | + <!--@mbg.generated--> | ||
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"/> | ||
13 | + </resultMap> | ||
14 | <sql id="Base_Column_List"> | 14 | <sql id="Base_Column_List"> |
15 | - <!--@mbg.generated--> | ||
16 | - id, username, server_id, virtual_host_id, gmt_create, gmt_modified | 15 | + <!--@mbg.generated--> |
16 | + id, username, server_id, virtual_host_id, gmt_create, gmt_modified | ||
17 | </sql> | 17 | </sql> |
18 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> | 18 | <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
19 | - <!--@mbg.generated--> | ||
20 | - select | ||
21 | - <include refid="Base_Column_List" /> | ||
22 | - from user_server_virtual_host | ||
23 | - where id = #{id,jdbcType=VARCHAR} | 19 | + <!--@mbg.generated--> |
20 | + select | ||
21 | + <include refid="Base_Column_List"/> | ||
22 | + from user_server_virtual_host | ||
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--> | ||
27 | - delete from user_server_virtual_host | ||
28 | - where id = #{id,jdbcType=VARCHAR} | 26 | + <!--@mbg.generated--> |
27 | + delete | ||
28 | + from user_server_virtual_host | ||
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 | - insert into user_server_virtual_host (id, username, server_id, | ||
33 | - virtual_host_id, gmt_create, gmt_modified | ||
34 | - ) | ||
35 | - values (#{id,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{serverId,jdbcType=VARCHAR}, | ||
36 | - #{virtualHostId,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP} | ||
37 | - ) | 32 | + <!--@mbg.generated--> |
33 | + insert into user_server_virtual_host (id, username, server_id, | ||
34 | + virtual_host_id, gmt_create, gmt_modified) | ||
35 | + values (#{id,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{serverId,jdbcType=VARCHAR}, | ||
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--> | ||
41 | - insert into user_server_virtual_host | ||
42 | - <trim prefix="(" suffix=")" suffixOverrides=","> | ||
43 | - <if test="id != null"> | ||
44 | - id, | ||
45 | - </if> | 39 | + <!--@mbg.generated--> |
40 | + insert into user_server_virtual_host | ||
41 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
42 | + <if test="id != null"> | ||
43 | + id, | ||
44 | + </if> | ||
46 | <if test="username != null"> | 45 | <if test="username != null"> |
47 | - username, | 46 | + username, |
48 | </if> | 47 | </if> |
49 | <if test="serverId != null"> | 48 | <if test="serverId != null"> |
50 | - server_id, | 49 | + server_id, |
51 | </if> | 50 | </if> |
52 | <if test="virtualHostId != null"> | 51 | <if test="virtualHostId != null"> |
53 | - virtual_host_id, | 52 | + virtual_host_id, |
54 | </if> | 53 | </if> |
55 | <if test="gmtCreate != null"> | 54 | <if test="gmtCreate != null"> |
56 | - gmt_create, | 55 | + gmt_create, |
57 | </if> | 56 | </if> |
58 | <if test="gmtModified != null"> | 57 | <if test="gmtModified != null"> |
59 | - gmt_modified, | 58 | + gmt_modified, |
60 | </if> | 59 | </if> |
61 | - </trim> | 60 | + </trim> |
62 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 61 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
63 | - <if test="id != null"> | ||
64 | - #{id,jdbcType=VARCHAR}, | ||
65 | - </if> | 62 | + <if test="id != null"> |
63 | + #{id,jdbcType=VARCHAR}, | ||
64 | + </if> | ||
66 | <if test="username != null"> | 65 | <if test="username != null"> |
67 | - #{username,jdbcType=VARCHAR}, | 66 | + #{username,jdbcType=VARCHAR}, |
68 | </if> | 67 | </if> |
69 | <if test="serverId != null"> | 68 | <if test="serverId != null"> |
70 | - #{serverId,jdbcType=VARCHAR}, | 69 | + #{serverId,jdbcType=VARCHAR}, |
71 | </if> | 70 | </if> |
72 | <if test="virtualHostId != null"> | 71 | <if test="virtualHostId != null"> |
73 | - #{virtualHostId,jdbcType=VARCHAR}, | 72 | + #{virtualHostId,jdbcType=VARCHAR}, |
74 | </if> | 73 | </if> |
75 | <if test="gmtCreate != null"> | 74 | <if test="gmtCreate != null"> |
76 | - #{gmtCreate,jdbcType=TIMESTAMP}, | 75 | + #{gmtCreate,jdbcType=TIMESTAMP}, |
77 | </if> | 76 | </if> |
78 | <if test="gmtModified != null"> | 77 | <if test="gmtModified != null"> |
79 | - #{gmtModified,jdbcType=TIMESTAMP}, | 78 | + #{gmtModified,jdbcType=TIMESTAMP}, |
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"> | ||
84 | - <!--@mbg.generated--> | ||
85 | - update user_server_virtual_host | ||
86 | - <set> | ||
87 | - <if test="username != null"> | ||
88 | - username = #{username,jdbcType=VARCHAR}, | ||
89 | - </if> | 82 | + <update id="updateByPrimaryKeySelective" |
83 | + parameterType="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost"> | ||
84 | + <!--@mbg.generated--> | ||
85 | + update user_server_virtual_host | ||
86 | + <set> | ||
87 | + <if test="username != null"> | ||
88 | + username = #{username,jdbcType=VARCHAR}, | ||
89 | + </if> | ||
90 | <if test="serverId != null"> | 90 | <if test="serverId != null"> |
91 | - server_id = #{serverId,jdbcType=VARCHAR}, | 91 | + server_id = #{serverId,jdbcType=VARCHAR}, |
92 | </if> | 92 | </if> |
93 | <if test="virtualHostId != null"> | 93 | <if test="virtualHostId != null"> |
94 | - virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | 94 | + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, |
95 | </if> | 95 | </if> |
96 | <if test="gmtCreate != null"> | 96 | <if test="gmtCreate != null"> |
97 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | 97 | + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, |
98 | </if> | 98 | </if> |
99 | <if test="gmtModified != null"> | 99 | <if test="gmtModified != null"> |
100 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, | 100 | + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}, |
101 | </if> | 101 | </if> |
102 | - </set> | ||
103 | - where id = #{id,jdbcType=VARCHAR} | 102 | + </set> |
103 | + where id = #{id,jdbcType=VARCHAR} | ||
104 | </update> | 104 | </update> |
105 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost"> | 105 | <update id="updateByPrimaryKey" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserServerVirtualHost"> |
106 | - <!--@mbg.generated--> | ||
107 | - update user_server_virtual_host | ||
108 | - set username = #{username,jdbcType=VARCHAR}, | ||
109 | - server_id = #{serverId,jdbcType=VARCHAR}, | ||
110 | - virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
111 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
112 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | ||
113 | - where id = #{id,jdbcType=VARCHAR} | 106 | + <!--@mbg.generated--> |
107 | + update user_server_virtual_host | ||
108 | + set username = #{username,jdbcType=VARCHAR}, | ||
109 | + server_id = #{serverId,jdbcType=VARCHAR}, | ||
110 | + virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}, | ||
111 | + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
112 | + gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | ||
113 | + where id = #{id,jdbcType=VARCHAR} | ||
114 | </update> | 114 | </update> |
115 | </mapper> | 115 | </mapper> |
@@ -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--> |
@@ -180,11 +185,10 @@ | @@ -180,11 +185,10 @@ | ||
180 | <!--@mbg.generated--> | 185 | <!--@mbg.generated--> |
181 | update virtual_host | 186 | update virtual_host |
182 | set virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, | 187 | set virtual_host_name = #{virtualHostName,jdbcType=VARCHAR}, |
183 | - server_id = #{serverId,jdbcType=VARCHAR}, | ||
184 | - description = #{description,jdbcType=VARCHAR}, | ||
185 | - gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, | ||
186 | - gmt_modified = #{gmtModified,jdbcType=TIMESTAMP} | 188 | + server_id = #{serverId,jdbcType=VARCHAR}, |
189 | + description = #{description,jdbcType=VARCHAR}, | ||
190 | + gmt_create = #{gmtCreate,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> |
-
请 注册 或 登录 后发表评论