Files
huangjingfen/pro_v3.5.1/app/controller/api/v2/user/UserSearch.php
panchengyong c1e74d8e68 chore(php): 统一 ScottPan 文件头与注释域名替换
- 按 docs/renew-code-comment.md 将 PHP 文件头改为带边框的 Author 注释\n- 注释中的 crmeb.com 替换为 uj345.cn(代码字符串中的外链未改)\n- 新增 docs/renew-code-comment.md 说明

Made-with: Cursor
2026-03-29 11:22:58 +08:00

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('删除成功');
}
}