Commit ed8fceee by 黄小葱

Merge branch 'master' of 192.168.3.233:eshiled-new/ne-shield-trialdrive-admin

2 parents edaada13 7b87bf7d
......@@ -88,19 +88,15 @@
FROM
t_approval t5
LEFT JOIN t_vehicle t1 ON t1.ID = t5.biz_id
LEFT JOIN t_vehicle_device t2 ON t1.id = t2.vehicle_id
LEFT JOIN t_electric_fence_sns t3 ON t2.sn = t3.sn
LEFT JOIN t_trial_drive_shop t4 ON t3.fence_id = t4.fence_id
LEFT JOIN t_trial_drive_shop t4 ON t1.created_by = t4.created_by
left join t_electric_fence t7 on t4.fence_id=t7.id
LEFT JOIN t_dict_data t6 ON t5.biz_type = t6.dict_value
WHERE
t1.del_flag = 0
AND t6.dict_type = 'approval_status'
AND t2.bind_status = 1
and t5.status in (1,2,3)
and t5.biz_type=2
GROUP BY
t5.id
ORDER BY t5.updated_date desc
<if test="search.approvalStatus !=null and search.approvalStatus != ''">
and t5.status=#{search.status}
</if>
......@@ -136,6 +132,7 @@
AND APP.biz_type=1 and shop_name is not null
GROUP BY
app.id
ORDER BY app.updated_date desc
<if test="search.approvalStatus !=null and search.approvalStatus != ''">
and app.status=#{search.approvalStatus}
</if>
......
......@@ -103,7 +103,7 @@
<include refid="Base_Column_List"/>
from t_trial_drive_shop ttds
where ttds.del_flag = 0
and ttds.id = #{id}
and ttds.created_by = #{id}
</select>
<update id="logicDeleteById">
......
......@@ -59,14 +59,11 @@
t5.id
FROM
t_vehicle t1
LEFT JOIN (select * from t_approval ORDER BY created_date desc) t5 ON (t1.ID = t5.biz_id AND t5.biz_type=2)
LEFT JOIN t_vehicle_device t2 ON t1.id = t2.vehicle_id
LEFT JOIN t_electric_fence_sns t3 ON t2.sn = t3.sn
LEFT JOIN t_trial_drive_shop t4 ON t3.fence_id = t4.fence_id
LEFT JOIN (select * from (select * from t_approval ORDER BY id desc)t group by t.biz_id,t.biz_type) t5 ON (t1.ID = t5.biz_id AND t5.biz_type=2)
LEFT JOIN t_trial_drive_shop t4 ON t1.created_by = t4.created_by
left join t_electric_fence t7 on t4.fence_id=t7.id
WHERE
t1.del_flag = 0
AND t2.bind_status = 1
and t4.shop_name is not null
<if test="search.approvalStatus !=null and search.approvalStatus != ''">
and t5.status=#{search.approvalStatus}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!