🆕 #1651 添加小程序直播间商品相关操作接口

Co-authored-by: lipengjun <pengjun92>
This commit is contained in:
微同科技
2020-06-30 16:32:50 +08:00
committed by GitHub
parent eec3f78ec6
commit c60fda48d2
12 changed files with 682 additions and 60 deletions

View File

@@ -0,0 +1,60 @@
package cn.binarywang.wx.miniapp.bean;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 直播接口入参
*
* @author yjwang
* @date 2020/4/5
*/
@Data
public class WxMaLiveInfo implements Serializable {
private static final long serialVersionUID = 7285263767524755887L;
/**
* 直播列表
*/
@Data
public static class RoomInfo implements Serializable {
private static final long serialVersionUID = 7745775280267417154L;
private String name;
private Integer roomid;
private String coverImg;
private String shareImg;
private Integer liveStatus;
private Long startTime;
private Long endTime;
private String anchorName;
private String anchorWechat;
private String anchorImg;
private Integer type;
private Integer screenType;
private Integer closeLike;
private Integer closeGoods;
private Integer closeComment;
private List<Goods> goods;
}
/**
* 商品列表
*/
@Data
public static class Goods implements Serializable {
private static final long serialVersionUID = 5769245932149287574L;
private Integer goodsId;
private String coverImgUrl;
private String url;
private Integer priceType;
private String price;
private String price2;
private String name;
/**
* 1, 2表示是为api添加商品否则是在MP添加商品
*/
private String thirdPartyTag;
}
}

View File

@@ -8,30 +8,65 @@ import java.io.Serializable;
import java.util.List;
/**
* 获取直播房间列表
* <pre>
* 直播间操作返回结果
* Created by lipengjun on 2020/6/29.
* </pre>
*
* @author yjwang
* @date 2020/4/5
* @author <a href="https://github.com/lipengjun92">lipengjun (939961241@qq.com)</a>
*/
@Data
public class WxMaGetLiveInfo implements Serializable {
private static final long serialVersionUID = 7285263767524755887L;
public class WxMaLiveResult implements Serializable {
private static final long serialVersionUID = 1L;
private Integer errcode;
private String errmsg;
private Integer total;
private Integer auditId;
private Integer goodsId;
private List<Goods> goods;
/**
* 直播间列表
*/
@SerializedName("room_info")
private List<RoomInfo> roomInfos;
/**
* 获取回放源视频列表
*/
@SerializedName("live_replay")
private List<LiveReplay> liveReplay;
public static WxMaGetLiveInfo fromJson(String json) {
return WxMaGsonBuilder.create().fromJson(json, WxMaGetLiveInfo.class);
public static WxMaLiveResult fromJson(String json) {
return WxMaGsonBuilder.create().fromJson(json, WxMaLiveResult.class);
}
/**
* 商品列表
*/
@Data
public static class Goods implements Serializable {
private static final long serialVersionUID = 5769245932149287574L;
@SerializedName("goods_id")
private Integer goodsId;
@SerializedName("cover_img_url")
private String coverImgUrl;
private String name;
private String url;
@SerializedName("price_type")
private Integer priceType;
/**
* 0未审核1审核中2:审核通过3审核失败
*/
@SerializedName("audit_status")
private Integer auditStatus;
private String price;
private String price2;
/**
* 1, 2表示是为api添加商品否则是在MP添加商品
*/
@SerializedName("third_party_tag")
private String thirdPartyTag;
}
/**
@@ -54,22 +89,20 @@ public class WxMaGetLiveInfo implements Serializable {
private Long endTime;
@SerializedName("anchor_name")
private String anchorName;
@SerializedName("anchor_wechat")
private String anchorWechat;
@SerializedName("anchor_img")
private String anchorImg;
private List<Goods> goods;
}
/**
* 商品列表
*/
@Data
public static class Goods implements Serializable {
private static final long serialVersionUID = 5769245932149287574L;
@SerializedName("cover_img")
private String coverImg;
private String url;
private String price;
private String name;
private Integer type;
@SerializedName("screen_type")
private Integer screenType;
@SerializedName("close_like")
private Integer closeLike;
@SerializedName("closeGoods")
private Integer closeGoods;
@SerializedName("close_comment")
private Integer closeComment;
private List<WxMaLiveInfo.Goods> goods;
}
/**
@@ -85,6 +118,4 @@ public class WxMaGetLiveInfo implements Serializable {
@SerializedName("media_url")
private String mediaUrl;
}
}