ConfigGroupService.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 LARAVEL研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: laravel开发员 <laravel.qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace App\Services\Common;
  12. use App\Models\ConfigGroupModel;
  13. use App\Services\BaseService;
  14. /**
  15. * 配置分组-服务类
  16. * @author laravel开发员
  17. * @since 2020/11/11
  18. * Class ConfigGroupService
  19. * @package App\Services\Common
  20. */
  21. class ConfigGroupService extends BaseService
  22. {
  23. /**
  24. * 构造函数
  25. * @author laravel开发员
  26. * @since 2020/11/11
  27. * ConfigGroupService constructor.
  28. */
  29. public function __construct()
  30. {
  31. $this->model = new ConfigGroupModel();
  32. }
  33. public function getList()
  34. {
  35. return parent::getList('',[['sort', 'asc']]); // TODO: Change the autogenerated stub
  36. }
  37. /**
  38. * 删除
  39. * @return array
  40. */
  41. public function delete()
  42. {
  43. $this->model->where(['mark'=>0])->where('update_time','<=', time() - env('DELETE_EXPIRED', 0))->delete();
  44. return parent::delete(); // TODO: Change the autogenerated stub
  45. }
  46. }