mybatis
郝小祺
初级博客,很希望交到一些一起成长的盆友们
展开
-
mysql 学习语句
1. 组合两个表 表1:Person列名 类型 PersonId int FirstName varchar LastName varchar PersonId是主表 表2:Address列名 类型 addressId int (主键) PersonId ...原创 2020-10-22 21:16:29 · 80 阅读 · 0 评论 -
解决springboot出现的Invalid bound statement (not found)
1.先看下异常信息:工作之余想用springboot集成一下mybatis plus奈何根据接口文档加入了 <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.3.2</version> &..原创 2020-06-07 09:30:52 · 1617 阅读 · 0 评论 -
mybatis 查询日期之间的数据
<if test="传过来的值 != null and 传过来的值 != ''"> and date_format(开始时间,'%Y-%m-%d') >= date_format(#{值},'%Y-%m-%d')</if><if test="articleTitleQuery.endTime != null and articleTitleQuery.endTime != ''"> and date_format(结束时间,'%Y-%m.原创 2020-05-11 15:36:08 · 855 阅读 · 0 评论 -
mybatis模糊查询(like)
and 列名 LIKE CONCAT('%',#{值,jdbcType=VARCHAR},'%')原创 2020-05-11 15:30:12 · 396 阅读 · 0 评论 -
springBoot中mybatis事务使用方法
1.在SpringBoot中mybatis-plus-boot-starter 或mybatis-spring-boot-starter 会自动定义好事物,在pom.xml中导入jar2.在Application(启动类)中添加注解@EnableTransactionManagement3.在需要回滚的方法或类上添加注解@Transactional//下面是测试效果 执行...原创 2020-03-20 14:02:22 · 869 阅读 · 0 评论 -
mybatis动态sql使用
MyBatis动态sql使用详解<choose>:类似于switch<choose> //when 跟 switch中case一样 <when 条件!= null and 条件 != ''>and条件 = #{条件}</when> <otherwise>如果条件都不符合 则运行</otherwise>&...原创 2019-06-18 15:40:46 · 432 阅读 · 3 评论