作者 董瑞恩
1 个管道 的构建 通过 耗费 0 秒

interface

@@ -69,9 +69,13 @@ class AesController extends HomeBaseController{ @@ -69,9 +69,13 @@ class AesController extends HomeBaseController{
69 $MACAddress=$this->request->param('MACAddress'); 69 $MACAddress=$this->request->param('MACAddress');
70 $strKey=Db::name('equipment')->where('mac_address',$MACAddress)->find(); 70 $strKey=Db::name('equipment')->where('mac_address',$MACAddress)->find();
71 if (!empty($strKey)){ 71 if (!empty($strKey)){
72 - $key="ff0ca2".$MACAddress."5500ef";  
73 - $lockKey=$this->ToArray($key);  
74 - $this->apiResponse(200,'success',$lockKey); 72 + if ($strKey['electricity']==0){
  73 + $this->apiResponse(302,'设备电量低');
  74 + }else{
  75 + $key="ff0ca2".$MACAddress."5500ef";
  76 + $lockKey=$this->ToArray($key);
  77 + $this->apiResponse(200,'success',$lockKey);
  78 + }
75 }else{ 79 }else{
76 $this->apiResponse(301,'MAC地址未认证'); 80 $this->apiResponse(301,'MAC地址未认证');
77 } 81 }