Pv.php 955 B

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