Files
huangjingfen/pro_v3.5.1/app/controller/api/v2/user/UserSearch.php

47 lines
1.2 KiB
PHP
Raw Normal View History

<?php
// +----------------------------------------------------------------------
// | Author: ScottPan Team
// +----------------------------------------------------------------------
namespace app\controller\api\v2\user;
use app\services\user\UserSearchServices;
use think\annotation\Inject;
use think\Request;
/**
* Class UserSearch
* @package app\api\controller\v2\user
*/
class UserSearch
{
/**
* @var UserSearchServices
*/
#[Inject]
protected UserSearchServices $services;
/**
* @param Request $request
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 等风来
* @email 136327134@qq.com
* @date 2023/9/19
*/
public function getUserSearchList(Request $request)
{
return app('json')->successful($this->services->getUserList((int)$request->uid()));
}
public function cleanUserSearch(Request $request)
{
$uid = (int)$request->uid();
$this->services->update(['uid' => $uid], ['is_del' => 1]);
return app('json')->successful('删除成功');
}
}