
mybatis
自驱
ALOHA HEJA HE
展开
-
【mybatis】注解批量插入
@Insert({ "<script>", "insert into people(name, age, sex) values ", "<foreach collection='peopleList' item='item' index='index' separator=','>", "(#{item.name}, #{item.age}, #{item.sex})", ...原创 2021-03-08 18:27:37 · 365 阅读 · 0 评论 -
mybatis中大于等于小于等于 在注解中的写法
使用:原符号 < <= > >= & ' "替换符号 < <= > >= & ' "例如:sql如下:where enable = #{enable} and userCreateDate >= #{beginDate} and...原创 2020-10-24 14:18:27 · 1184 阅读 · 0 评论 -
【Mybatis】SpringBoot 自定义TypeHandler 完整步骤
1 注解的使用import org.apache.ibatis.annotations.*;import org.apache.ibatis.type.JdbcType;import org.springframework.stereotype.Repository;import java.util.List;@Repositorypublic interface DefXXM...原创 2019-12-08 08:05:57 · 3663 阅读 · 4 评论 -
异常--Error querying database. Cause: java.lang.NumberFormatException: For input string:"xxx"
Error querying database. Cause: java.lang.NumberFormatException: For input string:查询参数含有一个String类型字段,但是前端传递的是”-1”字符串,过来如下判断方式: <if test="taskType !=null and taskType !='0' and taskType !='-1'">原创 2016-12-20 16:00:42 · 15109 阅读 · 1 评论