MyBatis xml 模糊查询
<select id="selectSysAnnouncementList" parameterType="SysAnnouncement" resultMap="SysAnnouncementResult">
<include refid="selectSysAnnouncementVo"/>
<where>
<if test="title != null and title != ''">and title like '%'||#{title}||'%'</if>
<if test="nickname != null and nickname != ''"> and nickname like concat('%', #{nickname}, '%')</if>
</where>
</select>