|
|
@@ -81,6 +81,8 @@ public class TssGoodsController extends TssBaseController {
|
|
|
@Autowired
|
|
|
private TssCommonService commonService;
|
|
|
|
|
|
+ private static final int EXCEL_ROW_COUNT = 1000;
|
|
|
+
|
|
|
/**
|
|
|
* 상품목록 화면
|
|
|
*
|
|
|
@@ -327,6 +329,11 @@ public class TssGoodsController extends TssBaseController {
|
|
|
|
|
|
Collection<GagaMap> ecxelGoodsList = GagaExcelUtil.getList(GagaFileUtil.getConcatenationPath(targetPath, goods.getExcelFileNm()), 0, cellName, 0);
|
|
|
|
|
|
+ //건수
|
|
|
+ if (ecxelGoodsList != null && ecxelGoodsList.size() > EXCEL_ROW_COUNT) {
|
|
|
+ throw new IllegalStateException("엑셀 파일의 건수를 " +EXCEL_ROW_COUNT + "건 이하로 사용하세요.");
|
|
|
+ }
|
|
|
+
|
|
|
Collection<Goods> goodsList = new ArrayList<>();
|
|
|
for (GagaMap map : ecxelGoodsList) {
|
|
|
Goods tmpGoods = mapper.convertValue(map, Goods.class);
|
|
|
@@ -825,6 +832,11 @@ public class TssGoodsController extends TssBaseController {
|
|
|
|
|
|
ecxelGoodsList = GagaExcelUtil.getList(GagaFileUtil.getConcatenationPath(targetPath, goodsMass.getExcelFileNm()), 0, goodsNames, 0);
|
|
|
|
|
|
+ //건수
|
|
|
+ if (ecxelGoodsList != null && ecxelGoodsList.size() > EXCEL_ROW_COUNT) {
|
|
|
+ throw new IllegalStateException("엑셀 파일의 건수를 " +EXCEL_ROW_COUNT + "건 이하로 사용하세요.");
|
|
|
+ }
|
|
|
+
|
|
|
for (GagaMap gagaMap : ecxelGoodsList) {
|
|
|
goodsService.createExceluploadSelfGoods(gagaMap, goodsMass.getProcJob());
|
|
|
}
|
|
|
@@ -842,6 +854,11 @@ public class TssGoodsController extends TssBaseController {
|
|
|
|
|
|
ecxelGoodsList = GagaExcelUtil.getList(GagaFileUtil.getConcatenationPath(targetPath, goodsMass.getExcelFileNm()), 0, goodsNames, 0);
|
|
|
|
|
|
+ //건수
|
|
|
+ if (ecxelGoodsList != null && ecxelGoodsList.size() > EXCEL_ROW_COUNT) {
|
|
|
+ throw new IllegalStateException("엑셀 파일의 건수를 " +EXCEL_ROW_COUNT + "건 이하로 사용하세요.");
|
|
|
+ }
|
|
|
+
|
|
|
// 사용자의 관리 브랜드 조회
|
|
|
Collection<CommonCode> mdBrandList = rendererService.getAuthBrandList(TssSession.getInfo().getUserNo());
|
|
|
|
|
|
@@ -900,6 +917,11 @@ public class TssGoodsController extends TssBaseController {
|
|
|
throw new IllegalStateException("권한이 없습니다.");
|
|
|
}
|
|
|
|
|
|
+ //건수
|
|
|
+ if (ecxelGoodsList != null && ecxelGoodsList.size() > EXCEL_ROW_COUNT) {
|
|
|
+ throw new IllegalStateException("엑셀 파일의 건수를 " +EXCEL_ROW_COUNT + "건 이하로 사용하세요.");
|
|
|
+ }
|
|
|
+
|
|
|
for (GagaMap gagaMap : ecxelGoodsList) {
|
|
|
goodsService.updateMassExceluploadGoods(gagaMap, goodsMass.getProcJob());
|
|
|
}
|