# CHANGELOG
page 分页新增控制是否优化 Count Sql 设置
// 不进行 count sql 优化
page.setOptimizeCountSql(false);
注入定义填充,支持sql注入器,主键生成器.
fixed github issues/231
fixed github issues/234
修改逻辑删除 selectByIds coll 问题
fixed gitee issues/IHF7N
fixed gitee issues/IHH83
兼容配置方式,优先使用自定义注入.
其他优化
字符串类型
IdWorker.getIdStr() 字符串类型TableField 注解新增属性 update
预处理 set 字段自定义注入 fixed gitee IHART
例如:@TableField(.. , update="%s+1") 其中 %s 会填充为字段
输出 SQL 为:update 表 set 字段=字段+1 where ...
例如:@TableField(.. , update="now()") 使用数据库时间
输出 SQL 为:update 表 set 字段=now() where ...
TableField 注解新增属性 condition
预处理 WHERE 实体条件自定义运算规则
@TableField(condition = SqlCondition.LIKE)
private String name;
输出 SQL 为:select 表 where name LIKE CONCAT('%',值,'%')
添加 spring-boot-starter 模块内置 jdbc mp 包不需要单独引入
更舒服的使用 boot
添加对 SQL Server 视图生成的支持
允许字段策略独立设置,默认为 naming 策略
strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
strategy.setColumnNaming(NamingStrategy.underline_to_camel);// 允许字段策略独立设置,默认为 naming 策略
代码生成器抽象 AbstractTemplateEngine 模板引擎抽象类,可自定义模板引擎,新增内置 freemarker 可选
// 选择 freemarker 引擎
mpg.setTemplateEngine(new FreemarkerTemplateEngine());
相关 SQL 解析如多租户可通过 @SqlParser(filter=true)
排除 SQL 解析
# 开启 SQL 解析缓存注解生效
mybatis-plus:
global-config:
sql-parser-cache: true
解决xml加载顺序问题,可随意引入其他 xml sql 片段
修复 author 带123的bug
fix #IGQGE:Wrapper为空,但是page.getCondition()不为空的情况,Condition无法传递问题
fix #IH6ED:Pagination dubbo 排序等属性序列化不支持
判断Wrapper是否为空,使用==,避免被equals方法重载的影响
避免注入自定义基类
剥离 sql 单独提出至 SqlUtils
统一缩进编码风格
优化生成代码执行性能 github issues/219
优化 sql 解析过程
fixed gitee issues/IHCQB
springboot-configuration-processor 修改 compileOnly为optional
其他
####主体功能
####代码生成
####主体功能
####代码生成
####上个版本(2.0.9)升级导致的问题
Insert not found et
异常,见#331###Mybatis-Plus-Boot-Start [1.0.4]
####主体变动
###Mybaits-Plus ####主体功能
and()
or()
方法####代码生成
###Mybatis-Plus-Boot-Start [1.0.2] 代号:清风 ####主体功能
?
导致打印SQL不准确问题,并添加格式化SQL选项--
的情况