订单时间区间查询修改
This commit is contained in:
parent
b70bc3cddc
commit
bd97f4a286
|
|
@ -99,7 +99,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND hh.order_status = #{orderStatus}
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null ">
|
||||
AND hh.rent_begin_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
AND ((hh.rent_begin_time BETWEEN #{startTime} AND #{endTime})
|
||||
OR (hh.rent_end_time BETWEEN #{startTime} AND #{endTime})
|
||||
OR (hh.rent_begin_time < #{startTime} AND hh.rent_end_time > #{endTime}))
|
||||
</if>
|
||||
<if test="czcompanyName != null and czcompanyName != ''">
|
||||
AND c.company_name like concat('%',#{czcompanyName},'%')
|
||||
|
|
@ -169,8 +171,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
sd1.dept_name AS companyName
|
||||
FROM
|
||||
sys_dept sd
|
||||
JOIN ( SELECT SUBSTRING_INDEX( ancestors, ',', 1 ) AS first_ancestor, dept_id FROM sys_dept ) AS subquery ON sd.dept_id = subquery.dept_id
|
||||
LEFT JOIN sys_dept sd1 ON sd1.parent_id = subquery.first_ancestor
|
||||
JOIN ( SELECT SUBSTRING_INDEX( ancestors, ',', 2 ) AS first_ancestor, dept_id FROM sys_dept ) AS subquery ON sd.dept_id = subquery.dept_id
|
||||
LEFT JOIN sys_dept sd1 ON sd1.dept_id = subquery.first_ancestor
|
||||
) dept ON dept.deptId = su.dept_id
|
||||
WHERE
|
||||
mt.del_flag = '0' and moi.order_id = #{orderId} limit 1
|
||||
|
|
@ -201,5 +203,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND bfi.file_type = 0
|
||||
WHERE
|
||||
moi.order_id = #{orderId}
|
||||
GROUP BY hh.ma_id
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue