mp逻辑删除配置

This commit is contained in:
smallchill 2018-12-29 17:55:40 +08:00
parent ef0434fdcd
commit 3a7ebeb0b8
2 changed files with 4 additions and 2 deletions

View File

@ -65,9 +65,9 @@ mybatis-plus:
#驼峰下划线转换
column-underline: true
# 逻辑删除配置
# 逻辑删除全局值1表示已删除这也是Mybatis Plus的默认配置
# 逻辑删除全局值1表示已删除Mybatis Plus的默认配置
logic-delete-value: 1
# 逻辑未删除全局值0表示未删除这也是Mybatis Plus的默认配置
# 逻辑未删除全局值0表示未删除Mybatis Plus的默认配置
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true

View File

@ -18,6 +18,7 @@ package org.springblade.core.mp.base;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -78,6 +79,7 @@ public class BaseEntity implements Serializable {
/**
* 状态[0:未删除,1:删除]
*/
@TableLogic
@ApiModelProperty(value = "是否已删除")
private Integer isDeleted;
}