|
|
@@ -76,10 +76,13 @@ class ProductBuying extends Model
|
|
|
}
|
|
|
|
|
|
//获取订单列表
|
|
|
- public static function getBuyingList(int $productId)
|
|
|
+ public static function getBuyingList(int $uid, string $lan, int $page)
|
|
|
{
|
|
|
-
|
|
|
- return self::where('product_id', $productId)->where('status', self::Normal)->field('id,min_price')->order('id desc')->select();
|
|
|
+ return self::alias('a')->where('user_id', $uid)
|
|
|
+ ->join('product_list p', 'a.product_id = p.id')
|
|
|
+ ->field('a.*,p.' . $lan . '_name as name,p.thum')
|
|
|
+ ->order('id desc')
|
|
|
+ ->paginate($page);
|
|
|
}
|
|
|
|
|
|
public function getCreateTimeTextAttr($value, $data)
|