You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.1 KiB
100 lines
2.1 KiB
package com.fr.plugin.idm.sso; |
|
|
|
import com.fr.third.fasterxml.jackson.annotation.JsonInclude; |
|
|
|
import java.io.Serializable; |
|
import java.util.HashMap; |
|
|
|
/** |
|
* @Author fr.open |
|
* @Date 2020/12/10 |
|
* @Description |
|
**/ |
|
@JsonInclude(JsonInclude.Include.NON_DEFAULT) |
|
public class IdmResponse implements Serializable { |
|
private int status; |
|
private String errorCode; |
|
private String errorMsg; |
|
private Object result; |
|
|
|
public IdmResponse() { |
|
} |
|
|
|
public IdmResponse status(int var1) { |
|
this.status = var1; |
|
return this; |
|
} |
|
|
|
public IdmResponse errorCode(String var1) { |
|
this.errorCode = var1; |
|
return this; |
|
} |
|
|
|
public IdmResponse errorMsg(String var1) { |
|
this.errorMsg = var1; |
|
return this; |
|
} |
|
|
|
public IdmResponse data(Object var1) { |
|
this.result = var1; |
|
return this; |
|
} |
|
|
|
public Object getResult() { |
|
return this.result; |
|
} |
|
|
|
public void setResult(Object var1) { |
|
this.result = var1; |
|
} |
|
|
|
public String getErrorCode() { |
|
return this.errorCode; |
|
} |
|
|
|
public void setErrorCode(String var1) { |
|
this.errorCode = var1; |
|
} |
|
|
|
public String getErrorMsg() { |
|
return this.errorMsg; |
|
} |
|
|
|
public void setErrorMsg(String var1) { |
|
this.errorMsg = var1; |
|
} |
|
|
|
public int getStatus() { |
|
return this.status; |
|
} |
|
|
|
public void setStatus(int var1) { |
|
this.status = var1; |
|
} |
|
|
|
private static IdmResponse create() { |
|
return new IdmResponse(); |
|
} |
|
|
|
public static IdmResponse ok(Object var0) { |
|
return create().data(var0); |
|
} |
|
|
|
public static IdmResponse success() { |
|
return ok("0"); |
|
} |
|
|
|
public static IdmResponse success(int var0) { |
|
HashMap var1 = new HashMap(); |
|
var1.put("count", var0); |
|
return ok(var1); |
|
} |
|
|
|
public static IdmResponse error(int var0, String var1, String var2) { |
|
return create().status(var0).errorCode(var1).errorMsg(var2); |
|
} |
|
|
|
public static IdmResponse error(String var0, String var1) { |
|
return create().errorCode(var0).errorMsg(var1); |
|
} |
|
}
|
|
|