package com.mortals.xhx.busiz.web;

import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.common.pdu.device.DeviceReq;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("/api/device")
public class DeviceCallbackController {



    @PostMapping("callback")
    @UnAuth
    public Rest<String> callback(@RequestBody DeviceReq deviceReq) {
        log.info("【设备通知数据】【请求体】-->  " + JSONObject.toJSONString(deviceReq));

        return Rest.ok();
    }



}
