code: public function delGroup(Request $request)
      {
          $group_id = $request->param('group_id');
          if (empty($group_id)) {
              return $this->error('群组ID为空');
          }
          
          // 是否有用户
          $map = [
              'group_id' => $group_id
          ];
          $record = MemberLogic::model()->where($map)
              ->field('id')
              ->find();
          if ($record) {
              return $this->error('请先移动或删除该群组下的用户');
          }
          
          // 删除群组
          MemberGroupLogic::model()->del($group_id);
          
          return $this->success('删除群组成功');
      }
docs: 删除群组
  
  @param Request $request
  @return mixed