修复条件查询报错
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ public interface ErpEnterpriseUnitMapper extends BaseMapper<ErpEnterpriseUnit> {
|
||||
* @param erpEnterpriseUnitDO
|
||||
* @return
|
||||
*/
|
||||
List<ErpEnterpriseUnitPO> queryList(@Param("erpEnterpriseUnitDO")ErpEnterpriseUnitDO erpEnterpriseUnitDO);
|
||||
List<ErpEnterpriseUnitPO> queryList(ErpEnterpriseUnitDO erpEnterpriseUnitDO);
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -9,29 +9,29 @@
|
||||
SELECT *
|
||||
FROM erp_enterprise_unit
|
||||
WHERE del_flag = 1
|
||||
<if test="erpEnterpriseUnitDO.erpCode != null and erpEnterpriseUnitDO.erpCode != ''">
|
||||
AND erp_code LIKE CONCAT('%', #{erpEnterpriseUnitDO.erpCode}, '%')
|
||||
<if test="erpCode != null and erpCode != ''">
|
||||
AND erp_code LIKE CONCAT('%', #{erpCode}, '%')
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.erpName != null and erpEnterpriseUnitDO.erpName != ''">
|
||||
AND erp_name LIKE CONCAT('%', #{erpEnterpriseUnitDO.erpName}, '%')
|
||||
<if test="erpName != null and erpName != ''">
|
||||
AND erp_name LIKE CONCAT('%', #{erpName}, '%')
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.pushStatus != null">
|
||||
AND push_status = #{erpEnterpriseUnitDO.pushStatus}
|
||||
<if test="pushStatus != null">
|
||||
AND push_status = #{pushStatus}
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.pushTimeFrom != null and erpEnterpriseUnitDO.pushTimeFrom != ''">
|
||||
AND DATE_FORMAT(push_time, '%Y-%m-%d') >= #{erpEnterpriseUnitDO.pushTimeFrom}
|
||||
<if test="pushTimeFrom != null and pushTimeFrom != ''">
|
||||
AND DATE_FORMAT(push_time, '%Y-%m-%d') >= #{pushTimeFrom}
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.pushTimeTo != null and erpEnterpriseUnitDO.pushTimeTo != ''">
|
||||
AND DATE_FORMAT(push_time, '%Y-%m-%d') <= #{erpEnterpriseUnitDO.pushTimeTo}
|
||||
<if test="pushTimeTo != null and pushTimeTo != ''">
|
||||
AND DATE_FORMAT(push_time, '%Y-%m-%d') <= #{pushTimeTo}
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.organizationId != null">
|
||||
AND organization_id = #{erpEnterpriseUnitDO.organizationId}
|
||||
<if test="organizationId != null">
|
||||
AND organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.createTimeFrom != null and erpEnterpriseUnitDO.createTimeFrom != ''">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') >= #{erpEnterpriseUnitDO.createTimeFrom}
|
||||
<if test="createTimeFrom != null and createTimeFrom != ''">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') >= #{createTimeFrom}
|
||||
</if>
|
||||
<if test="erpEnterpriseUnitDO.createTimeTo != null and erpEnterpriseUnitDO.createTimeTo != ''">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') <= #{erpEnterpriseUnitDO.createTimeTo}
|
||||
<if test="createTimeTo != null and createTimeTo != ''">
|
||||
AND DATE_FORMAT(create_time, '%Y-%m-%d') <= #{createTimeTo}
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user