| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?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\ConfigModel;
- 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
- }
- /**
- * 删除
- * @return array
- */
- public function delete()
- {
- $id = request()->get('id',0);
- $this->model->where(['mark'=>0])->delete();
- $result = parent::delete(); // TODO: Change the autogenerated stub
- $success = isset($result['success'])?$result['success']:false;
- if($id && $success){
- ConfigModel::where(['config_group_id'=>$id])->delete();
- }
- return $result;
- }
- }
|