ConfigurationService.php 919 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Services;
  3. use App\CarType;
  4. use App\Configuration;
  5. use App\Traits\ServiceAppAop;
  6. use Illuminate\Support\Facades\Cache;
  7. class ConfigurationService
  8. {
  9. use ServiceAppAop;
  10. protected $modelClass=Configuration::class;
  11. public function getEnquiryTime()
  12. {
  13. return Cache::remember('询价延时时间',null,function (){
  14. return Configuration::query()->where('name','询价延时时间')->value('value');
  15. });
  16. }
  17. public function getReceiveTime()
  18. {
  19. return Cache::remember('接单延时时间',null,function (){
  20. return Configuration::query()->where('name','接单延时时间')->value('value');
  21. });
  22. }
  23. public function getPriceCoefficient()
  24. {
  25. return Cache::remember('价格系数',null,function (){
  26. return Configuration::query()->where('name','价格系数')->value('value');
  27. });
  28. }
  29. }