// 获取总行数(含表头)
Integer rowNumber = context.readSheetHolder().getApproximateTotalRowNumber();
if (rowNumber > GoodsConstants.MAX_BATCH_COUNT) {
throw new BusinessException(GoodsResultCode.MAX_ROW_NUMBER, GoodsConstants.MAX_BATCH_COUNT);
}
/**
* 基础redis常量类
*/
public class GoodsConstants {
public static final String MANAGER_ADD_GOODS = "MANAGER_ADD_GOODS";
public static final Integer FAVORABLE_COMMENT_INIT_COUNT = 4;
/**
* 单次缓存的数据量
*/
public static final int BATCH_COUNT = 200;
/**
* 单次最大数据量
*/
public static final int MAX_BATCH_COUNT = 2000;
/**
* 文件格式后缀
*/
public static final String FORMAT = ".xlsx";
}