<select id="ProjectHomePage" parameterType="string" resultType="java.util.HashMap">
SELECT 字段1,字段2,字段3 FROM 表名
<where>
=
<if test="_parameter != null">
and type=#{type}
</if>
and delstate=
</where>
</select>
把 #{XXXX}改为 _parameter != null
<select id="ProjectHomePage" parameterType="string" resultType="java.util.HashMap">
SELECT 字段1,字段2,字段3 FROM 表名
<where>
=
<if test="_parameter != null">
and type=#{type}
</if>
and delstate=
</where>
</select>
把 #{XXXX}改为 _parameter != null