Commit 50e32627 by 杨林龙

Merge remote-tracking branch 'origin/master'

2 parents 205d6b01 05bde192
......@@ -168,7 +168,8 @@
tvd.created_date installedTime
from t_vehicle tv
inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id and tvd.bind_status = 1 and tvd.del_flag = 0 and tvd.trial_type = 1
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id and tvd.bind_status = 1 and tvd.del_flag = 0 and
tvd.trial_type = 1
left join t_user tu on tv.created_by = tu.id and tu.del_flag = 0
left join t_trial_drive_shop ttds on tu.id = ttds.created_by and ttds.del_flag = 0
where tv.del_flag = 0
......@@ -191,7 +192,8 @@
tvd.sn sns
from t_vehicle tv
inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id and tvd.bind_status = 1 and tvd.del_flag = 0 and tvd.trial_type = 1
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id and tvd.bind_status = 1 and tvd.del_flag = 0 and
tvd.trial_type = 1
left join t_user tu on tv.created_by = tu.id and tu.del_flag = 0
left join t_trial_drive_shop ttds on tu.id = ttds.created_by and ttds.del_flag = 0
where tv.del_flag = 0
......@@ -253,6 +255,7 @@
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
where tv.del_flag = 0
and tvd.bind_status = 1
and tv.created_by is not null
<if test="userIds != null and userIds.size() > 0">
and tv.created_by in
<foreach collection="userIds" separator="," open="(" close=")" item="item">
......@@ -302,7 +305,8 @@
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn = tvd.sn
left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on ddf.vehicle_id = tv.id and ddf.sn = td.sn
left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on
ddf.vehicle_id = tv.id and ddf.sn = td.sn
where tv.del_flag = 0
and tvd.bind_status = 1
<if test="keywords != null and keywords !=''">
......@@ -346,7 +350,8 @@
from t_vehicle tv
left join t_vehicle_device tvd on tvd.vehicle_id = tv.id
left join t_device td on td.sn = tvd.sn
left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on ddf.vehicle_id = tv.id and ddf.sn = td.sn
left join (select * from (SELECT * FROM t_device_freq order by created_date desc) temp GROUP BY temp.sn) ddf on
ddf.vehicle_id = tv.id and ddf.sn = td.sn
where tv.del_flag = 0
and tvd.bind_status = 1
<if test="keywords != null and keywords !=''">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!