<select id="getRiskMember" resultMap="BaseResultMap" parameterType="String"resultMap="BaseResultMap">
<include refid="selectMember"/>
and safetylevel > 1
and stauts = 1
<if test="username != null">
and username = #{username}
</if>
</select>
解决办法:
<select id="getRiskMember" resultMap="BaseResultMap" parameterType="String">
<include refid="selectMember"/>
and safetylevel > 1
and stauts = 1
<if test="_parameter != null">
and username = #{username}
</if>
</select>