摘要:<select id="queryPonitPage" resultType=""> </select> resultType 指定返回java对象 接口返回的对象可以与resultType 的不同
阅读全文
posted @ 2020-11-12 10:34
随笔分类 - MyBatis-Plus
摘要:<select id="queryPonitPage" resultType=""> </select> resultType 指定返回java对象 接口返回的对象可以与resultType 的不同
阅读全文
posted @ 2020-11-12 10:34
摘要:原理: 实现元对象处理器接口:com.baomidou.mybatisplus.core.handlers.MetaObjectHandler 注解填充字段 @TableField(.. fill = FieldFill.INSERT) public class User { // 注意!这里需要标
阅读全文
posted @ 2020-10-16 13:18
摘要:一、application.yml添加配置 mybatis-plus: global-config: #sql-injector: com.baomidou.mybatisplus.extension.injector.LogicSqlInjector Deprecated: 3.0开始废除此属性,
阅读全文
posted @ 2020-10-14 17:41
摘要:1.先查询对应的对象 2.new 要更新的对象 设置id,和要更新的字段 3.调用 updateById的方法 例如: User user = UserMapper.seleteOne("条件参数") User newUser = new User(); newUser.setId(user.get
阅读全文
posted @ 2020-07-28 16:14
摘要:<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> 上面的配置换成下面的依赖 <dependency> <gr
阅读全文
posted @ 2020-06-30 18:29
|
||