Loading

随笔分类 -  mybatis plus

摘要:mybatis plus 将属性设置为 null 值会被忽略,最终生成的 sql 中不会有 set field = null(可能是某些情况) mybatis-plus 更新字段的时候设置为 null,忽略实体null判断 在 entity 字段上加上以下注解 @TableField(updateS 阅读全文
posted @ 2021-07-27 20:29 myEsn2E9 阅读(644) 评论(0) 推荐(0)
摘要:MybatisPlus:使用SQL保留字(关键字)的操作 必须要手动在 entity 的字段上加注解,否则最终会报错,因为 mybatis 或者 mybatis plus 不会自动处理 阅读全文
posted @ 2021-07-26 21:02 myEsn2E9 阅读(347) 评论(0) 推荐(0)
摘要:【Mybatis】如何在Mybatis XML文件中使用枚举变量 阅读全文
posted @ 2021-07-26 18:31 myEsn2E9 阅读(626) 评论(0) 推荐(0)
摘要:基本类型数组 mapper.xml <resultMap id="xxDtoResultMap" type="com.xx.xxDto"> <id property="id" column="id" jdbcType="INTEGER"/> <result property="roomCount" 阅读全文
posted @ 2021-07-23 13:05 myEsn2E9 阅读(959) 评论(0) 推荐(0)
摘要:issue snapshot url 阅读全文
posted @ 2021-07-23 13:00 myEsn2E9 阅读(48) 评论(0) 推荐(0)
摘要:<if test="(mac != null and mac != '') or (roomNo != null and roomNo != '') or (bedNo != null and bedNo!= '') or (kinds != null and kinds.size > 0)"> a 阅读全文
posted @ 2021-07-23 10:50 myEsn2E9 阅读(110) 评论(0) 推荐(0)
摘要:说明 本文实现以下需求效果 创建数据时自动填充 createUserId 和 createTime 更新数据时自动填充 updateUserId 和 updateTime(每次修改都自动填充新的 updateTime 值) 软删除数据时自动填充 deleteUserId 和 deleteTime 创 阅读全文
posted @ 2021-07-14 13:19 myEsn2E9 阅读(1988) 评论(2) 推荐(0)
摘要:实体类继承 Model public class Test extends Model<Test> implements Serializable {} 就可以 new Test().insert().... 等在实体上直接调用 service/mapper 的函数,而无需注入 service 或 阅读全文
posted @ 2021-07-12 22:31 myEsn2E9 阅读(67) 评论(0) 推荐(0)