1234567891011121314151617181920 |
- <?php
- namespace app\common\model;
- use think\Model;
- // 订单item
- class GoodsOrderItem extends Model
- {
- protected $name = 'store_order_item';
- public function getOrderItem($order_id)
- {
- $data = $this->where(['order_id'=>$order_id])->alias('o')
- ->field('o.id,o.num,o.sell_price,o.goods_spec,g.cover,g.name')
- ->leftJoin('StoreGoods g','o.goods_id = g.id')->select();
- return $data;
- }
- }
|