操盘手端 - 设备关联账号返工

This commit is contained in:
柳清爽
2025-04-17 10:15:26 +08:00
parent dbeb0aa559
commit 3912a4c489
5 changed files with 183 additions and 37 deletions

View File

@@ -5,7 +5,6 @@ use app\common\model\Device as DeviceModel;
use app\common\model\DeviceUser as DeviceUserModel;
use app\common\model\WechatFriend;
use app\cunkebao\controller\BaseController;
use think\facade\Request;
/**
* 设备管理控制器
@@ -23,12 +22,12 @@ class GetDeviceListV1Controller extends BaseController
$where = [];
// 关键词搜索同时搜索IMEI和备注
if (!empty($keyword = Request::param('keyword'))) {
if (!empty($keyword = $this->request->param('keyword'))) {
$where[] = ['exp', "d.imei LIKE '%{$keyword}%' OR d.memo LIKE '%{$keyword}%'"];
}
// 设备在线状态
if (is_numeric($alive = Request::param('alive'))) {
if (is_numeric($alive = $this->request->param('alive'))) {
$where['d.alive'] = $alive;
}
@@ -116,8 +115,8 @@ class GetDeviceListV1Controller extends BaseController
public function index()
{
try {
$page = (int)Request::param('page', 1);
$limit = (int)Request::param('limit', 10);
$page = (int)$this->request->param('page', 1);
$limit = (int)$this->request->param('limit', 10);
if ($this->getUserInfo('isAdmin') == 1) {
$where = $this->makeWhere();