xieruidong 2 vuotta sitten
vanhempi
commit
67e00cb35e
1 muutettua tiedostoa jossa 22 lisäystä ja 1 poistoa
  1. 22 1
      application/common/service/RefundService.php

+ 22 - 1
application/common/service/RefundService.php

@@ -31,10 +31,31 @@ class RefundService extends BaseService {
     }
 
     /**
-     * @return OrderInfo
      */
     public function getOrderInfo($field=null)
     {
         return is_null($field)?$this->orderInfo:$this->orderInfo[$field];
     }
+
+    /**
+     * @return int
+     */
+    public function getNum()
+    {
+        if($this->num>$this->getOrderInfo('num')){
+            return $this->getOrderInfo('num');
+        }
+        return $this->num;
+    }
+
+    /**
+     * @return int
+     */
+    public function getNumInstall(): int
+    {
+        if($this->num_install>$this->getOrderInfo('num_install')){
+            return $this->getOrderInfo('num');
+        }
+        return $this->num_install;
+    }
 }