|
|
@@ -1,11 +1,15 @@
|
|
|
package com.style24.scm.biz.web;
|
|
|
|
|
|
+import java.awt.Image;
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Collection;
|
|
|
|
|
|
+import javax.imageio.ImageIO;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.swing.ImageIcon;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -24,6 +28,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+import com.style24.core.support.env.TscConstants.GoodsType;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.persistence.TscPageRequest;
|
|
|
import com.style24.persistence.domain.CommonCode;
|
|
|
@@ -213,7 +218,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
goodsSearch.setSearchGb("MASTER");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
goodsSearch.setRegNo(TssSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
|
|
|
goodsSearch.setPageable(new TscPageRequest(goodsSearch.getPageNo() - 1, goodsSearch.getPageSize()));
|
|
|
goodsSearch.getPageable().setTotalCount(goodsService.getGoodsListCount(goodsSearch));
|
|
|
@@ -261,7 +266,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
} else {
|
|
|
|
|
|
// 택가/판매가 입력 여부 확인
|
|
|
- Goods dataGoods = goodsService.getGoods(tmpGoods);
|
|
|
+ Goods dataGoods = goodsService.getGoodsInfo(tmpGoods);
|
|
|
if (dataGoods == null) {
|
|
|
returnGoods += tmpGoods.getGoodsCd() + ",";
|
|
|
continue;
|
|
|
@@ -388,7 +393,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
/**
|
|
|
* 상품 상세 화면
|
|
|
*
|
|
|
- * @param goodsCode - 상품코드
|
|
|
+ * @param GoodsCd - 상품코드
|
|
|
* @return
|
|
|
* @author eskim
|
|
|
* @since 2020. 10. 23
|
|
|
@@ -494,7 +499,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
public ModelAndView getGoodsDetailSizeStockForm(Goods goods) {
|
|
|
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
- mav.addObject("goods", goodsService.getGoods(goods));
|
|
|
+ mav.addObject("goods", goodsService.getGoodsInfo(goods));
|
|
|
mav.addObject("goodsSizeList", goodsService.getGoodsSizeList(goods));
|
|
|
mav.addObject("goodsColorList", goodsService.getGoodsColorList(goods));
|
|
|
// 사용여부
|
|
|
@@ -606,14 +611,14 @@ public class TssGoodsController extends TssBaseController {
|
|
|
/**
|
|
|
* 상품 이미지 보기 화면
|
|
|
*
|
|
|
- * @param goodsCode - 상품코드
|
|
|
+ * @param GoodsCd - 상품코드
|
|
|
* @return
|
|
|
* @author eskim
|
|
|
* @since 2020. 12. 23
|
|
|
*/
|
|
|
@GetMapping("/image/form")
|
|
|
@ResponseBody
|
|
|
- public ModelAndView imageMassForm(GoodsImg goodsImg) {
|
|
|
+ public ModelAndView imageForm(GoodsImg goodsImg) {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
|
Collection<GoodsImg> goodsImgList = goodsService.getGoodsImgList(goodsImg);
|
|
|
@@ -629,11 +634,15 @@ public class TssGoodsController extends TssBaseController {
|
|
|
if (goodsImgInfo.getMouseoverImgYn().equals("Y")) {
|
|
|
mav.addObject("mouseoverImgOrd", goodsImgInfo.getDispOrd());
|
|
|
}
|
|
|
+ if (goodsImgInfo.getExtmallImgYn().equals("Y")) {
|
|
|
+ mav.addObject("extmallImgOrd", goodsImgInfo.getDispOrd());
|
|
|
+ }
|
|
|
}
|
|
|
} else { // 대표이미지와 마우스오버이미지가 없으면
|
|
|
mav.addObject("goodsImgList", new ArrayList<GoodsImg>());
|
|
|
mav.addObject("defaultImgOrd", "1");
|
|
|
mav.addObject("mouseoverImgOrd", "1");
|
|
|
+ mav.addObject("extmallImgOrd", "0");
|
|
|
}
|
|
|
|
|
|
GoodsImg goodsModelInfo = goodsService.getGoodsModelInfo(goodsImg);
|
|
|
@@ -688,7 +697,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
if (strBrandNo.isEmpty()) {
|
|
|
Goods goods = new Goods();
|
|
|
goods.setGoodsCd(goodsImg.getGoodsCd());
|
|
|
- Goods goodsInfo = goodsService.getGoods(goods);
|
|
|
+ Goods goodsInfo = goodsService.getGoodsInfo(goods);
|
|
|
if (goodsInfo == null || goodsInfo.getGoodsCd().isEmpty()) {
|
|
|
throw new IllegalStateException(message.getMessage("FAIL_1001"));
|
|
|
}
|
|
|
@@ -698,11 +707,6 @@ public class TssGoodsController extends TssBaseController {
|
|
|
String brandDir = GagaStringUtil.getLPadding(strBrandNo, 10, "0");
|
|
|
|
|
|
if (goodsImg.getMode().equals("C")) { // 업로드 된 파일 rename 처리
|
|
|
-// String newFilename = goodsImg.getGoodsCd()
|
|
|
-// + "_" + goodsImg.getColorCd()
|
|
|
-// + "_" + String.valueOf(index)
|
|
|
-// + "(" + GagaDateUtil.getTodayTime() + ")"
|
|
|
-// + "." + StringUtils.getFilenameExtension(goodsImg.getSysImgNm());
|
|
|
String newFilename = goodsImg.getSysImgNm();
|
|
|
|
|
|
//브랜드 폴더 확인
|
|
|
@@ -740,6 +744,15 @@ public class TssGoodsController extends TssBaseController {
|
|
|
goodsImg.setDispOrd(index++);
|
|
|
goodsImg.setOrgImgNm(GagaFileUtil.getConcatenationPath(brandYmdDir, newFile.getName()));
|
|
|
goodsImg.setSysImgNm(GagaFileUtil.getConcatenationPath(brandYmdDir, newFile.getName()));
|
|
|
+
|
|
|
+ Image srcImg = getImageObject(newFile);
|
|
|
+ int width = srcImg.getWidth(null);
|
|
|
+ int height = srcImg.getHeight(null);
|
|
|
+
|
|
|
+ if (width == height) {
|
|
|
+ // 외부몰연동용 이미지로 설정
|
|
|
+ goodsImg.setExtmallImgYn("Y");
|
|
|
+ }
|
|
|
} else {
|
|
|
goodsImg.setOrgImgNm(GagaFileUtil.getConcatenationPath(goodsImg.getSysImgUrl(), goodsImg.getSysImgNm()));
|
|
|
goodsImg.setSysImgNm(GagaFileUtil.getConcatenationPath(goodsImg.getSysImgUrl(), goodsImg.getSysImgNm()));
|
|
|
@@ -772,21 +785,298 @@ public class TssGoodsController extends TssBaseController {
|
|
|
/**
|
|
|
* 상품 이미지 대량관리 화면
|
|
|
*
|
|
|
- * @param goodsCode - 상품코드
|
|
|
+ * @param GoodsCd - 상품코드
|
|
|
* @return
|
|
|
* @author eskim
|
|
|
* @since 2020. 11. 09
|
|
|
*/
|
|
|
@GetMapping("/image/mass/form")
|
|
|
@ResponseBody
|
|
|
- public ModelAndView imageMassForm(Goods goods) {
|
|
|
+ public ModelAndView imageMassForm() {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
|
|
|
- mav.addObject("params", goods);
|
|
|
mav.setViewName("goods/GoodsImageMassForm");
|
|
|
return mav;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 상품 대량 썸네일 이미지 저장 처리
|
|
|
+ * @param goodsImgList - 상품이미지 목록
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ * @author eskim
|
|
|
+ * @since 2021. 5. 16
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/thumbnail/image/mass/save", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public GagaResponse saveGoodsThumbnailImageMassList(@RequestBody Collection<GoodsImg> goodsImgList) throws Exception {
|
|
|
+ if (goodsImgList == null || goodsImgList.isEmpty()) {
|
|
|
+ throw new IllegalStateException(message.getMessage("FAIL_1001"));
|
|
|
+ }
|
|
|
+
|
|
|
+ String dextUploadPath = env.getProperty("upload.dext.target.path");
|
|
|
+ String goodsTargetPath = env.getProperty("upload.goods.target.path");
|
|
|
+
|
|
|
+ //순서 재정렬된 파일 목록
|
|
|
+ Collection<GoodsImg> resultGoodsImgList = new ArrayList<GoodsImg>();
|
|
|
+ boolean procFlag = true;
|
|
|
+ int index = 0;
|
|
|
+
|
|
|
+ // 오류 파일 목록
|
|
|
+ Collection<File> errorFileList = new ArrayList<File>();
|
|
|
+ Collection<File> errorFileDextList = new ArrayList<File>();
|
|
|
+
|
|
|
+// log.debug("SORT 전 : goodsImgList {}", goodsImgList);
|
|
|
+
|
|
|
+ String[] arrGoodsImg = new String[goodsImgList.size()];
|
|
|
+ String[] arrGoodsCd = new String[goodsImgList.size()];
|
|
|
+ ;
|
|
|
+ index = 0;
|
|
|
+ for (GoodsImg goodsImg : goodsImgList) {
|
|
|
+
|
|
|
+ File massFile = new File(GagaFileUtil.getConcatenationPath(dextUploadPath, goodsImg.getSysImgNm()));
|
|
|
+ errorFileDextList.add(massFile);
|
|
|
+
|
|
|
+ int lastIdx = goodsImg.getSysImgNm().lastIndexOf('.');
|
|
|
+ String orgFile = goodsImg.getSysImgNm().substring(0, lastIdx);
|
|
|
+ String[] sysFileNmArr = orgFile.split("_");
|
|
|
+
|
|
|
+ // 촬영업체 - 자사상품
|
|
|
+ if ("G001_E000".equals(TssSession.getInfo().getRoleCd())) {
|
|
|
+ if (sysFileNmArr.length != 3) {
|
|
|
+ procFlag = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ // 입점억체 - 입점상품
|
|
|
+ } else if ("G001_B000".equals(TssSession.getInfo().getRoleCd())) {
|
|
|
+ if (sysFileNmArr.length != 2) {
|
|
|
+ procFlag = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ deleteErrorFileList(errorFileDextList);
|
|
|
+ throw new IllegalStateException("권한이 없습니다.");
|
|
|
+ }
|
|
|
+
|
|
|
+ //for (int i = 0; i < sysFileNmArr.length; i++) log.debug("SORT 후 : sysFileNmArr[i] {}", sysFileNmArr[i]);
|
|
|
+ arrGoodsImg[index] = goodsImg.getSysImgNm();
|
|
|
+ arrGoodsCd[index] = sysFileNmArr[0];
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!procFlag) {
|
|
|
+ String msg = "이미지파일 형식을 확인해주세요.(상품코드_컬러코드_순번.jpg)";
|
|
|
+ if ("G001_B000".equals(TssSession.getInfo().getRoleCd())) {
|
|
|
+ msg = "이미지파일 형식을 확인해주세요.(상품코드_순번.jpg)";
|
|
|
+ }
|
|
|
+ deleteErrorFileList(errorFileDextList);
|
|
|
+ throw new IllegalStateException(msg);
|
|
|
+ }
|
|
|
+
|
|
|
+ Arrays.sort(arrGoodsImg);
|
|
|
+
|
|
|
+ //for (int i = 0; i < arrGoodsImg.length; i++) log.debug("SORT 후 : arrGoodsImg[i] {}", arrGoodsImg[i]);
|
|
|
+
|
|
|
+ index = 0;
|
|
|
+ for (int i = 0; i < arrGoodsImg.length; i++) {
|
|
|
+ for (GoodsImg goodsImg : goodsImgList) {
|
|
|
+ if (arrGoodsImg[i].equals(goodsImg.getSysImgNm())) {
|
|
|
+ resultGoodsImgList.add(goodsImg);
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+// log.debug("SORT 후 : resultGoodsImgList {}", resultGoodsImgList);
|
|
|
+
|
|
|
+ index = 1;
|
|
|
+ errorFileList.clear();
|
|
|
+
|
|
|
+ String comGoodsCd = "";
|
|
|
+ String comGoodsColor = "";
|
|
|
+ String strBrandNo = "";
|
|
|
+ String brandDir = "";
|
|
|
+
|
|
|
+ // 1.업로드된 파일
|
|
|
+ for (GoodsImg goodsImg : resultGoodsImgList) {
|
|
|
+
|
|
|
+ int lastIdx = goodsImg.getSysImgNm().lastIndexOf('.');
|
|
|
+ String orgFile = goodsImg.getSysImgNm().substring(0, lastIdx);
|
|
|
+ String[] sysFileNmArr = orgFile.split("_");
|
|
|
+ String selfGoodsYn = "Y";
|
|
|
+ // 촬영업체
|
|
|
+ if ("G001_E000".equals(TssSession.getInfo().getRoleCd())) {
|
|
|
+ goodsImg.setGoodsCd(sysFileNmArr[0]);
|
|
|
+ goodsImg.setColorCd(sysFileNmArr[1]);
|
|
|
+ goodsImg.setDispOrd(index);
|
|
|
+ } else {
|
|
|
+ goodsImg.setGoodsCd(sysFileNmArr[0]);
|
|
|
+ goodsImg.setColorCd("XX");
|
|
|
+ goodsImg.setDispOrd(index);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!comGoodsCd.equals(goodsImg.getGoodsCd())) {
|
|
|
+ comGoodsCd = goodsImg.getGoodsCd();
|
|
|
+ comGoodsColor = goodsImg.getColorCd();
|
|
|
+ index = 1;
|
|
|
+
|
|
|
+ // 상품코드 확인
|
|
|
+ Goods goods = new Goods();
|
|
|
+ goods.setGoodsCd(comGoodsCd);
|
|
|
+ Goods goodsInfo = goodsService.getGoodsInfo(goods);
|
|
|
+ if (goodsInfo == null || goodsInfo.getGoodsCd().isEmpty()) {
|
|
|
+ deleteErrorFileList(errorFileList);
|
|
|
+ deleteErrorFileList(errorFileDextList);
|
|
|
+ throw new IllegalStateException(goodsImg.getSysImgNm() + "의" + comGoodsCd + " 상품코드가 존재하지 않습니다.");
|
|
|
+ }
|
|
|
+
|
|
|
+ strBrandNo = String.valueOf(goodsInfo.getBrandNo());
|
|
|
+ brandDir = GagaStringUtil.getLPadding(strBrandNo, 10, "0");
|
|
|
+ selfGoodsYn = goodsInfo.getSelfGoodsYn();
|
|
|
+ // 일반상품이고 자사상품인 경우 색상 확인
|
|
|
+ if (GoodsType.NORMAL.equals(goodsInfo.getGoodsType()) && "Y".equals(selfGoodsYn)) {
|
|
|
+ Option option = new Option();
|
|
|
+ option.setGoodsCd(comGoodsCd);
|
|
|
+ option.setOptCd1(comGoodsColor);
|
|
|
+ int opt1CdCnt = goodsService.getGoodsOption1Count(option);
|
|
|
+ if (opt1CdCnt <= 0) {
|
|
|
+ deleteErrorFileList(errorFileList);
|
|
|
+ deleteErrorFileList(errorFileDextList);
|
|
|
+ throw new IllegalStateException(goodsImg.getSysImgNm() + "의" + comGoodsCd + " 상품코드의 " + comGoodsColor + " 색상이 존재하지 않습니다.");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (comGoodsCd.equals(goodsImg.getGoodsCd()) && !comGoodsColor.equals(goodsImg.getColorCd()) && "Y".equals(selfGoodsYn)) {
|
|
|
+
|
|
|
+ comGoodsColor = goodsImg.getColorCd();
|
|
|
+ index = 1;
|
|
|
+ Option option = new Option();
|
|
|
+ option.setGoodsCd(comGoodsCd);
|
|
|
+ option.setOptCd1(comGoodsColor);
|
|
|
+ int opt1CdCnt = goodsService.getGoodsOption1Count(option);
|
|
|
+ if (opt1CdCnt <= 0) {
|
|
|
+ deleteErrorFileList(errorFileList);
|
|
|
+ deleteErrorFileList(errorFileDextList);
|
|
|
+ throw new IllegalStateException(goodsImg.getSysImgNm() + "의" + comGoodsCd + " 상품코드의 " + comGoodsColor + " 색상이 존재하지 않습니다.");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ String newFilename = goodsImg.getSysImgNm();
|
|
|
+
|
|
|
+ //브랜드 폴더 확인
|
|
|
+ String goodsUploadPath = GagaFileUtil.getConcatenationPath(goodsTargetPath, brandDir); // 브랜드 폴더
|
|
|
+ File brandPath = new File(goodsUploadPath);
|
|
|
+ if (!brandPath.exists()) {
|
|
|
+ brandPath.mkdir();
|
|
|
+ }
|
|
|
+
|
|
|
+ goodsUploadPath = GagaFileUtil.getConcatenationPath(goodsUploadPath, GagaDateUtil.getToday()); //브랜드+/+YYYYMMDD(UPLOAD 일 )
|
|
|
+ String brandYmdDir = GagaFileUtil.getConcatenationPath(brandDir, GagaDateUtil.getToday()); //디비 저장용
|
|
|
+
|
|
|
+ File uniqueFile = GagaFileUtil.getUniqueFile(new File(GagaFileUtil.getConcatenationPath(goodsUploadPath, newFilename)));
|
|
|
+ File newFile = new File(GagaFileUtil.getConcatenationPath(goodsUploadPath, uniqueFile.getName()));
|
|
|
+ //log.debug("newFile.getPath(): {}", newFile.getPath());
|
|
|
+
|
|
|
+ // resizing 처리 시 오류가 발생할 경우 삭제하기 위해 설정
|
|
|
+ errorFileList.add(newFile);
|
|
|
+
|
|
|
+ File oldFile = new File(GagaFileUtil.getConcatenationPath(dextUploadPath, goodsImg.getSysImgNm()));
|
|
|
+ //log.debug("oldFile.getPath(): {}", oldFile.getPath());
|
|
|
+
|
|
|
+ File path = new File(goodsUploadPath);
|
|
|
+ if (!path.exists()) {
|
|
|
+ //log.info("mkdir ={}", goodsUploadPath);
|
|
|
+ path.mkdir();
|
|
|
+ }
|
|
|
+
|
|
|
+ boolean copyFlag = GagaFileUtil.copyFile(oldFile, newFile);
|
|
|
+ if (copyFlag) {
|
|
|
+ //기존이미지 삭제
|
|
|
+ GagaFileUtil.deleteFile(oldFile.getPath());
|
|
|
+ }
|
|
|
+
|
|
|
+ goodsImg.setDispOrd(index);
|
|
|
+ goodsImg.setOrgImgNm(GagaFileUtil.getConcatenationPath(brandYmdDir, newFile.getName()));
|
|
|
+ goodsImg.setSysImgNm(GagaFileUtil.getConcatenationPath(brandYmdDir, newFile.getName()));
|
|
|
+ goodsImg.setDefaultImgYn("N");
|
|
|
+ goodsImg.setMouseoverImgYn("N");
|
|
|
+ goodsImg.setExtmallImgYn("N");
|
|
|
+ goodsImg.setRegNo(TssSession.getInfo().getUserNo());
|
|
|
+
|
|
|
+ // 첫번째 이미지이면 디폴트 이미지 설정
|
|
|
+ if (index == 1) {
|
|
|
+ goodsImg.setDefaultImgYn("Y");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 두번째 이미지이면 마우스오버 이미지 설정
|
|
|
+ if (index == 2) {
|
|
|
+ goodsImg.setMouseoverImgYn("Y");
|
|
|
+ }
|
|
|
+
|
|
|
+ Image srcImg = getImageObject(newFile);
|
|
|
+ int width = srcImg.getWidth(null);
|
|
|
+ int height = srcImg.getHeight(null);
|
|
|
+
|
|
|
+ if (width == height) {
|
|
|
+ // 외부몰연동용 이미지로 설정
|
|
|
+ goodsImg.setExtmallImgYn("Y");
|
|
|
+ }
|
|
|
+ // 오류가 발생했으므로
|
|
|
+// deleteErrorFileList(errorFileList);
|
|
|
+// deleteErrorFileList(errorFileDextList);
|
|
|
+// throw new IllegalStateException(goodsImg.getSysImgNm() + " 상품이미지 파일의 크기(" + width + "*" + height + ")가 맞지 않습니다. (올바른 크기: 1079*1499, 750*1041, 1000*1000)");
|
|
|
+
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+
|
|
|
+ //log.debug("resultGoodsImgList: {}", resultGoodsImgList);
|
|
|
+
|
|
|
+ // 상품이미지 저장 처리
|
|
|
+ goodsService.saveGoodsImageMassList(resultGoodsImgList);
|
|
|
+
|
|
|
+ return super.ok(message.getMessage("SUCC_0007"));
|
|
|
+ }
|
|
|
+
|
|
|
+ /*
|
|
|
+ * 이미지 파일 확인
|
|
|
+ */
|
|
|
+ public static Image getImageObject(File f) throws IOException {
|
|
|
+ Image objImg = null;
|
|
|
+ String suffix = f.getName().substring(f.getName().lastIndexOf('.') + 1).toLowerCase();
|
|
|
+// if (suffix.equals("bmp") || suffix.equals("png") || suffix.equals("gif") || suffix.equals("jpg")) {
|
|
|
+ if (suffix.equals("png") || suffix.equals("gif") || suffix.equals("jpg")) {
|
|
|
+ objImg = ImageIO.read(f);
|
|
|
+ } else {
|
|
|
+ // ImageIcon을 활용해서 Image 생성
|
|
|
+ // 이렇게 하는 이유는 getScaledInstance를 통해 구한 이미지를
|
|
|
+ // PixelGrabber.grabPixels로 리사이즈 할 때 빠르게 처리하기 위함이다.
|
|
|
+ objImg = new ImageIcon(f.toURI().toURL()).getImage();
|
|
|
+ }
|
|
|
+
|
|
|
+ return objImg;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 파일 삭제
|
|
|
+ *
|
|
|
+ * @param errorFileList
|
|
|
+ * @author eskim
|
|
|
+ * @since 2021. 5. 16
|
|
|
+ */
|
|
|
+ private void deleteErrorFileList(Collection<File> errorFileList) {
|
|
|
+ // 파일 삭제
|
|
|
+ if (errorFileList != null && !errorFileList.isEmpty()) {
|
|
|
+ for (File errorFile : errorFileList) {
|
|
|
+ try {
|
|
|
+ GagaFileUtil.deleteFile(errorFile.getPath());
|
|
|
+ } catch (IOException e) {
|
|
|
+ // Nothing Do
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 상품 대량 등록 화면
|
|
|
*
|
|
|
@@ -1300,7 +1590,7 @@ public class TssGoodsController extends TssBaseController {
|
|
|
goodsService.updateFreeGoods(freeGoods);
|
|
|
return super.ok(message.getMessage("SUCC_0001"));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 상품 안전인증 조회
|
|
|
*
|