1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\common\model\TemperatureDevice;
- use app\hander\HelpHander;
- use app\temperature\controller\Push;
- use think\App;
- require_once $_SERVER['DOCUMENT_ROOT'] . '/../vendor/wenkong/TemperatureDevice.php';
- class Temperature extends Base
- {
- public function __construct(App $app) {
- parent::__construct($app);
- $this->api = new Push($this->app);
- }
- public function lists(){
- $res = $this->api->getDeviceData();
- $page = input('page/d',1);
- $size = input('size/d',10);
- $groupId = input('groupId/d',0);
- $m = new TemperatureDevice();
- $list =$m->getList($page,$size,$this->orgId,$this->userId,$groupId);
- HelpHander::success($list);
- }
- public function getGroup(){
- $m = new TemperatureDevice();
- $page = input('page/d',1);
- $size = input('size/d',10);
- $list =$m->getGroup($this->orgId,$this->userId,$page,$size);
- HelpHander::success($list);
- }
- }
|