Commit 4ecff913 by zhanghj

V1.1.0--修复服务商重新指派同一技工,技工端已接单未预约超时,未收到订单超时通知bug

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@20822 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent ad486c5d
...@@ -93,6 +93,43 @@ ...@@ -93,6 +93,43 @@
AND so.active_status IN (6, 7) AND so.active_status IN (6, 7)
AND so.canceled = 1 AND so.canceled = 1
AND su.public_openId != '' AND su.public_openId != ''
UNION
SELECT
so.id,
so.order_sn,
so.car_owner,
so.car_owner_phone,
so.active_status,
so.create_time,
so.canceled,
so.mechanic_id,
so.expect_install_time,
so.reserve_install_time,
so.reassign_mechanic_time,
su.public_openId
FROM
sys_order so
LEFT JOIN sys_user su ON so.mechanic_id = su.id
WHERE
EXISTS (
SELECT
sowm.order_id,
sowm.msg_type,
sowm.recevier,
sowm.create_time AS sendMsgTime
FROM
sys_order_wechat_msg sowm
WHERE
so.id = sowm.order_id
AND
sowm.msg_type = 6
and so.reassign_mechanic_time > sowm.create_time
)
AND so.active_status IN (6, 7)
AND so.canceled = 1
AND su.public_openId != ''
) t1 ) t1
WHERE WHERE
CASE CASE
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!