yangys
2024-05-11 522dafb06be3374f27d087c370bcf06027e0f1cc
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
package com.qianwen.core.notify.provider.wechat.mp;
 
import javax.validation.constraints.NotEmpty;
import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
 
public class WechatMpProperties {
    @NotEmpty(message = "名称不得为空")
    private String name;
    @NotEmpty(message = "appid不得为空")
    private String appid;
    @NotEmpty(message = "appSecret不得为空")
    private String secret;
    private String token;
    private String aesKey;
 
    public void setName(final String name) {
        this.name = name;
    }
 
    public void setAppid(final String appid) {
        this.appid = appid;
    }
 
    public void setSecret(final String secret) {
        this.secret = secret;
    }
 
    public void setToken(final String token) {
        this.token = token;
    }
 
    public void setAesKey(final String aesKey) {
        this.aesKey = aesKey;
    }
 
    public String getName() {
        return this.name;
    }
 
    public String getAppid() {
        return this.appid;
    }
 
    public String getSecret() {
        return this.secret;
    }
 
    public String getToken() {
        return this.token;
    }
 
    public String getAesKey() {
        return this.aesKey;
    }
 
    public WxMpDefaultConfigImpl toWxMpConfigStorage() {
        WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl();
        configStorage.setAppId(this.appid);
        configStorage.setSecret(this.secret);
        configStorage.setToken(this.token);
        configStorage.setAesKey(this.aesKey);
        return configStorage;
    }
}