Kirin hace 7 meses
padre
commit
6b9fb9c18c

+ 1 - 2
app/model/user/AwardIntegral.php

@@ -62,7 +62,7 @@ class AwardIntegral extends BaseModel
 
     public function user_order()
     {
-        return $this->hasOne(StoreOrder::class, 'id', 'order_id');
+        return $this->hasOne(StoreOrder::class, 'id', 'order_id')->field('order_id');
     }
 
     /**
@@ -118,7 +118,6 @@ class AwardIntegral extends BaseModel
     }
 
 
-
     /**
      * 门店ID
      * @param $query

+ 1 - 1
app/services/user/AwardIntegralServices.php

@@ -52,7 +52,7 @@ class AwardIntegralServices extends BaseServices
      * @param int $limit
      * @return array
      */
-    public function getIntegralList(array $where, string $field = '*', int $limit = 0, array $with = [])
+    public function getIntegralList(array $where, string $field = '*', int $limit = 0, array $with = ['user_order'])
     {
         $whereData = $where;
         if ($limit) {