AdminMessageService.java
1.62 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
52
53
54
55
56
57
58
59
60
61
62
63
package com.diligrp.rider.service;
import com.diligrp.rider.entity.RiderMessageTemplate;
import java.util.List;
import java.util.Map;
/**
* 管理端消息服务
*/
public interface AdminMessageService {
/**
* 发送消息给指定骑手
*
* @param cityId 城市ID
* @param riderId 骑手ID
* @param type 消息类型
* @param title 标题
* @param content 内容
* @param bizType 业务类型
* @param bizId 业务ID
*/
void sendToRider(Long cityId, Long riderId, Integer type, String title, String content, String bizType, Long bizId);
/**
* 群发消息(城市内所有骑手)
*
* @param cityId 城市ID
* @param type 消息类型
* @param title 标题
* @param content 内容
*/
void broadcastToCity(Long cityId, Integer type, String title, String content);
/**
* 查询消息列表(管理端)
*
* @param cityId 城市ID
* @param riderId 骑手ID(可选)
* @param type 消息类型(可选)
* @param page 页码
* @return 分页数据
*/
Map<String, Object> listMessages(Long cityId, Long riderId, Integer type, Integer page);
/**
* 获取模板列表
*
* @return 模板列表
*/
List<RiderMessageTemplate> listTemplates();
/**
* 根据模板发送消息(供业务代码调用)
*
* @param cityId 城市ID
* @param riderId 骑手ID
* @param bizType 业务类型
* @param params 模板参数
*/
void sendByTemplate(Long cityId, Long riderId, String bizType, Map<String, Object> params);
}