feat: add logic delete
This commit is contained in:
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
@@ -22,6 +23,7 @@ public class BaseData implements Serializable {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@TableLogic
|
||||
private Boolean delFlag;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
|
||||
@@ -48,6 +48,11 @@ mybatis-plus:
|
||||
type-aliases-package: org.wfc.user
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapper-locations: classpath:mapper/**/*.xml
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-field: del_flag
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
|
||||
# swagger配置
|
||||
swagger:
|
||||
|
||||
@@ -48,6 +48,11 @@ mybatis-plus:
|
||||
type-aliases-package: org.wfc.system
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapper-locations: classpath:mapper/**/*.xml
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-field: del_flag
|
||||
logic-delete-value: 1
|
||||
logic-not-delete-value: 0
|
||||
|
||||
# swagger配置
|
||||
swagger:
|
||||
|
||||
Reference in New Issue
Block a user