package com.yida.data.device.consume.controller.out;

import com.yida.data.common.core.entity.FebsResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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;

import java.util.Map;

/**
 * 消费机 Controller(不鉴权)
 *
 * @author ZYJ
 * @date 2023/3/10
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("out/consume")
@Api(tags = "消费机api")
public class OutConsumeController {

    @ApiOperation("海普天消费结果通知")
    @PostMapping("/consumeNotify")
    public FebsResponse consumeNotify(@RequestBody Map<String, Object> res) {
        log.info("结果信息: {}", res);
        return new FebsResponse().put("code", "SUCCESS");
    }

}
