|
@@ -7,7 +7,10 @@ class GoodsOrder extends Model
|
|
|
protected $name='store_order';
|
|
|
public function orderItem()
|
|
|
{
|
|
|
- return $this->hasMany('GoodsOrderItem','order_id');
|
|
|
+ return $this->hasMany('GoodsOrderItem','order_id')
|
|
|
+ ->alias('i')
|
|
|
+ ->field('i.*,g.cover goods_cover')
|
|
|
+ ->leftJoin('StoreGoods g','i.goods_id = g.id');
|
|
|
}
|
|
|
|
|
|
public function orderBill()
|