Commit 8740ab4a by 李秋伟

Merge branch 'dev' into 'master'

增加业务行为response

Closes #13

See merge request mall/arch/matrix!16
parents 29193962 7a81ead2
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;
import java.io.Serializable;
/**
* 基础响应对象
* @param <T>
*/
public class Response<T> implements Serializable {
private Integer code;
......
......@@ -21,7 +21,4 @@ public interface ResponseUtil {
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