package com.qianwen.core.notify.provider.wechat.mini;
|
|
import java.util.List;
|
import java.util.Properties;
|
import javax.validation.constraints.NotBlank;
|
import com.qianwen.core.notify.template.Template;
|
|
/* loaded from: blade-starter-notify-9.3.0.0-SNAPSHOT.jar:org/springblade/core/notify/provider/wechat/mini/WechatMiniMessageTemplate.class */
|
public class WechatMiniMessageTemplate implements Template {
|
@NotBlank(message = "[templateId]模板Id不能为空")
|
private String templateId;
|
private String page;
|
private String miniprogramState = "formal";
|
private List<ConfigProperty> properties;
|
|
public void setTemplateId(final String templateId) {
|
this.templateId = templateId;
|
}
|
|
public void setPage(final String page) {
|
this.page = page;
|
}
|
|
public void setMiniprogramState(final String miniprogramState) {
|
this.miniprogramState = miniprogramState;
|
}
|
|
public void setProperties(final List<ConfigProperty> properties) {
|
this.properties = properties;
|
}
|
|
public String getTemplateId() {
|
return this.templateId;
|
}
|
|
public String getPage() {
|
return this.page;
|
}
|
|
public String getMiniprogramState() {
|
return this.miniprogramState;
|
}
|
|
public List<ConfigProperty> getProperties() {
|
return this.properties;
|
}
|
|
/* loaded from: blade-starter-notify-9.3.0.0-SNAPSHOT.jar:org/springblade/core/notify/provider/wechat/mini/WechatMiniMessageTemplate$ConfigProperty.class */
|
public static class ConfigProperty {
|
private String name;
|
private String value;
|
private String description;
|
|
public void setName(final String name) {
|
this.name = name;
|
}
|
|
public void setValue(final String value) {
|
this.value = value;
|
}
|
|
public void setDescription(final String description) {
|
this.description = description;
|
}
|
|
public String getName() {
|
return this.name;
|
}
|
|
public String getValue() {
|
return this.value;
|
}
|
|
public String getDescription() {
|
return this.description;
|
}
|
}
|
|
public Properties createJavaMailProperties() {
|
Properties properties = new Properties();
|
if (this.properties != null) {
|
for (ConfigProperty property : this.properties) {
|
properties.put(property.getName(), property.getValue());
|
}
|
}
|
return properties;
|
}
|
}
|