用户需求看板,全局搜索等
This commit is contained in:
@@ -1209,4 +1209,68 @@
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="searchBug" resultType="com.sa.zentao.dao.SearchDTO">
|
||||
SELECT id,title name, steps spec,5 type,openedDate from zt_bug WHERE 1=1 and (title like concat('%', #{keyword}, '%') or steps like concat('%', #{keyword}, '%') ) order by id desc
|
||||
</select>
|
||||
<select id="searchTask" resultType="com.sa.zentao.dao.SearchDTO">
|
||||
SELECT id,name name, `desc` spec,3 type,openedDate from zt_task WHERE 1=1 and (name like concat('%', #{keyword}, '%') or `desc` like concat('%', #{keyword}, '%') ) order by id desc
|
||||
</select>
|
||||
<select id="searchStory" resultType="com.sa.zentao.dao.SearchDTO">
|
||||
SELECT id,st.title name, spc.spec spec,spc.verify verify,2 type,openedDate from zt_story st,zt_storyspec spc WHERE 1=1 and st.id=spc.story and (spc.spec like concat('%', #{keyword}, '%') or spc.verify like concat('%', #{keyword}, '%') ) order by id desc
|
||||
</select>
|
||||
<select id="searchFeedback" resultType="com.sa.zentao.dao.SearchDTO">
|
||||
SELECT id,remark name, spec spec,4 type,opened_date from zt_story_feedback WHERE 1=1 and (remark like concat('%', #{keyword}, '%') or spec like concat('%', #{keyword}, '%') ) order by id desc
|
||||
</select>
|
||||
<select id="searchUserStory" resultType="com.sa.zentao.dao.SearchDTO">
|
||||
SELECT id,st.title name, spc.spec spec,spc.verify verify,1 type,openedDate from zt_story_user st,zt_story_userspec spc WHERE 1=1 and st.id=spc.story and (spc.spec like concat('%', #{keyword}, '%') or spc.verify like concat('%', #{keyword}, '%') ) order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="searchAll" resultType="com.sa.zentao.dao.SearchDTO">
|
||||
(SELECT id,st.title name, spc.spec spec,spc.verify verify,2 type,openedDate from zt_story st left join zt_storyspec spc on st.id=spc.story
|
||||
WHERE 1=1 and (spc.spec like concat('%', #{keyword}, '%') or spc.verify like concat('%', #{keyword}, '%') or st.title like concat('%', #{keyword}, '%') )
|
||||
and st.product in
|
||||
<foreach collection="pIds" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
order by id desc )
|
||||
UNION
|
||||
(SELECT id,title name, steps spec,'' verify,5 type,openedDate from zt_bug
|
||||
WHERE 1=1 and (title like concat('%', #{keyword}, '%') or steps like concat('%', #{keyword}, '%') )
|
||||
and product in
|
||||
<foreach collection="pIds" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
order by id desc )
|
||||
UNION
|
||||
(SELECT id,remark name, spec spec,'' verify,4 type,opened_date from zt_story_feedback
|
||||
WHERE 1=1 and (remark like concat('%', #{keyword}, '%') or spec like concat('%', #{keyword}, '%') )
|
||||
and product in
|
||||
<foreach collection="pIds" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
order by id desc )
|
||||
UNION
|
||||
(SELECT id,name name, `desc` spec,'' verify,3 type,openedDate from zt_task
|
||||
WHERE 1=1 and (name like concat('%', #{keyword}, '%') or `desc` like concat('%', #{keyword}, '%') )
|
||||
and product in
|
||||
<foreach collection="pIds" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
order by id desc )
|
||||
UNION
|
||||
(SELECT id,st.title name, spc.spec spec,spc.verify verify,1 type,openedDate from zt_story_user st left join zt_story_userspec spc on st.id=spc.story
|
||||
WHERE 1=1
|
||||
and product in
|
||||
<foreach collection="pIds" item="id" index="index"
|
||||
open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
and (spc.spec like concat('%', #{keyword}, '%') or spc.verify like concat('%', #{keyword}, '%') or st.title like concat('%', #{keyword}, '%') ) order by id desc )
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user