[type: refactor] support user fuzzy search.
<include refid="Base_Column_List"/>
from dashboard_user
<where>
- <if test="userName != null">
- user_name = #{userName,jdbcType=VARCHAR}
- </if>
+ <include refid="likeUser"/>
</where>
</select>
select count(1)
from dashboard_user
<where>
- <if test="userName != null">
- user_name = #{userName,jdbcType=VARCHAR}
- </if>
+ <include refid="likeUser"/>
</where>
</select>
+ <sql id="likeUser">
+ <if test="userName != null and userName != ''">
+ <bind name="nameLike" value="('%' + userName + '%')"/>
+ user_name like #{nameLike,jdbcType=VARCHAR}
+ </if>
+ </sql>
+
<insert id="insert" parameterType="org.apache.shenyu.admin.model.entity.DashboardUserDO">
insert into dashboard_user (id, date_created, date_updated,
user_name, password, role, enabled)
