package com.hzs.third.mqcall.provider;

import com.hzs.common.core.domain.R;
import com.hzs.third.mq.IDelayedMessageApi;
import com.hzs.third.mq.dto.DelayedMessageDTO;
import com.hzs.third.mqcall.service.IDelayedMessageService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description:
 * @Author: sui q
 * @Time: 2023/3/9 15:22
 * @Classname: DelayedMessageProvider
 * @PackageName: com.hzs.third.mqcall.provider
 */
@DubboService
public class DelayedMessageProvider implements IDelayedMessageApi {

    @Autowired
    private IDelayedMessageService delayedMessageService;

    @Override
    public R<Boolean> sendDelayedMessage(DelayedMessageDTO delayedMessageDTO) {
        delayedMessageService.sendDelayedMessage(delayedMessageDTO);
        return R.ok();
    }
}
