package org.dromara.elevator.controller.message;

import lombok.RequiredArgsConstructor;
import org.dromara.elevator.constant.RespConstant;
import org.dromara.elevator.domain.message.DevFaultReq;
import org.dromara.elevator.service.message.FaultService;
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;

/**
 * 故障消息推送
 *
 * @author ym
 * @version 1.0.0
 * @date 2024-08-21 16:01
 */
@RestController
@RequestMapping("/v5.0/api")
@RequiredArgsConstructor
public class FaultController {

    private final FaultService faultService;


    @PostMapping("/pushDevFault.do")
    public String pushDevFault(@RequestBody DevFaultReq req) {
        faultService.pushDevFault(req);
        return RespConstant.MSG_OK;
    }


}
