Commit 7a81ead2 by qiuweili123

增加业务行为response

parent 50e5fdf8
package com.secoo.mall.common.core.bean;
import com.secoo.mall.common.constant.CommonConstant;
/**
* 具有业务行为response
*
* @param <T>
*/
public class BizResponse<T> extends Response<T> {
public BizResponse() {
}
public BizResponse(Integer code, String msg) {
super(code, msg);
}
public boolean isSuccess() {
return getCode() != null && getCode() == CommonConstant.Success.CODE;
}
}
...@@ -2,6 +2,10 @@ package com.secoo.mall.common.core.bean; ...@@ -2,6 +2,10 @@ package com.secoo.mall.common.core.bean;
import java.io.Serializable; import java.io.Serializable;
/**
* 基础响应对象
* @param <T>
*/
public class Response<T> implements Serializable { public class Response<T> implements Serializable {
private Integer code; private Integer code;
......
...@@ -21,7 +21,4 @@ public interface ResponseUtil { ...@@ -21,7 +21,4 @@ public interface ResponseUtil {
return response; return response;
} }
static boolean isSuccess(Response response) {
return response != null && response.getCode() == CommonConstant.Success.CODE;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment