When mybatis there are multiple parameters, mapper.java file that is dao layer must write notes on @Param
List <AddressBean> listAddressByDate (@Param ( "startDate") String startDate, @Param ( "endDate") String endDate);
and then in the xml file with where if judgment is empty, attention test to determine if there is not a # { }
<select id="listAddressByDate" resultType="cn.zwkj.beans.AddressBean" parameterType="String">
select biaozhunmingcheng,hanyuduyin,dzzzcode,dengjishijian,id from t_placecommon
<where>
<if test="startDate!=null and startDate != '' ">
and to_char(dengjishijian,'yyyy-MM-dd') <![CDATA[>=]]> #{startDate}
</if>
<if test="endDate!=null and endDate != '' ">
and to_char(dengjishijian,'yyyy-MM-dd') <![CDATA[<=]]> #{endDate}
</if>
</where>
</select>