修复条件查询报错
This commit is contained in:
@@ -10,28 +10,28 @@
|
||||
FROM erp_enterprise_unit
|
||||
WHERE del_flag = 1
|
||||
<if test="erpEnterpriseUnitDO.erpCode != null and erpEnterpriseUnitDO.erpCode != ''">
|
||||
AND erp_code LIKE CONCAT('%', #{erpCode}, '%')
|
||||
AND erp_code LIKE CONCAT('%', #{erpEnterpriseUnitDO.erpCode}, '%')
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.erpName != null and erpEnterpriseUnitDO.erpName != ''">
|
||||
AND erp_name LIKE CONCAT('%', #{erpName}, '%')
|
||||
AND erp_name LIKE CONCAT('%', #{erpEnterpriseUnitDO.erpName}, '%')
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.pushStatus != null">
|
||||
AND push_status = #{pushStatus}
|
||||
AND push_status = #{erpEnterpriseUnitDO.pushStatus}
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.pushTimeFrom != null and erpEnterpriseUnitDO.pushTimeFrom != ''">
|
||||
AND DATE_FORMAT(push_time, '%Y-%m-%d') >= #{pushTimeFrom}
|
||||
AND DATE_FORMAT(push_time, '%Y-%m-%d') >= #{erpEnterpriseUnitDO.pushTimeFrom}
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.pushTimeTo != null and erpEnterpriseUnitDO.pushTimeTo != ''">
|
||||
AND DATE_FORMAT(push_time, '%Y-%m-%d') <= #{pushTimeTo}
|
||||
AND DATE_FORMAT(push_time, '%Y-%m-%d') <= #{erpEnterpriseUnitDO.pushTimeTo}
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.organizationId != null">
|
||||
AND organization_id = #{organizationId}
|
||||
AND organization_id = #{erpEnterpriseUnitDO.organizationId}
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.createTimeFrom != null and erpEnterpriseUnitDO.createTimeFrom != ''">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') >= #{createTimeFrom}
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') >= #{erpEnterpriseUnitDO.createTimeFrom}
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.createTimeTo != null and erpEnterpriseUnitDO.createTimeTo != ''">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') <= #{createTimeTo}
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') <= #{erpEnterpriseUnitDO.createTimeTo}
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user