IMessageCenterService.java 1.05 KB
package cn.fw.hestia.sdk.api;

import cn.fw.data.base.domain.common.Message;
import cn.fw.hestia.sdk.params.TemplateMessageParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * @author : kurisu
 * @className : IMessageCenterService
 * @description :
 * @date: 2021-09-23 15:27
 */
@FeignClient(value = "fw-hestia", path = "/api/hestia/mc")
public interface IMessageCenterService {

    /**
     * 发送模板消息
     *
     * @param templateMessageParam
     * @return
     */
    @PostMapping("/send")
    Message<Long> send(@Valid @RequestBody TemplateMessageParam templateMessageParam);

    /**
     * 撤回消息
     *
     * @param sceneToken
     * @return
     */
    @DeleteMapping("/send")
    Message<Boolean> revokeMessage(@NotNull(message = "Token不能为空") Long sceneToken);
}