GoodsOrderItem.php 440 B

1234567891011121314151617181920
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. // 订单item
  5. class GoodsOrderItem extends Model
  6. {
  7. protected $name = 'store_order_item';
  8. public function getOrderItem($order_id)
  9. {
  10. $data = $this->where(['order_id'=>$order_id])->alias('o')
  11. ->field('o.id,o.num,o.sell_price,o.goods_spec,g.cover,g.name')
  12. ->leftJoin('StoreGoods g','o.goods_id = g.id')->select();
  13. return $data;
  14. }
  15. }