package com.sky.ioc.controller.life;

import com.sky.ioc.message.MQTTSubsribe;
import com.sky.ioc.tool.ReturnMsg;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.xml.transform.Result;

/** 智享生活
 * @author LunCe*/
@Slf4j
@RestController
@RequestMapping("/life")
public class LifeController {

    @Autowired
    MQTTSubsribe mqtt;


  //  @ApiOperation(value = "订阅mqtt---测试")
    @GetMapping("mqtt")
    public ReturnMsg insertByMq(){
        mqtt.start("notice/device/status/safety/camera");
        return ReturnMsg.ok();
    }


//
//
//    @RequestMapping(method = RequestMethod.POST,value = "aaaaa")
//    public String aaaaa(){
//        return null;
//    }
//    @PostMapping("bbbbb")
//    public String bbbb(){
//        return null;
//    }

}
