mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-30 08:00:00 +08:00
update
This commit is contained in:
@@ -27,8 +27,6 @@ public class CommonResult<T> {
|
||||
|
||||
private String sig;
|
||||
|
||||
private String portName;
|
||||
|
||||
protected CommonResult() {
|
||||
|
||||
}
|
||||
@@ -40,14 +38,6 @@ public class CommonResult<T> {
|
||||
this.sig = sig;
|
||||
}
|
||||
|
||||
protected CommonResult(long ret, String msg, T data, String sig, String portName) {
|
||||
this.ret = ret;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
this.sig = sig;
|
||||
this.portName = portName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回结果
|
||||
*
|
||||
@@ -59,15 +49,6 @@ public class CommonResult<T> {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMsg(), data, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 甬城泊车成功返回结果
|
||||
* @param data
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
public static <T> CommonResult<T> YCBCSuccess(T data) {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMsg(), data, null, "wcc-pro");
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功返回结果
|
||||
@@ -80,21 +61,11 @@ public class CommonResult<T> {
|
||||
public static <T> CommonResult<T> success(T data, String message) {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), message, data, null);
|
||||
}
|
||||
// 甬城泊车成功返回结果
|
||||
public static <T> CommonResult<T> YCBCSuccess(T data, String message) {
|
||||
return new CommonResult<T>(ResultCode.SUCCESS.getCode(), message, data, null, "wcc-pro");
|
||||
}
|
||||
|
||||
|
||||
public static <T> CommonResult<T> success(Integer ret, String msg, T data, String sig) {
|
||||
return new CommonResult<T>(ret, msg, data, sig);
|
||||
}
|
||||
|
||||
// 甬城泊车成功返回结果
|
||||
public static <T> CommonResult<T> YCBCSuccess(Integer ret, String msg, T data, String sig) {
|
||||
return new CommonResult<T>(ret, msg, data, sig, "wcc-pro");
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
@@ -106,10 +77,6 @@ public class CommonResult<T> {
|
||||
return new CommonResult<T>(resultCode.getCode(), resultCode.getMsg(), null, null);
|
||||
}
|
||||
|
||||
public static <T> CommonResult<T> YCBCFailed(ResultCode resultCode) {
|
||||
return new CommonResult<T>(resultCode.getCode(), resultCode.getMsg(), null, null, "wcc-pro");
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回
|
||||
*
|
||||
@@ -122,10 +89,6 @@ public class CommonResult<T> {
|
||||
return new CommonResult<T>(code, msg, null, null);
|
||||
}
|
||||
|
||||
public static <T> CommonResult<T> YCBCFailed(long code, String msg, String portName) {
|
||||
return new CommonResult<T>(code, msg, null, null, portName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
@@ -137,10 +100,6 @@ public class CommonResult<T> {
|
||||
return failed(ResultCode.ERROR.getCode(), msg);
|
||||
}
|
||||
|
||||
public static <T> CommonResult<T> YCBCFailed(String msg) {
|
||||
return YCBCFailed(ResultCode.ERROR.getCode(), msg, "wcc-pro");
|
||||
}
|
||||
|
||||
/**
|
||||
* 失败返回结果
|
||||
*
|
||||
@@ -151,11 +110,6 @@ public class CommonResult<T> {
|
||||
return failed(ResultCode.ERROR);
|
||||
}
|
||||
|
||||
public static <T> CommonResult<T> YCBCFailed() {
|
||||
return YCBCFailed(ResultCode.ERROR);
|
||||
}
|
||||
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
@@ -187,12 +141,4 @@ public class CommonResult<T> {
|
||||
public void setSig(String sig) {
|
||||
this.sig = sig;
|
||||
}
|
||||
|
||||
public String getPortName() {
|
||||
return portName;
|
||||
}
|
||||
|
||||
public void setPortName(String portName) {
|
||||
this.portName = portName;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user