|
@@ -311,20 +311,20 @@
|
|
|
|
|
|
<select id="selectTrendingTopByContent" resultType="com.ruoyi.generator.domain.Community.TrendingTop">
|
|
|
SELECT
|
|
|
- type, content
|
|
|
+ distinct type,id,content
|
|
|
FROM (
|
|
|
SELECT
|
|
|
- 'article' as type, title as content
|
|
|
+ 'article' as type, id,title as content
|
|
|
FROM community_article
|
|
|
WHERE title LIKE CONCAT( #{content}, '%') AND is_delete != '1'
|
|
|
UNION ALL
|
|
|
SELECT
|
|
|
- 'tag' as type, tag_name
|
|
|
+ 'tag' as type, id,tag_name
|
|
|
FROM community_tag
|
|
|
WHERE tag_name LIKE CONCAT( #{content}, '%') AND is_delete != '1'
|
|
|
UNION ALL
|
|
|
SELECT
|
|
|
- 'user' as type, nick_name
|
|
|
+ 'user' as type, user_id,nick_name
|
|
|
FROM sys_user
|
|
|
WHERE nick_name LIKE CONCAT( #{content}, '%') AND status = '0'
|
|
|
) AS A
|