feat:acs交互接口定义
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
package cn.code.nl.framework.common.pojo;
|
||||
|
||||
import cn.code.nl.framework.common.exception.enums.GlobalErrorCodeConstants;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* acs 固定返回对象
|
||||
* @Author: liyongde
|
||||
* @Date: 2026/7/30 9:05
|
||||
*/
|
||||
@Data
|
||||
public class AcsCommonResult<T> {
|
||||
/**
|
||||
* 总条数
|
||||
*/
|
||||
private Long totalElements;
|
||||
|
||||
/**
|
||||
* 业务数据体
|
||||
*/
|
||||
private T data;
|
||||
|
||||
/**
|
||||
* 时间戳
|
||||
*/
|
||||
private String timestamp;
|
||||
|
||||
/**
|
||||
* http状态码
|
||||
*/
|
||||
private Integer code;
|
||||
|
||||
/**
|
||||
* 消息
|
||||
*/
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 业务响应码 todo: 暂时不用
|
||||
*/
|
||||
private Integer respCode;
|
||||
|
||||
/**
|
||||
* 业务响应信息 todo: 暂时不用
|
||||
*/
|
||||
private String respMsg;
|
||||
|
||||
public static boolean isSuccess(Integer code) {
|
||||
return Objects.equals(code, GlobalErrorCodeConstants.SUCCESS.getCode()) || Objects.equals(code, 200);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user