feat: 增加ttl 使用实例
This commit is contained in:
@@ -0,0 +1,359 @@
|
||||
package generator.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 算法实验记录表
|
||||
* @TableName abtest_experiment_algorithm
|
||||
*/
|
||||
@TableName(value ="abtest_experiment_algorithm")
|
||||
public class AbtestExperimentAlgorithm implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 参数列表,json格式的字符串,如[{key:value},]
|
||||
*/
|
||||
private String parametersList;
|
||||
|
||||
/**
|
||||
* 分流模式
|
||||
*/
|
||||
private String shuntType;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private Integer version;
|
||||
|
||||
/**
|
||||
* abtest_experiment_group表中的id,关联实验状态信息
|
||||
*/
|
||||
private Integer abtestExperimentGroupId;
|
||||
|
||||
/**
|
||||
* 实验细节描述
|
||||
*/
|
||||
private String detailsDescription;
|
||||
|
||||
/**
|
||||
* 分流字段
|
||||
*/
|
||||
private String shuntKey;
|
||||
|
||||
/**
|
||||
* 分流比例
|
||||
*/
|
||||
private Integer shuntProportion;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
private String employeeName;
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
private String employeeWorkCode;
|
||||
|
||||
/**
|
||||
* 已删除 1 未删除 0
|
||||
*/
|
||||
private Integer deleted;
|
||||
|
||||
/**
|
||||
* etl更新时间
|
||||
*/
|
||||
private LocalDateTime beidouEtlTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数列表,json格式的字符串,如[{key:value},]
|
||||
*/
|
||||
public String getParametersList() {
|
||||
return parametersList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数列表,json格式的字符串,如[{key:value},]
|
||||
*/
|
||||
public void setParametersList(String parametersList) {
|
||||
this.parametersList = parametersList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分流模式
|
||||
*/
|
||||
public String getShuntType() {
|
||||
return shuntType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分流模式
|
||||
*/
|
||||
public void setShuntType(String shuntType) {
|
||||
this.shuntType = shuntType;
|
||||
}
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
public Integer getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
public void setVersion(Integer version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
/**
|
||||
* abtest_experiment_group表中的id,关联实验状态信息
|
||||
*/
|
||||
public Integer getAbtestExperimentGroupId() {
|
||||
return abtestExperimentGroupId;
|
||||
}
|
||||
|
||||
/**
|
||||
* abtest_experiment_group表中的id,关联实验状态信息
|
||||
*/
|
||||
public void setAbtestExperimentGroupId(Integer abtestExperimentGroupId) {
|
||||
this.abtestExperimentGroupId = abtestExperimentGroupId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 实验细节描述
|
||||
*/
|
||||
public String getDetailsDescription() {
|
||||
return detailsDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* 实验细节描述
|
||||
*/
|
||||
public void setDetailsDescription(String detailsDescription) {
|
||||
this.detailsDescription = detailsDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分流字段
|
||||
*/
|
||||
public String getShuntKey() {
|
||||
return shuntKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分流字段
|
||||
*/
|
||||
public void setShuntKey(String shuntKey) {
|
||||
this.shuntKey = shuntKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分流比例
|
||||
*/
|
||||
public Integer getShuntProportion() {
|
||||
return shuntProportion;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分流比例
|
||||
*/
|
||||
public void setShuntProportion(Integer shuntProportion) {
|
||||
this.shuntProportion = shuntProportion;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
public LocalDateTime getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
public void setUpdateTime(LocalDateTime updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
public LocalDateTime getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
public void setCreateTime(LocalDateTime createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
public String getEmployeeName() {
|
||||
return employeeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
public void setEmployeeName(String employeeName) {
|
||||
this.employeeName = employeeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
public String getEmployeeWorkCode() {
|
||||
return employeeWorkCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
public void setEmployeeWorkCode(String employeeWorkCode) {
|
||||
this.employeeWorkCode = employeeWorkCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* 已删除 1 未删除 0
|
||||
*/
|
||||
public Integer getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* 已删除 1 未删除 0
|
||||
*/
|
||||
public void setDeleted(Integer deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* etl更新时间
|
||||
*/
|
||||
public LocalDateTime getBeidouEtlTime() {
|
||||
return beidouEtlTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* etl更新时间
|
||||
*/
|
||||
public void setBeidouEtlTime(LocalDateTime beidouEtlTime) {
|
||||
this.beidouEtlTime = beidouEtlTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AbtestExperimentAlgorithm other = (AbtestExperimentAlgorithm) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getParametersList() == null ? other.getParametersList() == null : this.getParametersList().equals(other.getParametersList()))
|
||||
&& (this.getShuntType() == null ? other.getShuntType() == null : this.getShuntType().equals(other.getShuntType()))
|
||||
&& (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion()))
|
||||
&& (this.getAbtestExperimentGroupId() == null ? other.getAbtestExperimentGroupId() == null : this.getAbtestExperimentGroupId().equals(other.getAbtestExperimentGroupId()))
|
||||
&& (this.getDetailsDescription() == null ? other.getDetailsDescription() == null : this.getDetailsDescription().equals(other.getDetailsDescription()))
|
||||
&& (this.getShuntKey() == null ? other.getShuntKey() == null : this.getShuntKey().equals(other.getShuntKey()))
|
||||
&& (this.getShuntProportion() == null ? other.getShuntProportion() == null : this.getShuntProportion().equals(other.getShuntProportion()))
|
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
|
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
|
||||
&& (this.getEmployeeName() == null ? other.getEmployeeName() == null : this.getEmployeeName().equals(other.getEmployeeName()))
|
||||
&& (this.getEmployeeWorkCode() == null ? other.getEmployeeWorkCode() == null : this.getEmployeeWorkCode().equals(other.getEmployeeWorkCode()))
|
||||
&& (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
|
||||
&& (this.getBeidouEtlTime() == null ? other.getBeidouEtlTime() == null : this.getBeidouEtlTime().equals(other.getBeidouEtlTime()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getParametersList() == null) ? 0 : getParametersList().hashCode());
|
||||
result = prime * result + ((getShuntType() == null) ? 0 : getShuntType().hashCode());
|
||||
result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
|
||||
result = prime * result + ((getAbtestExperimentGroupId() == null) ? 0 : getAbtestExperimentGroupId().hashCode());
|
||||
result = prime * result + ((getDetailsDescription() == null) ? 0 : getDetailsDescription().hashCode());
|
||||
result = prime * result + ((getShuntKey() == null) ? 0 : getShuntKey().hashCode());
|
||||
result = prime * result + ((getShuntProportion() == null) ? 0 : getShuntProportion().hashCode());
|
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
|
||||
result = prime * result + ((getEmployeeName() == null) ? 0 : getEmployeeName().hashCode());
|
||||
result = prime * result + ((getEmployeeWorkCode() == null) ? 0 : getEmployeeWorkCode().hashCode());
|
||||
result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
|
||||
result = prime * result + ((getBeidouEtlTime() == null) ? 0 : getBeidouEtlTime().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", parametersList=").append(parametersList);
|
||||
sb.append(", shuntType=").append(shuntType);
|
||||
sb.append(", version=").append(version);
|
||||
sb.append(", abtestExperimentGroupId=").append(abtestExperimentGroupId);
|
||||
sb.append(", detailsDescription=").append(detailsDescription);
|
||||
sb.append(", shuntKey=").append(shuntKey);
|
||||
sb.append(", shuntProportion=").append(shuntProportion);
|
||||
sb.append(", updateTime=").append(updateTime);
|
||||
sb.append(", createTime=").append(createTime);
|
||||
sb.append(", employeeName=").append(employeeName);
|
||||
sb.append(", employeeWorkCode=").append(employeeWorkCode);
|
||||
sb.append(", deleted=").append(deleted);
|
||||
sb.append(", beidouEtlTime=").append(beidouEtlTime);
|
||||
sb.append(", serialVersionUID=").append(serialVersionUID);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package generator.mapper;
|
||||
|
||||
import generator.domain.AbtestExperimentAlgorithm;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author wyl
|
||||
* @description 针对表【abtest_experiment_algorithm(算法实验记录表)】的数据库操作Mapper
|
||||
* @createDate 2023-05-26 10:46:15
|
||||
* @Entity generator.domain.AbtestExperimentAlgorithm
|
||||
*/
|
||||
public interface AbtestExperimentAlgorithmMapper extends BaseMapper<AbtestExperimentAlgorithm> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package generator.service;
|
||||
|
||||
import generator.domain.AbtestExperimentAlgorithm;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @author wyl
|
||||
* @description 针对表【abtest_experiment_algorithm(算法实验记录表)】的数据库操作Service
|
||||
* @createDate 2023-05-26 10:46:15
|
||||
*/
|
||||
public interface AbtestExperimentAlgorithmService extends IService<AbtestExperimentAlgorithm> {
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package generator.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import generator.domain.AbtestExperimentAlgorithm;
|
||||
import generator.service.AbtestExperimentAlgorithmService;
|
||||
import generator.mapper.AbtestExperimentAlgorithmMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @author wyl
|
||||
* @description 针对表【abtest_experiment_algorithm(算法实验记录表)】的数据库操作Service实现
|
||||
* @createDate 2023-05-26 10:46:15
|
||||
*/
|
||||
@Service
|
||||
public class AbtestExperimentAlgorithmServiceImpl extends ServiceImpl<AbtestExperimentAlgorithmMapper, AbtestExperimentAlgorithm>
|
||||
implements AbtestExperimentAlgorithmService{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="generator.mapper.AbtestExperimentAlgorithmMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="generator.domain.AbtestExperimentAlgorithm">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="parametersList" column="parameters_list" jdbcType="VARCHAR"/>
|
||||
<result property="shuntType" column="shunt_type" jdbcType="VARCHAR"/>
|
||||
<result property="version" column="version" jdbcType="INTEGER"/>
|
||||
<result property="abtestExperimentGroupId" column="abtest_experiment_group_id" jdbcType="INTEGER"/>
|
||||
<result property="detailsDescription" column="details_description" jdbcType="VARCHAR"/>
|
||||
<result property="shuntKey" column="shunt_key" jdbcType="VARCHAR"/>
|
||||
<result property="shuntProportion" column="shunt_proportion" jdbcType="INTEGER"/>
|
||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="employeeName" column="employee_name" jdbcType="VARCHAR"/>
|
||||
<result property="employeeWorkCode" column="employee_work_code" jdbcType="VARCHAR"/>
|
||||
<result property="deleted" column="deleted" jdbcType="TINYINT"/>
|
||||
<result property="beidouEtlTime" column="beidou_etl_time" jdbcType="TIMESTAMP"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,parameters_list,shunt_type,
|
||||
version,abtest_experiment_group_id,details_description,
|
||||
shunt_key,shunt_proportion,update_time,
|
||||
create_time,employee_name,employee_work_code,
|
||||
deleted,beidou_etl_time
|
||||
</sql>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user