- 按 docs/renew-code-comment.md 将 PHP 文件头改为带边框的 Author 注释\n- 注释中的 crmeb.com 替换为 uj345.cn(代码字符串中的外链未改)\n- 新增 docs/renew-code-comment.md 说明 Made-with: Cursor
47 lines
1.2 KiB
PHP
47 lines
1.2 KiB
PHP
<?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('删除成功');
|
|
}
|
|
}
|