|
@@ -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;
|
|
|
+ }
|
|
|
+}
|