package com.zy.acs.manager.manager.entity;
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
import io.swagger.annotations.ApiModelProperty;
|
import lombok.Data;
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
import java.io.Serializable;
|
import java.util.Date;
|
|
@Data
|
@TableName("man_integration_record")
|
public class IntegrationRecord implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* ID
|
*/
|
@ApiModelProperty(value= "ID")
|
@TableId(value = "id", type = IdType.AUTO)
|
private Long id;
|
|
/**
|
* 编号
|
*/
|
@ApiModelProperty(value= "编号")
|
private String uuid;
|
|
/**
|
* 名称空间
|
*/
|
@ApiModelProperty(value= "名称空间")
|
private String namespace;
|
|
/**
|
* 接口地址
|
*/
|
@ApiModelProperty(value= "接口地址")
|
private String url;
|
|
/**
|
* 平台密钥
|
*/
|
@ApiModelProperty(value= "平台密钥")
|
private String appkey;
|
|
/**
|
* 调用方标识
|
*/
|
@ApiModelProperty(value= "调用方标识")
|
private String caller;
|
|
/**
|
* 方向 1: 被调用 2: 调用外部
|
*/
|
@ApiModelProperty(value= "方向 1: 被调用 2: 调用外部 ")
|
private Integer direction;
|
|
/**
|
* 时间戳
|
*/
|
@ApiModelProperty(value= "时间戳")
|
private String timestamp;
|
|
/**
|
* 客户端IP
|
*/
|
@ApiModelProperty(value= "客户端IP")
|
private String clientIp;
|
|
/**
|
* 请求内容
|
*/
|
@ApiModelProperty(value= "请求内容")
|
private String request;
|
|
/**
|
* 响应内容
|
*/
|
@ApiModelProperty(value= "响应内容")
|
private String response;
|
|
/**
|
* 异常内容
|
*/
|
@ApiModelProperty(value= "异常内容")
|
private String err;
|
|
/**
|
* 结果 1: 成功 0: 失败
|
*/
|
@ApiModelProperty(value= "结果 1: 成功 0: 失败 ")
|
private Integer result;
|
|
/**
|
* 耗时
|
*/
|
@ApiModelProperty(value= "耗时")
|
private Integer costMs;
|
|
/**
|
* 状态 1: 正常 0: 冻结
|
*/
|
@ApiModelProperty(value= "状态 1: 正常 0: 冻结 ")
|
private Integer status;
|
|
/**
|
* 添加时间
|
*/
|
@ApiModelProperty(value= "添加时间")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date createTime;
|
|
/**
|
* 修改时间
|
*/
|
@ApiModelProperty(value= "修改时间")
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
private Date updateTime;
|
|
/**
|
* 备注
|
*/
|
@ApiModelProperty(value= "备注")
|
private String memo;
|
|
public IntegrationRecord() {}
|
|
public IntegrationRecord(String uuid,String namespace,String url,String appkey,String caller,Integer direction,String timestamp,String clientIp,String request,String response,String err,Integer result,Integer costMs,Integer status,Date createTime,Date updateTime,String memo) {
|
this.uuid = uuid;
|
this.namespace = namespace;
|
this.url = url;
|
this.appkey = appkey;
|
this.caller = caller;
|
this.direction = direction;
|
this.timestamp = timestamp;
|
this.clientIp = clientIp;
|
this.request = request;
|
this.response = response;
|
this.err = err;
|
this.result = result;
|
this.costMs = costMs;
|
this.status = status;
|
this.createTime = createTime;
|
this.updateTime = updateTime;
|
this.memo = memo;
|
}
|
|
// IntegrationRecord integrationRecord = new IntegrationRecord(
|
// null, // 编号
|
// null, // 名称空间
|
// null, // 接口地址
|
// null, // 平台密钥
|
// null, // 调用方标识
|
// null, // 方向[非空]
|
// null, // 时间戳
|
// null, // 客户端IP
|
// null, // 请求内容
|
// null, // 响应内容
|
// null, // 异常内容
|
// null, // 结果
|
// null, // 耗时
|
// null, // 状态
|
// null, // 添加时间[非空]
|
// null, // 修改时间[非空]
|
// null // 备注
|
// );
|
|
public Boolean getResultBool(){
|
if (null == this.result){ return null; }
|
switch (this.result){
|
case 1:
|
return true;
|
case 0:
|
return false;
|
default:
|
return null;
|
}
|
}
|
|
public Boolean getStatusBool(){
|
if (null == this.status){ return null; }
|
switch (this.status){
|
case 1:
|
return true;
|
case 0:
|
return false;
|
default:
|
return null;
|
}
|
}
|
|
}
|