mybatils
1. if判断
pd为一个map
<if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词精确检索 -->
and keywords=#{pd.keywords}
</if>
<if test="pd.lastStart!= null and pd.lastStart != ''"><!-- 时间检索大于等于 -->
and NT_SERVICE_ORDER_LIST.CREATE_AT > #{pd.lastStart,jdbcType=TIMESTAMP}
</if>
<if test="pd.lastEnd!= null and pd.lastEnd!= ''"><!-- 时间检索小于等于-->
and NT_SERVICE_ORDER_LIST.CREATE_AT < #{pd.lastEnd,jdbcType=TIMESTAMP}
</if>
<if test="pd.keywords!= null and pd.keywords != ''"><!-- 关键词模糊检索 -->
and PROJECT_NAME LIKE CONCAT(CONCAT('%', #{pd.keywords}),'%')
</if>