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
package cn.iocoder.yudao.module.wxcp.framework.config;
 
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;
 
/**
 * 企业微信配置属性类
 *
 * @author 超级管理员
 */
@Data
@Validated
@ConfigurationProperties(prefix = "wx.cp")
public class WxCpProperties {
 
    /**
     * 企业微信 CorpId(企业ID)
     */
    @NotEmpty(message = "企业微信 CorpId 不能为空")
    private String corpId;
 
    /**
     * 应用 AgentId
     */
    @NotEmpty(message = "企业微信 AgentId 不能为空")
    private String agentId;
 
    /**
     * 应用 Secret
     */
    @NotEmpty(message = "企业微信 Secret 不能为空")
    private String secret;
 
    /**
     * Token(回调 URL 验证用,需在企业微信管理后台配置)
     */
    private String token;
 
    /**
     * EncodingAESKey(回调消息加解密用,需在企业微信管理后台配置)
     */
    private String aesKey;
 
    /**
     * 报名页外网地址前缀,用于生成活动报名二维码
     *
     * 必须是企业微信成员手机能访问到的地址,例如内网穿透域名或正式域名;
     * 生成的二维码内容为 {@code {signupUrlPrefix}/admin-api/wxcp/activity/signup-page?id={活动编号}}
     */
    private String signupUrlPrefix;
 
    /**
     * 生成二维码的边长(像素),不配置时默认 400
     */
    private Integer qrcodeSize;
 
}