StatisticalPresentationService.php 939 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: yunzhong
  5. * Date: 2018/10/16
  6. * Time: 15:35
  7. */
  8. namespace app\frontend\modules\withdraw\services;
  9. use app\frontend\modules\withdraw\models\Withdraw;
  10. class StatisticalPresentationService
  11. {
  12. //统计提现次数
  13. public function statisticalPresentation($type){
  14. $start = strtotime(date("Y-m-d"),time());
  15. $end = $start+60*60*24;
  16. $today_withdraw_count = Withdraw::successfulWithdrawals($type,$start,$end);
  17. \Log::debug($type.'收入提现次数',$today_withdraw_count);
  18. if(app('plugins')->isEnabled('supplier')){
  19. \Log::debug($type.'供应商提现次数',\Yunshop\Supplier\supplier\models\SupplierWithdraw::successfulWithdrawals($type,$start,$end));
  20. $today_withdraw_count += \Yunshop\Supplier\supplier\models\SupplierWithdraw::successfulWithdrawals($type,$start,$end);
  21. }
  22. return $today_withdraw_count;
  23. }
  24. }