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;
|
|
}
|