| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace app\common\utils;
- use app\common\dao\store\order\StoreOrderDao;
- /**
- * 业绩计算
- */
- class Pv
- {
- public $pv = [];
- public $storeOrderDao;
- public function __construct()
- {
- $this->pv = $this->getPvConfig();
- $this->storeOrderDao = new StoreOrderDao();
- }
- public function getPvConfig()
- {
- return [
- 1 => 2,
- 2 => 3
- ];
- }
- // 计算业绩
- public function countPv($userId = 0,$startTime = 0,$endTime = 0)
- {
- $orderData = $this->storeOrderDao->getDataForPv($userId = 0,$startTime = 0,$endTime = 0);
- $cartData = $this->getCartData();
- }
- // 获取订单数据
- public function getOrderData($userId,$startTime,$endTime){
- dd($this->storeOrderDao::getModel()::getDB());
- return [
- 1=>[],
- 2=>[]
- ];
- }
- public function getCartData(){
- return [
- ];
- }
- }
|