mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🎨 优化代码
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.github.binarywang.wxpay.bean.payscore;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@@ -14,6 +15,7 @@ import java.io.Serializable;
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TimeRange implements Serializable {
|
||||
private static final long serialVersionUID = 8169562173656314930L;
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
@@ -22,6 +23,10 @@ import java.util.List;
|
||||
public class WxPayScoreRequest implements Serializable {
|
||||
private static final long serialVersionUID = 364764508076146082L;
|
||||
|
||||
public String toJson() {
|
||||
return WxGsonBuilder.create().toJson(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* out_order_no : 1234323JKHDFE1243252
|
||||
* appid : wxd678efh567hg6787
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.github.binarywang.wxpay.bean.payscore;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import me.chanjar.weixin.common.util.json.WxGsonBuilder;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
@@ -17,6 +18,10 @@ import java.util.Map;
|
||||
public class WxPayScoreResult implements Serializable {
|
||||
private static final long serialVersionUID = 8809250065540275770L;
|
||||
|
||||
public static WxPayScoreResult fromJson(String json) {
|
||||
return WxGsonBuilder.create().fromJson(json, WxPayScoreResult.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* appid : wxd678efh567hg6787
|
||||
* mchid : 1230000109
|
||||
|
||||
Reference in New Issue
Block a user