用一组startTime、endTime 查询两个字段的时间段(记得跟前端沟通)
<if test="startTime != null and searchTimeType = '1'.toString()"><!-- 开始时间检索 -->
and date_format(applicate_time,'%y%m%d') > date_format(#{startTime},'%y%m%d')
</if>
<if test="endTime != null and searchTimeType = '1'.toString()"><!-- 结束时间检索 -->
and date_format(applicate_time,'%y%m%d') < date_format(#{endTime},'%y%m%d')
</if>
</if>
<if test="searchTimeType != null and searchTimeType == '1'.toString()">
<if test="startTime != null and startTime != '' and searchTimeType = '2'.toString()"><!-- 开始时间检索 -->
and date_format(receive_time,'%y%m%d') >= date_format(#{startTime},'%y%m%d')
</if>
<if test="endTime != null and endTime != '' and searchTimeType = '2'.toString()"><!-- 结束时间检索 -->
and date_format(receive_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
</if>
</if>
定义一个搜索类型· searchTimeType为1查询的则是
定义一个搜索类型· searchTimeType为2查询的则是