mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
增加用户标签添加接口
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
package me.chanjar.weixin.mp.bean.tag;
|
||||
|
||||
import com.google.gson.JsonParser;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 用户标签对象
|
||||
* @author binarywang(https://github.com/binarywang)
|
||||
* Created by Binary Wang on 2016/9/2.
|
||||
*/
|
||||
public class WxUserTag {
|
||||
/**
|
||||
* id 标签id,由微信分配
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* name 标签名,UTF8编码
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* count 此标签下粉丝数
|
||||
*/
|
||||
private Integer count;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(Integer count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public static WxUserTag fromJson(String json) {
|
||||
return WxMpGsonBuilder.create().fromJson(new JsonParser().parse(json).getAsJsonObject().get("tag"), WxUserTag.class);
|
||||
}
|
||||
|
||||
public String toJson() {
|
||||
return WxMpGsonBuilder.create().toJson(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user