Mybatis foreach(Map,List)

foreach循环Map  

为Map时候需要确认parameterType="java.util.Map",且collection为Map中要便利的key值

     Java文件

	        Map map=new HashMap();
		map.put("tikuId", tikuId);
		map.put("userIdList",userIdList);
		allScored.addAll(scoredMapper.selectAllScoreIsAllError(map));
            List selectAllScoreIsAllError(Map map);

XML文件

			 

List

int updateVideoTbSetUserBeDeleted(List list); 

为List时候需要确认parameterType="Java.util.List",且collection为list

		    
  		
			update XXXXX set video_upload_uname='用户消失啦'
	        where video_id in     
	         
	             
	                  #{item}
	             
	        
        
	  

你可能感兴趣的:(框架搭建,java)