| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- // +----------------------------------------------------------------------
- // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
- // +----------------------------------------------------------------------
- // | 版权所有 2017~2021 LARAVEL研发中心
- // +----------------------------------------------------------------------
- // | 官方网站: http://www.laravel.cn
- // +----------------------------------------------------------------------
- // | Author: laravel开发员 <laravel.qq.com>
- // +----------------------------------------------------------------------
- namespace App\Services\Common;
- use App\Models\ConfigGroupModel;
- use App\Models\ActionLogModel;
- use App\Services\BaseService;
- /**
- * 配置分组-服务类
- * @author laravel开发员
- * @since 2020/11/11
- * Class ConfigGroupService
- * @package App\Services\Common
- */
- class ConfigGroupService extends BaseService
- {
- /**
- * 构造函数
- * @author laravel开发员
- * @since 2020/11/11
- * ConfigGroupService constructor.
- */
- public function __construct()
- {
- $this->model = new ConfigGroupModel();
- }
- public function getList()
- {
- return parent::getList([],[['sort','desc']]); // TODO: Change the autogenerated stub
- }
- /**
- * 删除七天之前标记软删除的数据
- */
- public function delete()
- {
- // 设置日志标题
- ActionLogModel::setRecord(session('userId'), ['type' => 1, 'title' => "删除配置分组信息", 'content' => json_encode(request()->post(), 256), 'module' => 'admin']);
- ActionLogModel::record();
- $this->model->where('mark', 0)->where('update_time', '<=', time() - 7 * 86400)->delete();
- return parent::delete();
- }
- }
|