and c.id=#{id}and b.id=#{oid}and a.pay_time BETWEEN #{startDate} AND #{endDate}service层如果参数为null,mybatis执行sql语句的时候就不会去拼接你指定的if标签中的sql语句