Commit 0baed9e9 by 杨林龙

优化围栏管理列表查询

1 parent ea2eafda
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
left join t_user tu on tu.id = tef.created_by left join t_user tu on tu.id = tef.created_by
left join t_trial_drive_shop ttds on ttds.created_by = tu.id and ttds.del_flag = 0 left join t_trial_drive_shop ttds on ttds.created_by = tu.id and ttds.del_flag = 0
left join t_electric_fence_copy tefc on tefc.fence_id = tef.id left join t_electric_fence_copy tefc on tefc.fence_id = tef.id
left join (select * from t_approval where id in (select MAX(id) from t_approval group by biz_id,biz_type)) ta on left join (select * from t_approval where id in (select MAX(id) from t_approval where del_flag = 0 group by biz_id,biz_type)) ta on
ta.biz_id = tefc.id and ta.biz_type = 1 ta.biz_id = tefc.id and ta.biz_type = 1
where tef.del_flag = 0 where tef.del_flag = 0
and tef.biz_fence_type = 12 and tef.biz_fence_type = 12
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!