package cn.axzo.msg.center.inside.notices.controller.msg;

import cn.axzo.msg.center.api.MessageAPIV4;
import cn.axzo.msg.center.api.request.v4.MessageSendRequestV4;
import cn.axzo.msg.center.api.response.v3.MessageSendRespV3;
import cn.axzo.msg.center.inside.notices.service.MessageServiceV4;
import cn.axzo.trade.web.annotation.EnableResponseAdvice;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yanglin
 */
@Slf4j
@RestController
@RequiredArgsConstructor
public class MessageAPIV4Controller implements MessageAPIV4 {

    private final MessageServiceV4 messageServiceV4;

    @Override
    @EnableResponseAdvice(enable = false)
    public MessageSendRespV3 send(MessageSendRequestV4 request) {
        log.info("MessageAPIV4Controller.send req={}", request);
        return messageServiceV4.send(request);
    }

}