| | |
| | | b.delivery, |
| | | b.create_time, |
| | | b.update_time, |
| | | d.type_name as level_one, e.type_name as level_two |
| | | d.type_name as level_one, |
| | | e.type_name as level_two, |
| | | f.customer_abbreviation |
| | | from sd.order_detail as a |
| | | left join sd.`order` as b |
| | | on b.order_id = a.order_id |
| | | left join sd.customer as f |
| | | on f.id = b.customer_id |
| | | left join sd.product as c |
| | | on c.id = a.product_id |
| | | left join sd.basic_glass_type as d |
| | |
| | | order by id; |
| | | </select> |
| | | |
| | | <select id="getOrderProductByProductIds"> |
| | | select * |
| | | from sd.order_detail od |
| | | left join sd.product_detail pd on od.product_id = pd.prod_id |
| | | where od.order_id = #{orderId} and od.product_id=#{productId} |
| | | and pd.detail_type = 'glass' |
| | | group by od.product_id,pd.detail |
| | | </select> |
| | | |
| | | |
| | | |
| | | |