mybatis查询参数parameterType

在写select查询的parameterType的时候发现,如果parameterType是一个数组的话,配置语句中不写这个参数类型

	
		DELETE FROM W_BR_PAY_RECORD 
		WHERE
		ID in
		
		   #{id}
		
	

要么配置语句中把参数类型parameterType写成java.util.List也可以如下

 
		DELETE FROM W_BR_PAY_RECORD 
		WHERE
		ID in
		
		   #{id}
		
	

如果参数数组元素是整数也可以写成

 
		DELETE FROM W_BR_PAY_RECORD 
		WHERE
		ID in
		
		   #{id}
		
	
 **或者**
 
		DELETE FROM W_BR_PAY_RECORD 
		WHERE
		ID in
		
		   #{id}
		
	

如果参数map集合也可以写成

 
		DELETE FROM W_BR_PAY_RECORD 
		WHERE
		ID in
		
		   #{id}
		
	
	或者
	 
		DELETE FROM W_BR_PAY_RECORD 
		WHERE
		ID in
		
		   #{id}
		
	

你可能感兴趣的:(Mybatis)