提交 113796bb 作者: ZhangJingKun

查询人物列表增加标签搜索功能

上级 420e8944
......@@ -45,4 +45,7 @@ public class CharacterListVo {
//类别 根据左侧树id
private String typeId;
//标签
private String tagName;
}
......@@ -45,6 +45,9 @@
<if test="typeId != null and typeId != ''">
AND b.type_id = #{typeId}
</if>
<if test="tagName != null and tagName != ''">
AND d.tag_name like '%${tagName}%'
</if>
)t1
<if test="order != null and order != ''">
ORDER BY ${column} ${order}
......@@ -59,6 +62,15 @@
from character_basic_info a
LEFT JOIN character_change_info b
on a.id = b.id
left join (
select GROUP_CONCAT(a1.tag_id SEPARATOR ',') as tag_id,a1.character_uid,GROUP_CONCAT(b1.name SEPARATOR ',') as tag_name
from character_tag_map a1
LEFT JOIN label_entity b1
on a1.tag_id = b1.id
where 1=1
group by a1.character_uid
) d
on d.character_uid = a.uid
where 1 = 1
and (b.status = 1 or b.status IS NULL)
<if test="name != null and name != ''">
......@@ -82,6 +94,9 @@
<if test="typeId != null and typeId != ''">
AND b.type_id = #{typeId}
</if>
<if test="tagName != null and tagName != ''">
AND d.tag_name like '%${tagName}%'
</if>
</select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论