fixed #55
This commit is contained in:
@@ -2,6 +2,9 @@ package com.foxinmy.weixin4j.mp.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONCreator;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
|
||||
/**
|
||||
* 分组
|
||||
*
|
||||
@@ -26,26 +29,6 @@ public class Group implements Serializable {
|
||||
*/
|
||||
private int count;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public Group(int id, String name) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
@@ -55,8 +38,25 @@ public class Group implements Serializable {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Group() {
|
||||
@JSONCreator
|
||||
public Group(@JSONField(name = "id") int id,
|
||||
@JSONField(name = "name") String name,
|
||||
@JSONField(name = "count") int count) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -50,6 +50,7 @@ public class WeixinTokenCreator extends AbstractTokenCreator {
|
||||
WeixinResponse response = weixinExecutor.get(tokenUrl);
|
||||
Token token = response.getAsObject(new TypeReference<Token>() {
|
||||
});
|
||||
token.setCreateTime(System.currentTimeMillis());
|
||||
token.setOriginalResult(response.getAsString());
|
||||
return token;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user