fix
This commit is contained in:
parent
cc7044b9fa
commit
5a3d7df4e7
|
|
@ -56,7 +56,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="location != null and location != ''"> and d.location = #{location}</if>
|
||||
<if test="brand != null and brand != ''"> and d.brand = #{brand}</if>
|
||||
<if test="modelName != null and modelName != ''"> and d.model_name like concat('%', #{modelName}, '%')</if>
|
||||
<if test="productionDate != null and productionDate != ''"> and d.production_date = #{productionDate}</if>
|
||||
<if test="ageMin != null and ageMin != '' and ageMax != null and ageMax != ''">
|
||||
and DATEDIFF(DATE_FORMAT(now(), '%Y-%m-%d'), d.production_date) >= #{ageMin} * 365
|
||||
and DATEDIFF(DATE_FORMAT(now(), '%Y-%m-%d'), d.production_date) <= #{ageMax} * 365
|
||||
</if>
|
||||
<if test="workingHoursMin != null and workingHoursMin != '' and workingHoursMax != null and workingHoursMax != ''">
|
||||
and d.working_hours >= #{workingHoursMin} and d.working_hours <= #{workingHoursMax}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue