From c23cd261cc92569c574ed8ee26bf966638d4f71d Mon Sep 17 00:00:00 2001 From: cdtjj <34806335@qq.com> Date: Fri, 22 Apr 2022 07:18:50 +0000 Subject: [PATCH] =?UTF-8?q?Dm=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9A=84KeyGenera?= =?UTF-8?q?tor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DmKeyGenerator | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 DmKeyGenerator diff --git a/DmKeyGenerator b/DmKeyGenerator new file mode 100644 index 0000000..279837f --- /dev/null +++ b/DmKeyGenerator @@ -0,0 +1,27 @@ +package com.baomidou.mybatisplus.extension.incrementer; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator; + +/** + * DM Sequence + * + * @author cdtjj + * @since 2022-04-22 + */ + +public class DmKeyGenerator implements IKeyGenerator { + @Override + public String executeSql(String incrementerName) { + // TODO Auto-generated method stub + return "SELECT " + incrementerName + ".NEXTVAL FROM DUAL"; + } + + @Override + public DbType dbType() { + // TODO Auto-generated method stub + return DbType.DM; + } +} -- Gitee