|
@@ -31,19 +31,25 @@
|
|
|
AND t3.is_deleted = 'N'
|
|
|
AND t1.id = t2.start_id
|
|
|
AND t3.id = t2.end_id
|
|
|
+ <if test="startId != null">
|
|
|
+ AND t2.start_id = #{startId}
|
|
|
+ </if>
|
|
|
<if test="startName != null and startName != ''">
|
|
|
AND t1.lib_name = #{startName}
|
|
|
</if>
|
|
|
- <if test="startType != null and startType != ''">
|
|
|
+ <if test="startType != null">
|
|
|
AND t1.lib_type = #{startType}
|
|
|
</if>
|
|
|
- <if test="relationType != null and relationType != ''">
|
|
|
+ <if test="relationType != null">
|
|
|
AND t2.relation_id = #{relationType}
|
|
|
</if>
|
|
|
+ <if test="endId != null">
|
|
|
+ AND t2.end_id = #{endId}
|
|
|
+ </if>
|
|
|
<if test="endName != null and endName != ''">
|
|
|
AND t3.lib_name = #{endName}
|
|
|
</if>
|
|
|
- <if test="endType != null and endType != ''">
|
|
|
+ <if test="endType != null">
|
|
|
AND t3.lib_type = #{endType}
|
|
|
</if>
|
|
|
</select>
|
|
@@ -68,19 +74,25 @@
|
|
|
AND t1.id = t2.start_id
|
|
|
AND t3.id = t2.end_id
|
|
|
AND t2.id = t4.t_relation_id
|
|
|
+ <if test="startId != null">
|
|
|
+ AND t2.start_id = #{startId}
|
|
|
+ </if>
|
|
|
<if test="startName != null and startName != ''">
|
|
|
AND t1.lib_name = #{startName}
|
|
|
</if>
|
|
|
- <if test="startType != null and startType != ''">
|
|
|
+ <if test="startType != null">
|
|
|
AND t1.lib_type = #{startType}
|
|
|
</if>
|
|
|
- <if test="relationType != null and relationType != ''">
|
|
|
+ <if test="relationType != null">
|
|
|
AND t2.relation_id = #{relationType}
|
|
|
</if>
|
|
|
+ <if test="endId != null">
|
|
|
+ AND t2.end_id = #{endId}
|
|
|
+ </if>
|
|
|
<if test="endName != null and endName != ''">
|
|
|
AND t3.lib_name = #{endName}
|
|
|
</if>
|
|
|
- <if test="endType != null and endType != ''">
|
|
|
+ <if test="endType != null">
|
|
|
AND t3.lib_type = #{endType}
|
|
|
</if>
|
|
|
ORDER BY t4.order_no
|