From e48fafa45e6ed9111bca6497d493abbd749f2503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Miller=20=28=E9=94=BA=E4=BF=8A=29?= Date: Wed, 13 Jan 2021 18:43:21 +0800 Subject: [PATCH] perf($MyBatisPlus): enable logic delete [skip ci] --- .../src/main/resources/application.yml | 3 ++ .../maf/common/domain/DeleteField.java | 42 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 common/src/main/java/com/jmsoftware/maf/common/domain/DeleteField.java diff --git a/auth-center/src/main/resources/application.yml b/auth-center/src/main/resources/application.yml index 867d973f..2a3079a2 100644 --- a/auth-center/src/main/resources/application.yml +++ b/auth-center/src/main/resources/application.yml @@ -66,6 +66,9 @@ management: show-details: ALWAYS mybatis-plus: + global-config: + db-config: + logic-delete-field: deleted configuration: map-underscore-to-camel-case: true log-impl: org.apache.ibatis.logging.stdout.StdOutImpl diff --git a/common/src/main/java/com/jmsoftware/maf/common/domain/DeleteField.java b/common/src/main/java/com/jmsoftware/maf/common/domain/DeleteField.java new file mode 100644 index 00000000..18aadc33 --- /dev/null +++ b/common/src/main/java/com/jmsoftware/maf/common/domain/DeleteField.java @@ -0,0 +1,42 @@ +package com.jmsoftware.maf.common.domain; + +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; + +/** + * Description: DeleteField, change description here. + * + * @author 钟俊 (zhongjun), email: zhongjun@toguide.cn, date: 1/13/2021 6:32 PM + */ +@Slf4j +@Getter +public enum DeleteField { + /** + * Not deleted + */ + NOT_DELETED((byte) 0, "not deleted"), + /** + * Deleted + */ + DELETED((byte) 1, "deleted"); + + /** + * The Value. + */ + private final Byte value; + /** + * The Description. + */ + private final String description; + + /** + * Instantiates a new Delete field. + * + * @param value the value + * @param description the description + */ + DeleteField(Byte value, String description) { + this.value = value; + this.description = description; + } +}