|
@@ -830,6 +830,16 @@ class StoreOrder extends BaseModel
|
|
|
|
|
|
}
|
|
|
|
|
|
+ public static function point()
|
|
|
+ {
|
|
|
+ return self::hasOne(SystemStorePoint::class, 'id', 'point_id')->field('*');
|
|
|
+ }
|
|
|
+
|
|
|
+ public static function store()
|
|
|
+ {
|
|
|
+ return self::hasOne(SystemStore::class, 'id', 'store_id')->field('*');
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
* 获取订单详情
|
|
|
* @param $uid
|
|
@@ -841,7 +851,7 @@ class StoreOrder extends BaseModel
|
|
|
*/
|
|
|
public static function getUserOrderDetail($uid, $key)
|
|
|
{
|
|
|
- return self::where('order_id|unique', $key)->where('uid', $uid)->where('is_del', 0)->find();
|
|
|
+ return self::with(['store', 'point'])->where('order_id|unique', $key)->where('uid', $uid)->where('is_del', 0)->find();
|
|
|
}
|
|
|
|
|
|
|