View Javadoc
1   package com.foxinmy.weixin4j.mp.model;
2   
3   import java.util.List;
4   
5   import com.alibaba.fastjson.annotation.JSONCreator;
6   import com.alibaba.fastjson.annotation.JSONField;
7   import com.foxinmy.weixin4j.model.WeixinAccount;
8   
9   /**
10   * 微信公众号信息
11   * 
12   * @className WeixinMpAccount
13   * @author jinyu
14   * @date Jul 6, 2016
15   * @since JDK 1.6
16   */
17  public class WeixinMpAccount extends WeixinAccount {
18  
19  	private static final long serialVersionUID = 3689999353867189585L;
20  	/**
21  	 * 多个应用组件信息
22  	 */
23  	private List<WeixinAccount> components;
24  
25  	/**
26  	 *
27  	 * @param appId
28  	 *            应用ID 使用普通接口(WeixinProxy对象)必须填写
29  	 * @param appSecret
30  	 *            应用密钥 使用普通接口(WeixinProxy对象)必须填写
31  	 * @param components
32  	 *            应用组件集合 使用套件接口(WeixinComponentProxy#ComponentApi)必须填写
33  	 */
34  	@JSONCreator
35  	public WeixinMpAccount(@JSONField(name = "id") String appId, @JSONField(name = "secret") String appSecret,
36  			@JSONField(name = "components") List<WeixinAccount> components) {
37  		super(appId, appSecret);
38  		this.components = components;
39  	}
40  
41  	public List<WeixinAccount> getComponents() {
42  		return components;
43  	}
44  
45  	@Override
46  	public String toString() {
47  		return "WeixinMpAccount [" + super.toString() + ", components=" + components + "]";
48  	}
49  }