Finish role search

This commit is contained in:
2023-11-15 09:52:19 +08:00
parent 574c0df384
commit c0c033ad77
2 changed files with 13 additions and 9 deletions

View File

@@ -6,14 +6,16 @@
from t_role
<where>
deleted = 0
<choose>
<when test="searchRegex == true">
and t_role.name regexp #{searchName}
</when>
<otherwise>
and t_role.name like concat('%' ,#{searchName}, '%')
</otherwise>
</choose>
<if test="searchName != null">
<choose>
<when test="searchRegex == true">
and t_role.name regexp #{searchName}
</when>
<otherwise>
and t_role.name like concat('%' ,#{searchName}, '%')
</otherwise>
</choose>
</if>
</where>
</select>