business-card/src/main/java/cn/com/tenlion/util/result/SuccessResultData.java

41 lines
782 B
Java
Raw Normal View History

package com.cm.common.result;
import io.swagger.annotations.ApiModel;
import java.io.Serializable;
/**
* @ClassName: SuccessResultData
* @Description: 返回结果带对象
* @Author: WangGeng
* @Date: 2019/3/11 9:31 AM
* @Version: 1.0
**/
@ApiModel
public class SuccessResultData<T> extends SuccessResult implements Serializable {
private T data;
public SuccessResultData(T data) {
this.data = data;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("{");
sb.append("\"data\":")
.append(data);
sb.append('}');
return sb.toString();
}
}