xieruidong 2 年之前
父節點
當前提交
67e00cb35e
共有 1 個文件被更改,包括 22 次插入1 次删除
  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;
+    }
 }