mybatis判断集合为空或者元素个数为零: <if test="mlhs != null and mlhs.size() != 0"> and t.mlh_name not in <foreach collection="mlhs" item="item1" open="(" close=")" index="i" separator=",">
使用mybatis框架在写sql的时候碰到一个异常: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 类似于sql这样出现的异常 SELECT * FROM eval_question WHERE id not in() 后来就查询前先判
原文:https://blog.csdn.net/qq_34926773/article/details/83419004 BigDecimal类型的数据,需要比较大小:声明BigDescimal: BigDescimal bd = new BigDescimal(str1); Integer a = bd1.compareTo(bd2); a = -1,表示bd1小于bd2: a = 0,表示bd1等于bd2: a = 1,表示bd1大于bd2: 所以判断 BigDecimal判断是否为0:
// 有一个集合,判断集合里有没有“world”这个元素,如果有,添加“javaee” List list = new ArrayList(); list.add("world"); list.add("java"); list.add("hello"); //ConcurrentModificationException /*Iterator it = list.iterator(); while(it.hasNext()){ String s
package com.lanxi.demo2; import java.util.HashSet; import java.util.Iterator; import java.util.Set; public class Test { public static void main(String[] args) { //引用一个Set集合实现类 Set set=new HashSet(); //添加单个元素 set.add("哈"); set.add("士");