mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🆕 #1328 微信卡劵增加用户已领取卡券列表接口
* 微信公众号,功能新增,微信卡券 添加用户已领取卡券接口 * 添加用户已领取卡券接口测试代码
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package me.chanjar.weixin.mp.bean.card;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
/**
|
||||
* 用户已领卡圈对象
|
||||
* @author yang229
|
||||
* @date 2019/12/22
|
||||
*/
|
||||
@Data
|
||||
public class UserCard implements java.io.Serializable {
|
||||
/**
|
||||
* 用户卡券code码
|
||||
*/
|
||||
@SerializedName("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 卡券ID
|
||||
*/
|
||||
@SerializedName("card_id")
|
||||
private String cardId;
|
||||
|
||||
public static UserCard fromJson(String json) {
|
||||
return WxMpGsonBuilder.create().fromJson(json, UserCard.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return WxMpGsonBuilder.create().toJson(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package me.chanjar.weixin.mp.bean.card;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.mp.bean.result.WxMpResult;
|
||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户已领卡券返回
|
||||
* @author yang229
|
||||
* @date 2019/12/22
|
||||
*/
|
||||
@Data
|
||||
public class WxUserCardListResult extends WxMpResult implements java.io.Serializable {
|
||||
|
||||
/**
|
||||
* 卡券列表
|
||||
*/
|
||||
@SerializedName("card_list")
|
||||
private List<UserCard> cardList;
|
||||
|
||||
/**
|
||||
* 是否有可用的朋友的券
|
||||
*/
|
||||
@SerializedName("has_share_card")
|
||||
private Boolean hasShareCard;
|
||||
|
||||
public static WxUserCardListResult fromJson(String json) {
|
||||
return WxMpGsonBuilder.create().fromJson(json, WxUserCardListResult.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return WxMpGsonBuilder.create().toJson(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user