shichen 10 meses atrás
pai
commit
9639944a55
1 arquivos alterados com 54 adições e 0 exclusões
  1. 54 0
      app/common/utils/Pv.php

+ 54 - 0
app/common/utils/Pv.php

@@ -0,0 +1,54 @@
1
+<?php
2
+
3
+namespace app\common\utils;
4
+
5
+use app\common\dao\store\order\StoreOrderDao;
6
+
7
+/**
8
+ * 业绩计算
9
+ */
10
+class Pv
11
+{
12
+    public $pv = [];
13
+    public $storeOrderDao;
14
+    public function __construct()
15
+    {
16
+        $this->pv = $this->getPvConfig();
17
+        $this->storeOrderDao = new StoreOrderDao();
18
+    }
19
+
20
+    public function getPvConfig()
21
+    {
22
+        return [
23
+            1 => 2,
24
+            2 => 3
25
+        ];
26
+    }
27
+
28
+    // 计算业绩
29
+    public function countPv($userId = 0,$startTime = 0,$endTime = 0)
30
+    {
31
+        $orderData = $this->storeOrderDao->getDataForPv($userId = 0,$startTime = 0,$endTime = 0);
32
+
33
+
34
+
35
+        $cartData = $this->getCartData();
36
+    }
37
+
38
+    // 获取订单数据
39
+    public function getOrderData($userId,$startTime,$endTime){
40
+
41
+        dd($this->storeOrderDao::getModel()::getDB());
42
+
43
+        return [
44
+            1=>[],
45
+            2=>[]
46
+        ];
47
+    }
48
+
49
+    public function getCartData(){
50
+        return [
51
+
52
+        ];
53
+    }
54
+}