...
|
...
|
@@ -14,6 +14,15 @@ |
|
|
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate"/>
|
|
|
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 该Mapper映射关系的作用,是队列与虚拟主机的1:1的关系映射 -->
|
|
|
<resultMap id="QueueAndHostMap" extends="BaseResultMap"
|
|
|
type="com.sunyo.wlpt.message.bus.service.domain.BusQueue">
|
|
|
<association property="virtualHost" javaType="com.sunyo.wlpt.message.bus.service.domain.VirtualHost">
|
|
|
<id column="id" property="id"></id>
|
|
|
<result column="virtual_host_name" property="virtualHostName"/>
|
|
|
</association>
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
<!--@mbg.generated-->
|
|
|
id, queue_name, virtual_host_id, durability, auto_delete, arguments, description,
|
...
|
...
|
@@ -30,13 +39,19 @@ |
|
|
<select id="selectBusQueueList" parameterType="com.sunyo.wlpt.message.bus.service.domain.BusQueue"
|
|
|
resultMap="BaseResultMap">
|
|
|
select
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from bus_queue
|
|
|
q.id, q.queue_name, q.virtual_host_id, q.durability, q.auto_delete, q.arguments, q.description,
|
|
|
q.gmt_create, q.gmt_modified,v.virtual_host_name
|
|
|
from bus_queue as q,virtual_host v
|
|
|
<where>
|
|
|
<!-- 所属虚拟主机Id -->
|
|
|
<if test="virtualHostId != null and virtualHostId !=''">
|
|
|
virtual_host_id = #{virtualHostId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<!-- 消息队列名称 -->
|
|
|
<if test="queueName != null and queueName !=''">
|
|
|
queue_name = #{queueName,jdbcType=VARCHAR}
|
|
|
and queue_name = #{queueName,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
and v.id = q.virtual_host_id
|
|
|
</where>
|
|
|
</select>
|
|
|
<!-- 校验消息队列是否已存在-->
|
...
|
...
|
|