mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
add YamlUtil
This commit is contained in:
@@ -1,14 +1,6 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
@lombok.Data
|
||||
public class Data {
|
||||
|
||||
private Price Price;
|
||||
|
||||
public void setPrice(Price Price) {
|
||||
this.Price = Price;
|
||||
}
|
||||
|
||||
public Price getPrice() {
|
||||
return Price;
|
||||
}
|
||||
}
|
||||
|
@@ -1,63 +1,22 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author 质量过关
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class ExamInfoDict implements Serializable {
|
||||
private static final long serialVersionUID = 3640936499125004525L;
|
||||
|
||||
|
||||
// 主键
|
||||
private Integer id; // 可当作题号
|
||||
// 试题类型 客观题 0主观题 1
|
||||
private Integer examType;
|
||||
// 试题是否作答
|
||||
private Integer answerIs;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getExamType() {
|
||||
return examType;
|
||||
}
|
||||
public void setExamType(Integer examType) {
|
||||
this.examType = examType;
|
||||
}
|
||||
|
||||
public Integer getAnswerIs() {
|
||||
return answerIs;
|
||||
}
|
||||
public void setAnswerIs(Integer answerIs) {
|
||||
this.answerIs = answerIs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ExamInfoDict that = (ExamInfoDict) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(examType, that.examType) && Objects.equals(answerIs, that.answerIs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, examType, answerIs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExamInfoDict{" + "id=" + id + ", examType=" + examType + ", answerIs=" + answerIs + '}';
|
||||
}
|
||||
}
|
||||
|
@@ -1,22 +1,10 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import cn.hutool.json.JSONObject;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class JSONBean {
|
||||
|
||||
private int code;
|
||||
private JSONObject data;
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
public JSONObject getData() {
|
||||
return data;
|
||||
}
|
||||
public void setData(JSONObject data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,10 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class JsonNode implements Serializable {
|
||||
private static final long serialVersionUID = -2280206942803550272L;
|
||||
|
||||
@@ -17,33 +20,4 @@ public class JsonNode implements Serializable {
|
||||
this.parentId = parentId;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(Integer parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "JsonNode{" + "id=" + id + ", parentId=" + parentId + ", name='" + name + '\'' + '}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,61 +0,0 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class JsonRootBean {
|
||||
|
||||
private int statusCode;
|
||||
private String message;
|
||||
private int skip;
|
||||
private int limit;
|
||||
private int total;
|
||||
private List<Data> data;
|
||||
|
||||
public void setStatusCode(int statusCode) {
|
||||
this.statusCode = statusCode;
|
||||
}
|
||||
|
||||
public int getStatusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setSkip(int skip) {
|
||||
this.skip = skip;
|
||||
}
|
||||
|
||||
public int getSkip() {
|
||||
return skip;
|
||||
}
|
||||
|
||||
public void setLimit(int limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public int getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setTotal(int total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public int getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setData(List<Data> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public List<Data> getData() {
|
||||
return data;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,15 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author wangyan E-mail:wangyan@pospt.cn
|
||||
* @version 创建时间:2017年9月11日 上午9:33:01 类说明
|
||||
*/
|
||||
@Data
|
||||
public class ProductResBase implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -6708040074002451511L;
|
||||
/**
|
||||
* 请求结果成功0
|
||||
@@ -21,6 +23,7 @@ public class ProductResBase implements Serializable {
|
||||
* 成功code
|
||||
*/
|
||||
public static final String REQUEST_CODE_SUCCESS = "0000";
|
||||
|
||||
/**
|
||||
* 结果 成功0 失败1
|
||||
*/
|
||||
@@ -32,40 +35,4 @@ public class ProductResBase implements Serializable {
|
||||
* 成本总计
|
||||
*/
|
||||
private Integer costTotal;
|
||||
|
||||
public Integer getCostTotal() {
|
||||
return costTotal;
|
||||
}
|
||||
|
||||
public ProductResBase setCostTotal(Integer costTotal) {
|
||||
this.costTotal = costTotal;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getResResult() {
|
||||
return resResult;
|
||||
}
|
||||
|
||||
public String getResCode() {
|
||||
return resCode;
|
||||
}
|
||||
|
||||
public String getResMsg() {
|
||||
return resMsg;
|
||||
}
|
||||
|
||||
public ProductResBase setResResult(int resResult) {
|
||||
this.resResult = resResult;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ProductResBase setResCode(String resCode) {
|
||||
this.resCode = resCode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ProductResBase setResMsg(String resMsg) {
|
||||
this.resMsg = resMsg;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,10 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ResultDto<T> implements Serializable {
|
||||
private static final long serialVersionUID = -1417999729205654379L;
|
||||
|
||||
@@ -128,28 +131,4 @@ public class ResultDto<T> implements Serializable {
|
||||
public boolean error() {
|
||||
return !success();
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public T getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(T result) {
|
||||
this.result = result;
|
||||
}
|
||||
}
|
||||
|
@@ -1,25 +1,15 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class Seq {
|
||||
private String seq;
|
||||
|
||||
|
||||
public Seq() {
|
||||
}
|
||||
|
||||
|
||||
public Seq(String seq) {
|
||||
this.seq = seq;
|
||||
}
|
||||
|
||||
public String getSeq() {
|
||||
return seq;
|
||||
}
|
||||
|
||||
public void setSeq(String seq) {
|
||||
this.seq = seq;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Seq [seq=" + seq + "]";
|
||||
}
|
||||
}
|
||||
|
@@ -1,22 +1,9 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TokenAuthResponse {
|
||||
private String token;
|
||||
private String userId;
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
}
|
||||
|
@@ -1,24 +1,13 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class TokenAuthWarp extends UUMap<TokenAuthResponse> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String targetUrl;
|
||||
private String success;
|
||||
|
||||
public String getTargetUrl() {
|
||||
return targetUrl;
|
||||
}
|
||||
|
||||
public void setTargetUrl(String targetUrl) {
|
||||
this.targetUrl = targetUrl;
|
||||
}
|
||||
|
||||
public String getSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(String success) {
|
||||
this.success = success;
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,5 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
public class TokenAuthWarp2 extends TokenAuthWarp {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
@@ -1,20 +1,15 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class UUMap<T> implements Serializable{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private T result;
|
||||
|
||||
public T getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(T result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
|
@@ -1,28 +1,12 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class UserB {
|
||||
private String name;
|
||||
private String b;
|
||||
private Date date;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getB() {
|
||||
return b;
|
||||
}
|
||||
public void setB(String a) {
|
||||
this.b = a;
|
||||
}
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
}
|
||||
|
@@ -1,31 +1,10 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserC {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private String prop;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getProp() {
|
||||
return prop;
|
||||
}
|
||||
|
||||
public void setProp(String prop) {
|
||||
this.prop = prop;
|
||||
}
|
||||
}
|
||||
|
@@ -1,14 +1,16 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
* @author 质量过关
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
public class UserInfoDict implements Serializable {
|
||||
private static final long serialVersionUID = -936213991463284306L;
|
||||
// 用户Id
|
||||
@@ -19,61 +21,4 @@ public class UserInfoDict implements Serializable {
|
||||
private String photoPath;
|
||||
private List<ExamInfoDict> examInfoDict;
|
||||
private UserInfoRedundCount userInfoRedundCount;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getRealName() {
|
||||
return realName;
|
||||
}
|
||||
public void setRealName(String realName) {
|
||||
this.realName = realName;
|
||||
}
|
||||
|
||||
public String getPhotoPath() {
|
||||
return photoPath;
|
||||
}
|
||||
public void setPhotoPath(String photoPath) {
|
||||
this.photoPath = photoPath;
|
||||
}
|
||||
|
||||
public List<ExamInfoDict> getExamInfoDict() {
|
||||
return examInfoDict;
|
||||
}
|
||||
public void setExamInfoDict(List<ExamInfoDict> examInfoDict) {
|
||||
this.examInfoDict = examInfoDict;
|
||||
}
|
||||
|
||||
public UserInfoRedundCount getUserInfoRedundCount() {
|
||||
return userInfoRedundCount;
|
||||
}
|
||||
public void setUserInfoRedundCount(UserInfoRedundCount userInfoRedundCount) {
|
||||
this.userInfoRedundCount = userInfoRedundCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
UserInfoDict that = (UserInfoDict) o;
|
||||
return Objects.equals(id, that.id) && Objects.equals(realName, that.realName) && Objects.equals(photoPath, that.photoPath) && Objects.equals(examInfoDict, that.examInfoDict);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, realName, photoPath, examInfoDict);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UserInfoDict [id=" + id + ", realName=" + realName + ", photoPath=" + photoPath + ", examInfoDict=" + examInfoDict + ", userInfoRedundCount=" + userInfoRedundCount + "]";
|
||||
}
|
||||
}
|
||||
|
@@ -1,38 +1,14 @@
|
||||
package cn.hutool.json.test.bean;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class UserInfoRedundCount implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8397291070139255181L;
|
||||
|
||||
private String finishedRatio; // 完成率
|
||||
|
||||
private Integer ownershipExamCount; // 自己有多少道题
|
||||
|
||||
private Integer answeredExamCount; // 当前回答了多少道题
|
||||
|
||||
public Integer getOwnershipExamCount() {
|
||||
return ownershipExamCount;
|
||||
}
|
||||
|
||||
public void setOwnershipExamCount(Integer ownershipExamCount) {
|
||||
this.ownershipExamCount = ownershipExamCount;
|
||||
}
|
||||
|
||||
public Integer getAnsweredExamCount() {
|
||||
return answeredExamCount;
|
||||
}
|
||||
|
||||
public void setAnsweredExamCount(Integer answeredExamCount) {
|
||||
this.answeredExamCount = answeredExamCount;
|
||||
}
|
||||
|
||||
public String getFinishedRatio() {
|
||||
return finishedRatio;
|
||||
}
|
||||
|
||||
public void setFinishedRatio(String finishedRatio) {
|
||||
this.finishedRatio = finishedRatio;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user