eight
2024-08-06 f06d7fd046d32f74caf259f3ddbda0bcaf7de799
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
package cn.lihu.jh.module.system.api.social.dto;
 
import cn.lihu.jh.framework.common.enums.UserTypeEnum;
import lombok.Data;
 
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.HashMap;
import java.util.Map;
 
/**
 * 微信小程序订阅消息发送 Request DTO
 *
 * @author HUIHUI
 */
@Data
public class SocialWxaSubscribeMessageSendReqDTO {
 
    /**
     * 用户编号
     *
     * 关联 MemberUserDO 的 id 编号
     * 关联 AdminUserDO 的 id 编号
     */
    @NotNull(message = "用户编号不能为空")
    private Long userId;
    /**
     * 用户类型
     *
     * 关联 {@link UserTypeEnum}
     */
    @NotNull(message = "用户类型不能为空")
    private Integer userType;
 
    /**
     * 消息模版标题
     */
    @NotEmpty(message = "消息模版标题不能为空")
    private String templateTitle;
 
    /**
     * 点击模板卡片后的跳转页面,仅限本小程序内的页面
     *
     * 支持带参数,(示例 index?foo=bar )。该字段不填则模板无跳转。
     */
    private String page;
 
    /**
     * 模板内容的参数
     */
    private Map<String, String> messages;
 
    public SocialWxaSubscribeMessageSendReqDTO addMessage(String key, String value) {
        if (messages == null) {
            messages = new HashMap<>();
        }
        messages.put(key, value);
        return this;
    }
 
}