|
|
@@ -68,9 +68,9 @@ public class ProductUsersServiceImpl implements ProductUsersService {
|
|
|
private ProductTempDao productTempDao;
|
|
|
|
|
|
/**
|
|
|
- * 一次上传允许的最大数量 (前三行为标题 从0开始)
|
|
|
+ * 一次上传允许的最大数量
|
|
|
*/
|
|
|
- private final static Integer MAX_ROWNUM = 5002;
|
|
|
+ private final static Integer MAX_ROWNUM = 5000;
|
|
|
|
|
|
@Override
|
|
|
public SPage<ProductUsers> findProductInfoByPageInfo(PageInfo pageInfo) {
|
|
|
@@ -181,9 +181,6 @@ public class ProductUsersServiceImpl implements ProductUsersService {
|
|
|
String codePrefix = "PR" + DateUtils.format(new Date(), "yyMMddHHmmss") + StringUtil.getRandomNumber(3);
|
|
|
Sheet sheet = workbook.getSheetAt(0);
|
|
|
int rowNum = sheet.getLastRowNum();
|
|
|
- if (rowNum > MAX_ROWNUM) {
|
|
|
- throw new IllegalOperatorException("单次上传不超过5000条");
|
|
|
- }
|
|
|
Row headerRow = sheet.getRow(0);
|
|
|
int total = 0;
|
|
|
short isSale = Constant.YES;
|
|
|
@@ -301,7 +298,9 @@ public class ProductUsersServiceImpl implements ProductUsersService {
|
|
|
temps.add(temp);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ if (total > MAX_ROWNUM) {
|
|
|
+ throw new IllegalOperatorException("单次上传不超过5000条");
|
|
|
+ }
|
|
|
modelMap.put("total", total);
|
|
|
// 本地校验
|
|
|
checkTempProducts(temps, modelMap);
|