mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-12-12 20:29:27 +08:00
🎉 代码生成增加sqlserver判断
This commit is contained in:
parent
1fcf40d917
commit
d998a37903
@ -25,6 +25,7 @@ import com.baomidou.mybatisplus.generator.config.*;
|
|||||||
import com.baomidou.mybatisplus.generator.config.converts.MySqlTypeConvert;
|
import com.baomidou.mybatisplus.generator.config.converts.MySqlTypeConvert;
|
||||||
import com.baomidou.mybatisplus.generator.config.converts.OracleTypeConvert;
|
import com.baomidou.mybatisplus.generator.config.converts.OracleTypeConvert;
|
||||||
import com.baomidou.mybatisplus.generator.config.converts.PostgreSqlTypeConvert;
|
import com.baomidou.mybatisplus.generator.config.converts.PostgreSqlTypeConvert;
|
||||||
|
import com.baomidou.mybatisplus.generator.config.converts.SqlServerTypeConvert;
|
||||||
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
|
||||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -150,6 +151,9 @@ public class BladeCodeGenerator {
|
|||||||
} else if (StringUtil.containsAny(driverName, DbType.POSTGRE_SQL.getDb())) {
|
} else if (StringUtil.containsAny(driverName, DbType.POSTGRE_SQL.getDb())) {
|
||||||
dsc.setDbType(DbType.POSTGRE_SQL);
|
dsc.setDbType(DbType.POSTGRE_SQL);
|
||||||
dsc.setTypeConvert(new PostgreSqlTypeConvert());
|
dsc.setTypeConvert(new PostgreSqlTypeConvert());
|
||||||
|
} else if (StringUtil.containsAny(driverName, DbType.SQL_SERVER.getDb())) {
|
||||||
|
dsc.setDbType(DbType.SQL_SERVER);
|
||||||
|
dsc.setTypeConvert(new SqlServerTypeConvert());
|
||||||
} else {
|
} else {
|
||||||
dsc.setDbType(DbType.ORACLE);
|
dsc.setDbType(DbType.ORACLE);
|
||||||
dsc.setTypeConvert(new OracleTypeConvert());
|
dsc.setTypeConvert(new OracleTypeConvert());
|
||||||
|
Loading…
Reference in New Issue
Block a user