mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
#853 小程序模块获取二维码和小程序码接口增加对应返回byte数组的实现方法
This commit is contained in:
@@ -1,36 +1,48 @@
|
||||
package cn.binarywang.wx.miniapp.bean;
|
||||
|
||||
import cn.binarywang.wx.miniapp.util.json.WxMaGsonBuilder;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import cn.binarywang.wx.miniapp.util.json.WxMaGsonBuilder;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 小程序码.
|
||||
*
|
||||
* @author Element
|
||||
* @date 2017/7/27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class WxMaWxcode extends AbstractWxMaQrcodeWrapper implements Serializable {
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class WxaCode extends AbstractWxMaQrcodeWrapper implements Serializable {
|
||||
private static final long serialVersionUID = 1287399621649210322L;
|
||||
|
||||
private String path;
|
||||
|
||||
@Builder.Default
|
||||
private int width = 430;
|
||||
|
||||
@SerializedName("auto_color")
|
||||
@Builder.Default
|
||||
private boolean autoColor = true;
|
||||
|
||||
@SerializedName("is_hyaline")
|
||||
@Builder.Default
|
||||
private boolean isHyaline = false;
|
||||
|
||||
@SerializedName("line_color")
|
||||
@Builder.Default
|
||||
private WxMaCodeLineColor lineColor = new WxMaCodeLineColor("0", "0", "0");
|
||||
|
||||
public static WxMaWxcode fromJson(String json) {
|
||||
return WxMaGsonBuilder.create().fromJson(json, WxMaWxcode.class);
|
||||
public static WxaCode fromJson(String json) {
|
||||
return WxMaGsonBuilder.create().fromJson(json, WxaCode.class);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user