|
|
@@ -4,6 +4,7 @@ import com.kym.common.constant.ResponseEnum;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import lombok.Data;
|
|
|
import lombok.NoArgsConstructor;
|
|
|
+import org.slf4j.MDC;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
|
@@ -22,10 +23,19 @@ public class R<T> implements Serializable {
|
|
|
private Integer code;
|
|
|
private String message;
|
|
|
private T data;
|
|
|
+ private String tid;
|
|
|
|
|
|
public R(Integer code, String message) {
|
|
|
this.code = code;
|
|
|
this.message = message;
|
|
|
+ this.tid = MDC.get("seq");
|
|
|
+ }
|
|
|
+
|
|
|
+ public R(Integer code, String message, T data) {
|
|
|
+ this.code = code;
|
|
|
+ this.message = message;
|
|
|
+ this.data =data;
|
|
|
+ this.tid = MDC.get("seq");
|
|
|
}
|
|
|
|
|
|
public static R success() {
|