数智员工免密登录

This commit is contained in:
wong
2025-10-29 10:30:50 +08:00
parent 18a7055a4e
commit 175c78c3d0
6 changed files with 572 additions and 313 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace app\store\controller;
use think\Db;
class LoginController extends BaseController
{
public function index()
{
$deviceId = $this->request->param('deviceId', '');
if (empty($deviceId)) {
return errorJson('缺少必要参数');
}
$user = Db::name('user')->alias('u')
->join('device_user du','u.id = du.userId and u.companyId = du.companyId')
->join('device d','du.deviceId = d.id and u.companyId = du.companyId')
->where(['d.deviceImei' => $deviceId,'u.deleteTime' => 0,'du.deleteTime' => 0,'d.deleteTime'=> 0 ])
->find();
exit_data($user);
}
}