Commit 984eb237 by levphon

V1.9.0 bug修复

1 parent 0e45da87
......@@ -93,25 +93,26 @@
tv.owner_name as ownerName,
tv.license_plate licensePlate,
tw.partner_order_no workOrderNo,
group_concat(distinct td.sn order by td.source desc) as sns,
group_concat(distinct td.source order by td.source desc) as sources,
group_concat(td.sn order by td.source desc) as sns,
group_concat(td.source order by td.source desc) as sources,
tcusd.enable_status as sharedStatus,
TIMESTAMPDIFF(MINUTE, now(), tcusd.expiration_date) as sharedDiffMin,
tcusd.permit_type as permitType,
group_concat(distinct tvs.receiver_id) as receiverIds
ltvs.receiverIds
from t_vehicle tv
left join t_vehicle_device tvd on tv.id = tvd.vehicle_id
left join t_device td on td.sn = tvd.sn
left join t_workorder tw on tw.id = tv.workorder_id
left join t_cust_user_shared_data tcusd on tcusd.content_id = tv.id and tcusd.content_type = 0
left join t_vehicle_shared tvs on tcusd.content_id = tv.id and tcusd.id = tvs.shared_id
where tcusd.del_flag = 0
left join (select shared_id, group_concat(receiver_id) receiverIds from t_vehicle_shared tvs where tvs.del_flag = 0 group by shared_id) ltvs on tcusd.id = ltvs.shared_id
where tv.del_flag = 0 and tvd.del_flag = 0 and tvd.bind_status = 1
and tv.created_by is not null
and tcusd.del_flag = 0
and tcusd.id is not null
and (
tcusd.created_by = #{userId}
or
tvs.receiver_id = #{userId}
find_in_set(ltvs.receiverIds,#{userId})
)
<if test="term != null and term !=''">
and (
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!