|
@@ -58,7 +58,7 @@
|
|
|
ON OWNER_ID = USER_ID_
|
|
|
<where>
|
|
|
<if test="@rx.Ognl@isNotEmpty(params.name)">
|
|
|
- ai.NAME LIKE '%' || #{params.name} || '%'
|
|
|
+ instr(ai.NAME,#{params.name}) > 0
|
|
|
</if>
|
|
|
<if test="@rx.Ognl@isNotEmpty(params.categoryId)">
|
|
|
and CATEGORY_ID IN (
|
|
@@ -67,7 +67,7 @@
|
|
|
)
|
|
|
</if>
|
|
|
<if test="@rx.Ognl@isNotEmpty(params.ownerName)">
|
|
|
- and FULLNAME_ LIKE '%' || #{params.ownerName} || '%'
|
|
|
+ and instr(FULLNAME_,#{params.ownerName}) > 0
|
|
|
</if>
|
|
|
<if test="@rx.Ognl@isNotEmpty(params.createTimeStart)">
|
|
|
and TO_CHAR(ai.CREATE_TIME_,'yyyy-mm-dd') >= #{params.createTimeStart}
|
|
@@ -100,7 +100,13 @@
|
|
|
from KM_ALBUM_INFO ai
|
|
|
<where>
|
|
|
<if test="@rx.Ognl@isNotEmpty(params.name)">
|
|
|
- ai.NAME LIKE '%' || #{params.name} || '%'
|
|
|
+ instr(ai.NAME,#{params.name}) > 0
|
|
|
+ </if>
|
|
|
+ <if test="@rx.Ognl@isNotEmpty(params.categoryId)">
|
|
|
+ and CATEGORY_ID IN (
|
|
|
+ SELECT PK_ID FROM KM_ALBUM_CATEGORY c WHERE c.IS_DEL = 0
|
|
|
+ START WITH c.PK_ID = #{params.categoryId} CONNECT BY PRIOR c.PK_ID = c.PARENT and c.IS_DEL = 0
|
|
|
+ )
|
|
|
</if>
|
|
|
and ai.owner_id = #{params.ownerIds} and ai.state = 1
|
|
|
and ai.IS_DEL = 0
|
|
@@ -113,14 +119,14 @@
|
|
|
select
|
|
|
<include refid="COLUMNS"/>
|
|
|
from KM_ALBUM_INFO ai
|
|
|
- join KM_ALBUM_VERSION av
|
|
|
- on ai.PK_ID = av.ALBUM_ID
|
|
|
+ left join KM_ALBUM_VERSION av
|
|
|
+ on ai.PK_ID = av.ALBUM_ID and av.IS_DEL = 0
|
|
|
<where>
|
|
|
<if test="@rx.Ognl@isNotEmpty(params.name)">
|
|
|
- ai.NAME LIKE '%' || #{params.name} || '%'
|
|
|
+ instr(ai.NAME,#{params.name}) > 0
|
|
|
</if>
|
|
|
- av.STATE = #{params.versionState}
|
|
|
- and ai.IS_DEL = 0 and av.IS_DEL = 0 and ai.STATE = 1
|
|
|
+ and av.STATE = #{params.versionState}
|
|
|
+ and ai.IS_DEL = 0 and ai.STATE = 1
|
|
|
</where>
|
|
|
ORDER BY ai.CREATE_TIME_ DESC
|
|
|
</select>
|
|
@@ -131,6 +137,28 @@
|
|
|
where PK_ID = #{pkId}
|
|
|
</delete>
|
|
|
|
|
|
+ <select id="findAllAlbumInfoByOwnerIdsNoPage" resultType="com.redxun.knowledge.album.entity.dao.AlbumInfo">
|
|
|
+ select
|
|
|
+ <include refid="COLUMNS"/>
|
|
|
+ from KM_ALBUM_INFO ai
|
|
|
+ <where>
|
|
|
+ <if test="@rx.Ognl@isNotEmpty(params.name)">
|
|
|
+ instr(ai.NAME,#{params.name}) > 0
|
|
|
+ </if>
|
|
|
+ <if test="@rx.Ognl@isNotEmpty(params.categoryId)">
|
|
|
+ and CATEGORY_ID IN (
|
|
|
+ SELECT PK_ID FROM KM_ALBUM_CATEGORY c WHERE c.IS_DEL = 0
|
|
|
+ START WITH c.PK_ID = #{params.categoryId} CONNECT BY PRIOR c.PK_ID = c.PARENT and c.IS_DEL = 0
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ and ai.owner_id = #{params.ownerId} and ai.state = 1
|
|
|
+ and ai.IS_DEL = 0
|
|
|
+ </where>
|
|
|
+ ORDER BY ai.CREATE_TIME_ DESC
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
</mapper>
|
|
|
|
|
|
|