提交其他文件

This commit is contained in:
2026-03-14 16:20:49 +08:00
parent a227deaecd
commit 0a19b334f8
1385 changed files with 73568 additions and 0 deletions

View File

@ -0,0 +1,61 @@
<?php
namespace app\storeapi\controller;
use app\storeapi\logic\DeviceLogic;
use app\storeapi\validate\DeviceValidate;
class DeviceController extends BaseApiController
{
public array $notNeedLogin = ['deviceOff_On'];
/**
* @return void
* 门店设备列表
*/
public function deviceList(){
$params = (new DeviceValidate())->post()->goCheck('deviceList');
$result = DeviceLogic::getDeviceLists($params);
if ($result === false) {
return $this->fail(DeviceLogic::getError());
}
return $this->success('', $result, 1, 1);
}
/**
* @return void
* 空开控制
*/
public function deviceOff_On(){
$params = (new DeviceValidate())->post()->goCheck('deviceOff_On');
$result = DeviceLogic::deviceOff_On($params);
if ($result === false) {
return $this->fail(DeviceLogic::getError());
}
return $this->success('', $result, 1, 1);
}
/**
* @return void
* 门锁控制
*/
public function lockOff_On(){
$params = (new DeviceValidate())->post()->goCheck('lockOff_On');
$result = DeviceLogic::lockOff_On($params);
if ($result === false) {
return $this->fail(DeviceLogic::getError());
}
return $this->success('', $result, 1, 1);
}
}