MyBatis-plus
IT小土豆
这个作者很懒,什么都没留下…
展开
-
mybatis判断是否为null和空字符串
以下两种实现方式:1:@Select注解使用when标签<when test = 'name!=null and name!=\"\"'> </when>在这里一定要加转义字符2:xml文件使用if标签<if test = "name!=null and name!='' "> </if>两种不同的方式一定要注意单引号和双引号的使用,希望我提供的方法对你有所帮助。...原创 2021-09-30 16:25:41 · 9923 阅读 · 0 评论 -
Mybatis-plus之空值无法插入
Mybatis-plus之空值无法插入异常如下:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='couldDismantle', mode=IN, javaType=class java.lang.Long, jdbc原创 2021-06-15 20:28:35 · 2826 阅读 · 1 评论