IMessageCenterService.java
1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package cn.fw.hestia.sdk.api;
import cn.fw.data.base.domain.common.Message;
import cn.fw.hestia.sdk.params.TemplateMessageParam;
import cn.fw.hestia.sdk.params.ValidList;
import cn.fw.hestia.sdk.result.SendResult;
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;
import java.util.List;
/**
* @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<SendResult> send(@Valid @RequestBody TemplateMessageParam templateMessageParam);
/**
* 批量发送模板消息
*
* @param paramList
* @return
*/
@PostMapping("/sendBatch")
Message<List<SendResult>> sendBatch(@RequestBody @Valid ValidList<TemplateMessageParam> paramList);
/**
* 撤回消息
*
* @param sceneToken
* @return
*/
@DeleteMapping("/send")
Message<Boolean> revokeMessage(@NotNull(message = "Token不能为空") Long sceneToken);
}