1 2 3 4 5 6 7 | if (product != null ){ if (StringUtils.isNotBlank(product.getSubImages())){ String[] subImageArray = product.getSubImages().split( "," ); if (subImageArray.length > 0 ){ product.setMainImage(subImageArray[ 0 ]); } } |
这段代码是什么意思没有看懂 为什么要把分割后的第一个字符串赋值给main_image