From d101f6ecd3b874a1e30003186038ea87c7fd43cd Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Thu, 12 Nov 2020 15:47:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=A4=84=E7=90=86=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=92=8C=E4=BF=AE=E6=94=B9=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/guarantee/DgApplyAmountInfo.java | 15 ++++------ .../DgAssetsAssessmentAssetsList.java | 9 ++++-- .../domain/guarantee/DgAssetsAssignUser.java | 15 ++++------ .../guarantee/DgAssetsInvestigation.java | 15 ++++------ .../domain/guarantee/DgBusinessType.java | 7 +++++ .../guarantee/DgComplianceAssignUser.java | 15 ++++------ .../guarantee/DgComplianceInvestigation.java | 15 ++++------ .../domain/guarantee/DgGuaranteeApply.java | 9 ++++-- .../guarantee/DgGuaranteeApplyLast.java | 9 ++++-- .../guarantee/DgGuaranteeAssignUser.java | 15 ++++------ .../guarantee/DgGuaranteeInvestigation.java | 15 ++++------ .../DgGuaranteeLetterAssignUser.java | 15 ++++------ .../guarantee/DgLoanCommitteeConsider.java | 15 ++++------ .../domain/guarantee/DgLoanNotice.java | 15 ++++------ .../domain/guarantee/DgMessageAssignUser.java | 15 ++++------ .../guarantee/DgMessageInvestigation.java | 15 ++++------ .../DgPaymentConfirmationConsider.java | 15 ++++------ .../framework/domain/guarantee/DgProcess.java | 9 ++++-- .../guarantee/DgWorkConferenceConsider.java | 15 ++++------ .../utils/handler/MyMetaObjectHandler.java | 28 +++++++++++++++++++ 20 files changed, 143 insertions(+), 138 deletions(-) create mode 100644 dq-framework-utils/src/main/java/com/daqing/framework/utils/handler/MyMetaObjectHandler.java diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java index c7d8296b..2c3c7d1a 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgApplyAmountInfo.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -69,14 +68,12 @@ public class DgApplyAmountInfo implements Serializable { */ private String businessType; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; /** diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssessmentAssetsList.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssessmentAssetsList.java index 61680be9..ba4bdc76 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssessmentAssetsList.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssessmentAssetsList.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -27,8 +26,12 @@ public class DgAssetsAssessmentAssetsList implements Serializable { private String name; + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssignUser.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssignUser.java index a9e1da73..1780b047 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssignUser.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsAssignUser.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -69,14 +68,12 @@ public class DgAssetsAssignUser implements Serializable { */ private String applyContent; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java index adbb9a3d..a1a31d29 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgAssetsInvestigation.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -99,14 +98,12 @@ public class DgAssetsInvestigation implements Serializable { */ private Integer status; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessType.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessType.java index 28917988..63f4b61c 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessType.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgBusinessType.java @@ -1,5 +1,8 @@ package com.daqing.framework.domain.guarantee; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; @@ -29,7 +32,11 @@ public class DgBusinessType implements Serializable { */ private Integer companyId; + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceAssignUser.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceAssignUser.java index b5bc0e09..f4008bf6 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceAssignUser.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceAssignUser.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -69,14 +68,12 @@ public class DgComplianceAssignUser implements Serializable { */ private String applyContent; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceInvestigation.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceInvestigation.java index 4c650fcc..ee984c0a 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceInvestigation.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgComplianceInvestigation.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -53,14 +52,12 @@ public class DgComplianceInvestigation implements Serializable { */ private Integer status; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeApply.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeApply.java index e4f43900..bcf66e6e 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeApply.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeApply.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -58,7 +57,11 @@ public class DgGuaranteeApply implements Serializable { */ private Integer status; + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeApplyLast.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeApplyLast.java index 200bfdfd..8293646f 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeApplyLast.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeApplyLast.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -58,7 +57,11 @@ public class DgGuaranteeApplyLast implements Serializable { */ private Integer status; + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeAssignUser.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeAssignUser.java index d3d98fee..90f6580e 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeAssignUser.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeAssignUser.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -69,13 +68,11 @@ public class DgGuaranteeAssignUser implements Serializable { */ private String applyContent; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeInvestigation.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeInvestigation.java index 5cf31761..dc1dc64c 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeInvestigation.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeInvestigation.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -78,13 +77,11 @@ public class DgGuaranteeInvestigation implements Serializable { */ private String conversation; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeLetterAssignUser.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeLetterAssignUser.java index 3e6cd25f..006c2a42 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeLetterAssignUser.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgGuaranteeLetterAssignUser.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -48,14 +47,12 @@ public class DgGuaranteeLetterAssignUser implements Serializable { */ private Integer status; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanCommitteeConsider.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanCommitteeConsider.java index 7f9a50f2..fe67d979 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanCommitteeConsider.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanCommitteeConsider.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -78,13 +77,11 @@ public class DgLoanCommitteeConsider implements Serializable { */ private String file; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanNotice.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanNotice.java index d416c001..4301893d 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanNotice.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgLoanNotice.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -48,13 +47,11 @@ public class DgLoanNotice implements Serializable { */ private Integer status; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageAssignUser.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageAssignUser.java index 516630df..3ed36987 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageAssignUser.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageAssignUser.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -69,13 +68,11 @@ public class DgMessageAssignUser implements Serializable { */ private String applyContent; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageInvestigation.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageInvestigation.java index 8a96965c..ffc9fc44 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageInvestigation.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgMessageInvestigation.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -53,13 +52,11 @@ public class DgMessageInvestigation implements Serializable { */ private Integer status; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgPaymentConfirmationConsider.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgPaymentConfirmationConsider.java index 8bd14c63..b4ebca14 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgPaymentConfirmationConsider.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgPaymentConfirmationConsider.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -53,13 +52,11 @@ public class DgPaymentConfirmationConsider implements Serializable { */ private String imgFile; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgProcess.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgProcess.java index b59d9cf2..c7ed98f2 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgProcess.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgProcess.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -50,7 +49,11 @@ public class DgProcess implements Serializable { */ private String remark; + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgWorkConferenceConsider.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgWorkConferenceConsider.java index 2de75936..19d23aa5 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgWorkConferenceConsider.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/guarantee/DgWorkConferenceConsider.java @@ -1,8 +1,7 @@ package com.daqing.framework.domain.guarantee; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.*; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -48,13 +47,11 @@ public class DgWorkConferenceConsider implements Serializable { */ private Integer status; - /** - * 创建时间 - */ + @ApiModelProperty(value = "创建时间") + @TableField(fill = FieldFill.INSERT) private Date createTime; - /** - * 修改时间 - */ + @ApiModelProperty(value = "更新时间") + @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateTime; } diff --git a/dq-framework-utils/src/main/java/com/daqing/framework/utils/handler/MyMetaObjectHandler.java b/dq-framework-utils/src/main/java/com/daqing/framework/utils/handler/MyMetaObjectHandler.java new file mode 100644 index 00000000..f08dd815 --- /dev/null +++ b/dq-framework-utils/src/main/java/com/daqing/framework/utils/handler/MyMetaObjectHandler.java @@ -0,0 +1,28 @@ +package com.daqing.framework.utils.handler; + +import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; +import org.apache.ibatis.reflection.MetaObject; +import org.springframework.stereotype.Component; + +import java.util.Date; + +/** + * @Author chen + * @DATE 2020/10/30 11:13 + * @Version 1.0 + * 自动处理添加和修改时间 + */ +@Component +public class MyMetaObjectHandler implements MetaObjectHandler { + + @Override + public void insertFill(MetaObject metaObject) { + this.setFieldValByName("createTime", new Date(), metaObject); + this.setFieldValByName("updateTime", new Date(), metaObject); + } + + @Override + public void updateFill(MetaObject metaObject) { + this.setFieldValByName("updateTime", new Date(), metaObject); + } +} \ No newline at end of file