private String createSqlByBean(List<Field> fields,boolean update){
    	// 表名
    	String tableName = type.getAnnotation(Table.class).name();
    	StringBuilder sb = new StringBuilder();
    	// insert sql
    	StringBuilder columns = new StringBuilder();
    	StringBuilder values = new StringBuilder();
    	// update sql
    	StringBuilder updateInfo = new StringBuilder();
    	int i = 0;
    	int j = 0;
		for (Field field : fields) {
			if (j != 0) {
				columns.append(",");
				values.append(",");
			}
			j++;
			columns.append(field.getName());
			values.append("?");
			if (update) {
				// 主键更新默认忽略
				Id id = field.getAnnotation(Id.class);
				if(id != null || field.getName().equals(BatchSaveIgnore.defaultIdName)){
					continue;
				}
				BatchSaveIgnore ignoreField = field.getAnnotation(BatchSaveIgnore.class);
				if (ignoreField == null || ignoreField.ingoreLevel() != BatchSaveIgnore.update) {
					if (i != 0) {
						updateInfo.append(",");
					}
					updateInfo.append(field.getName()).append("=").append("?");
					i++;
				}
			}
		}
		if (update) {
			sb.append("INSERT INTO ").append(tableName).append(" ( ")
					.append(columns).append(" ) VALUES ( ").append(values)
					.append(" ) ON DUPLICATE KEY UPDATE ").append(updateInfo);
		} else {
			sb.append("INSERT IGNORE INTO ").append(tableName).append("(")
					.append(columns).append(") VALUES (").append(values)
					.append(")");
		}
    	return sb.toString();
    }