liu
2 天以前 47dd1ecaf0aafa66b9c39fff9c91abc1c611b02c
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
package cn.iocoder.yudao.module.wxcp.service.notice;
 
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.system.controller.admin.storage.vo.SystemStorageBlobRespVO;
import cn.iocoder.yudao.module.wxcp.controller.admin.notice.vo.WxCpNoticePageReqVO;
import cn.iocoder.yudao.module.wxcp.controller.admin.notice.vo.WxCpNoticeSaveReqVO;
import cn.iocoder.yudao.module.wxcp.controller.admin.vo.WxCpPushReqVO;
import cn.iocoder.yudao.module.wxcp.controller.admin.vo.WxCpPushResultVO;
import cn.iocoder.yudao.module.wxcp.dal.dataobject.notice.WxCpNoticeArticleDO;
import cn.iocoder.yudao.module.wxcp.dal.dataobject.notice.WxCpNoticeDO;
import jakarta.validation.Valid;
 
import java.util.List;
 
/**
 * 企业微信通知 Service 接口
 *
 * @author 超级管理员
 */
public interface WxCpNoticeService {
 
    /**
     * 创建通知(初始为草稿状态)
     *
     * @param createReqVO 创建信息
     * @return 通知编号
     */
    Long createNotice(@Valid WxCpNoticeSaveReqVO createReqVO);
 
    /**
     * 修改通知
     *
     * @param updateReqVO 修改信息
     */
    void updateNotice(@Valid WxCpNoticeSaveReqVO updateReqVO);
 
    /**
     * 删除通知
     *
     * @param id 通知编号
     */
    void deleteNotice(Long id);
 
    /**
     * 获得通知
     *
     * @param id 通知编号
     * @return 通知
     */
    WxCpNoticeDO getNotice(Long id);
 
    /**
     * 获得通知分页
     *
     * @param pageReqVO 分页查询
     * @return 通知分页
     */
    PageResult<WxCpNoticeDO> getNoticePage(@Valid WxCpNoticePageReqVO pageReqVO);
 
    /**
     * 获得图片通知的图片列表
     *
     * @param noticeId 通知编号
     * @return 图片列表(含预览地址)
     */
    List<SystemStorageBlobRespVO> getNoticeImageAttachments(Long noticeId);
 
    /**
     * 获得附件通知的附件列表
     *
     * @param noticeId 通知编号
     * @return 附件列表(含预览/下载地址)
     */
    List<SystemStorageBlobRespVO> getNoticeFileAttachments(Long noticeId);
 
    /**
     * 获得视频通知的视频列表
     *
     * @param noticeId 通知编号
     * @return 视频列表(含预览地址)
     */
    List<SystemStorageBlobRespVO> getNoticeVideoAttachments(Long noticeId);
 
    /**
     * 获得多图文消息的图文列表
     *
     * @param noticeId 通知编号
     * @return 图文列表
     */
    List<WxCpNoticeArticleDO> getNoticeArticles(Long noticeId);
 
    /**
     * 获得多图文条目的封面附件
     *
     * @param articleId 图文条目编号
     * @return 封面附件列表(最多 1 张)
     */
    List<SystemStorageBlobRespVO> getNoticeArticleCoverAttachments(Long articleId);
 
    /**
     * 发布通知(草稿 -&gt; 已发布)
     *
     * @param id 通知编号
     */
    void publishNotice(Long id);
 
    /**
     * 撤回通知
     *
     * @param id 通知编号
     */
    void revokeNotice(Long id);
 
    /**
     * 推送通知给企业微信成员
     *
     * @param pushReqVO 推送信息
     * @return 推送结果
     */
    WxCpPushResultVO pushNotice(@Valid WxCpPushReqVO pushReqVO);
 
    /**
     * 拼装通知预览页地址,成员在企业微信内打开后可查看图片与附件
     *
     * @param id 通知编号
     * @return 预览页地址;未配置外网地址前缀时返回 null
     */
    String buildPreviewUrl(Long id);
 
}