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

import cn.axzo.msg.center.api.MessageAPIV3;
import cn.axzo.msg.center.api.request.v3.MessageSendReqV3;
import cn.axzo.msg.center.api.response.v3.MessageSendRespV3;
import cn.axzo.msg.center.inside.notices.service.MessageServiceV3;
import cn.azxo.framework.common.model.CommonResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yanglin
 */
@Slf4j
@RestController
@RequiredArgsConstructor
public class MessageAPIV3Controller implements MessageAPIV3 {

    private final MessageServiceV3 messageServiceV3;

    @Override
    public CommonResponse<MessageSendRespV3> send(MessageSendReqV3 req) {
        return CommonResponse.success(messageServiceV3.send(req));
    }

}