<if test='year != null and year != ""'>
and t.time BETWEEN concat(#{year},'/01/%') and concat(#{year},'/12/%')
</if>
<if test='month != null and month != ""'>
and instr(t.time , concat(concat('/',replace(lpad(#{month},2),' ','0')),'/')) > 0
</if>
日期字段按年、月查询sql
于 2023-03-03 16:00:42 首次发布