数智员工免密登录
This commit is contained in:
25
Server/application/store/controller/LoginController.php
Normal file
25
Server/application/store/controller/LoginController.php
Normal 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);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user