mybatis 批量insert

xml:




  
BEGIN
			
    INSERT INTO facerec.face_multiple_images
            (ID, 
             FACE_IMAGE_ADDRESS, 
             FACE_IMAGE_TIME,
             FACE_DB_TYPE,
             FACE_IMAGE_POINT,
             FACE_IMAGE_QUALITY,
             FACE_PERSON_AGE,
             FACE_PERSON_SEX,
             FACE_PERSON_ISGALSSES,
             FACE_IMAGE_SUBIMAGE)
    VALUES
         ( facerec.seq_face_multiple_image.nextval,
           #{item.FACE_IMAGE_ADDRESS}, 
           #{item.FACE_IMAGE_TIME}, 
           #{item.FACE_DB_TYPE}, 
           #{item.FACE_IMAGE_POINT}, 
           #{item.FACE_IMAGE_QUALITY}, 
           #{item.FACE_PERSON_AGE}, 
           #{item.FACE_PERSON_SEX}, 
           #{item.FACE_PERSON_ISGALSSES}, 
           #{item.FACE_IMAGE_SUBIMAGE})
    
		;END ;

java:

List imageslist = new ArrayList();
			if (fileList.length !=0 && fileList != null) {
				for (int i = 0; i < fileList.length; i++) {
					try {
						if(fileList[i].getName().endsWith("-X.jpg")) {
							wjList_X.add(fileList[i]);
						 }else{
							 wjList.add(fileList[i]); 
							 MultipleImages images = new MultipleImages();
							 String[] str = fileList[i].getName().split("-");
							 images.setFACE_IMAGE_ADDRESS(captureImagesPath+LongToString(Long.parseLong(str[2]))+"\\"+str[7]);
							 images.setFACE_IMAGE_TIME(LongToDate(Long.parseLong(str[2])));
							 images.setFACE_DB_TYPE("0");
							 images.setFACE_IMAGE_POINT(getPoint(str[0]));
							 images.setFACE_IMAGE_QUALITY(Integer.parseInt(str[3]));
							 images.setFACE_PERSON_AGE(Integer.parseInt(str[4]));
							 images.setFACE_PERSON_SEX(Integer.parseInt(str[5]));
							 images.setFACE_PERSON_ISGALSSES(Integer.parseInt(str[6]));
							 images.setFACE_IMAGE_SUBIMAGE(captureImagesPath+LongToString(Long.parseLong(str[2]))+"\\"+str[7].substring(0, str[7].indexOf("."))+"_X.jpg");
							 imageslist.add(images);
						 }
					} catch (Exception e) {
						e.printStackTrace();
					}
				 
				}
			}


你可能感兴趣的:(oracle)