Commit 10f60856 authored by zhengyi's avatar zhengyi

报价单列表查询sql优化

parent 4f2faa80
...@@ -107,13 +107,13 @@ public interface OfferMapper extends BaseMapperX<OfferDO> { ...@@ -107,13 +107,13 @@ public interface OfferMapper extends BaseMapperX<OfferDO> {
"if(#{lang} = 0, dst.title_zh , dst.title_en) as dest_warehouse_name, ", "if(#{lang} = 0, dst.title_zh , dst.title_en) as dest_warehouse_name, ",
"line.transport_type ", "line.transport_type ",
"from ecw_offer o ", "from ecw_offer o ",
"left join ecw_customer_contacts cc on (o.relation = 1 and cc.id = o.consignor_id) or (o.relation = 2 and cc.id = o.consignee_id) ", "join ecw_customer_contacts cc on (o.relation = 1 and cc.id = o.consignor_id) or (o.relation = 2 and cc.id = o.consignee_id) ",
"left join ecw_customer user on user.id = o.relation_id ", "join ecw_customer user on user.id = o.relation_id ",
"left join system_user u on u.id = o.follow_up_salesman_id ", "left join system_user u on u.id = o.follow_up_salesman_id ",
"left join ecw_region s on o.objective_id = s.id ", "join ecw_region s on o.objective_id = s.id ",
"left join ecw_warehouse_line line on o.line_id = line.id ", "join ecw_warehouse_line line on o.line_id = line.id ",
"left join ecw_warehouse st on line.start_warehouse_id = st.id ", "join ecw_warehouse st on line.start_warehouse_id = st.id ",
"left join ecw_warehouse dst on line.dest_warehouse_id = dst.id ", "join ecw_warehouse dst on line.dest_warehouse_id = dst.id ",
"left join ecw_channel l on o.channel_id = l.channel_id ", "left join ecw_channel l on o.channel_id = l.channel_id ",
"where o.deleted = 0", "where o.deleted = 0",
...@@ -241,13 +241,13 @@ public interface OfferMapper extends BaseMapperX<OfferDO> { ...@@ -241,13 +241,13 @@ public interface OfferMapper extends BaseMapperX<OfferDO> {
"<script>", "<script>",
"select count(1)", "select count(1)",
"from ecw_offer o ", "from ecw_offer o ",
"left join ecw_customer_contacts cc on (o.relation = 1 and cc.id = o.consignor_id) or (o.relation = 2 and cc.id = o.consignee_id) ", "join ecw_customer_contacts cc on (o.relation = 1 and cc.id = o.consignor_id) or (o.relation = 2 and cc.id = o.consignee_id) ",
"left join ecw_customer user on user.id = o.relation_id ", "join ecw_customer user on user.id = o.relation_id ",
"left join system_user u on u.id = o.follow_up_salesman_id ", "left join system_user u on u.id = o.follow_up_salesman_id ",
"left join ecw_region s on o.objective_id = s.id ", "join ecw_region s on o.objective_id = s.id ",
"left join ecw_warehouse_line line on o.line_id = line.id ", "join ecw_warehouse_line line on o.line_id = line.id ",
"left join ecw_warehouse st on line.start_warehouse_id = st.id ", "join ecw_warehouse st on line.start_warehouse_id = st.id ",
"left join ecw_warehouse dst on line.dest_warehouse_id = dst.id ", "join ecw_warehouse dst on line.dest_warehouse_id = dst.id ",
"left join ecw_channel l on o.channel_id = l.channel_id ", "left join ecw_channel l on o.channel_id = l.channel_id ",
"where o.deleted = 0", "where o.deleted = 0",
//startWarehouseIds //startWarehouseIds
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment