wlzboy
1 天以前 08f95b2f159b56fa3bd4f4b348855989de8aa456
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
64
package com.ruoyi.system.service;
 
import com.ruoyi.system.domain.SysTask;
import java.util.List;
 
/**
 * 短信发送服务接口
 * 
 * @author ruoyi
 * @date 2025-12-07
 */
public interface ISmsService {
 
    /**
     * 检查短信服务是否启用
     * 
     * @return true=启用, false=禁用
     */
    boolean isEnabled();
 
    /**
     * 发送短信
     * 
     * @param phone 手机号
     * @param content 短信内容
     * @return 是否发送成功
     */
    boolean sendSms(String phone, String content);
 
    /**
     * 批量发送短信
     * 
     * @param phones 手机号列表
     * @param content 短信内容
     * @return 成功发送的数量
     */
    int sendSmsBatch(List<String> phones, String content);
 
    /**
     * 发送任务分配通知短信
     * 
     * @param taskId 任务ID
     * @param userIds 用户ID列表
     * @param excludeUserId 排除的用户ID(可选,如创建人)
     * @return 成功发送的数量
     */
    int sendTaskAssignSms(Long taskId, List<Long> userIds, Long excludeUserId);
 
    /**
     * 发送任务分配通知短信(不排除任何用户)
     * 
     * @param taskId 任务ID
     * @param userIds 用户ID列表
     * @return 成功发送的数量
     */
    int sendTaskAssignSms(Long taskId, List<Long> userIds);
 
    /**
     * 查询短信余额
     * 
     * @return 余额信息
     */
    String getBalance();
}