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