Commit 4fddb635 by 杨林龙

优化SQL查询接口

1 parent a1fbdc09
......@@ -37,9 +37,10 @@
from t_vehicle tv
inner join t_electric_fence_sns tefs on tv.vin = tefs.vin
inner join t_electric_fence tef on tef.id = tefs.fence_id
inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id
left join t_user tu on tu.id = tef.created_by
where tefs.fence_id = tef.id
and tef.biz_fence_type = 12 and tu.del_flag = 0
where tef.biz_fence_type = 12 and tu.del_flag = 0
and ttdv.del_flag = 0
<if test="keywords != null and keywords!='' ">
and (
tu.account like '%${keywords}%'
......
......@@ -35,10 +35,11 @@
from t_vehicle tv
inner join t_electric_fence_sns tefs on tv.vin = tefs.vin
inner join t_electric_fence tef on tef.id = tefs.fence_id
inner join t_trial_drive_vehicle ttdv on ttdv.vehicle_id = tv.id
left join t_user tu on tu.id = tef.created_by
where tefs.fence_id = tef.id
and tef.del_flag = 0
where tef.del_flag = 0
and tef.biz_fence_type = 12
and ttdv.del_flag = 0
<if test="keywords != null and keywords!='' ">
and (
tu.account like '%${keywords}%'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!