|
@@ -24,6 +24,7 @@ import com.style24.persistence.domain.Brand;
|
|
|
import com.style24.persistence.domain.Color;
|
|
import com.style24.persistence.domain.Color;
|
|
|
import com.style24.persistence.domain.FreeGoods;
|
|
import com.style24.persistence.domain.FreeGoods;
|
|
|
import com.style24.persistence.domain.Goods;
|
|
import com.style24.persistence.domain.Goods;
|
|
|
|
|
+import com.style24.persistence.domain.GoodsCategory;
|
|
|
import com.style24.persistence.domain.GoodsCompose;
|
|
import com.style24.persistence.domain.GoodsCompose;
|
|
|
import com.style24.persistence.domain.GoodsDesc;
|
|
import com.style24.persistence.domain.GoodsDesc;
|
|
|
import com.style24.persistence.domain.GoodsEpSkip;
|
|
import com.style24.persistence.domain.GoodsEpSkip;
|
|
@@ -88,10 +89,10 @@ public class TsaGoodsService {
|
|
|
private TsaCommonService commonService;
|
|
private TsaCommonService commonService;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private TsaRendererService rendererService;
|
|
|
|
|
|
|
+ private TsaNoticeService noticeService;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private TsaNoticeService noticeService;
|
|
|
|
|
|
|
+ private TsaDisplayService displayService;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private SafetyKoreaApi safetyKoreaApi;
|
|
private SafetyKoreaApi safetyKoreaApi;
|
|
@@ -228,8 +229,9 @@ public class TsaGoodsService {
|
|
|
*/
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
@Transactional("shopTxnManager")
|
|
|
public void saveNotiInfoItem(Collection<NotiInfo> notiInfoList) {
|
|
public void saveNotiInfoItem(Collection<NotiInfo> notiInfoList) {
|
|
|
- if (notiInfoList == null || notiInfoList.isEmpty())
|
|
|
|
|
|
|
+ if (notiInfoList == null || notiInfoList.isEmpty()) {
|
|
|
throw new IllegalStateException(message.getMessage("FAIL_1001"));
|
|
throw new IllegalStateException(message.getMessage("FAIL_1001"));
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
for (NotiInfo notiInfo : notiInfoList) {
|
|
for (NotiInfo notiInfo : notiInfoList) {
|
|
|
if (!StringUtils.isBlank(notiInfo.getNiContent())) {
|
|
if (!StringUtils.isBlank(notiInfo.getNiContent())) {
|
|
@@ -871,72 +873,29 @@ public class TsaGoodsService {
|
|
|
}
|
|
}
|
|
|
goodsDao.updateGoodsSnm(goods);
|
|
goodsDao.updateGoodsSnm(goods);
|
|
|
|
|
|
|
|
- Collection<GoodsNotiInfo> goodsNotiInfoList = goodsDao.getNewNotiInfo(goods);
|
|
|
|
|
- goodsDao.deleteGoodsNotiInfo(goods);
|
|
|
|
|
|
|
+ //상품 등록후에는 고시정보는 품목과 상관없이 변경처리 가능하게
|
|
|
|
|
+// Collection<GoodsNotiInfo> goodsNotiInfoList = goodsDao.getNewNotiInfo(goods);
|
|
|
|
|
+// goodsDao.deleteGoodsNotiInfo(goods);
|
|
|
|
|
+//
|
|
|
|
|
+// for (GoodsNotiInfo goodsNotiInfo : goodsNotiInfoList) {
|
|
|
|
|
+// goodsNotiInfo.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
+// goodsNotiInfo.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
+// goodsNotiInfo.setGoodsCd(goods.getGoodsCd());
|
|
|
|
|
+// goodsDao.saveGoodsNotiInfo(goodsNotiInfo);
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
- for (GoodsNotiInfo goodsNotiInfo : goodsNotiInfoList) {
|
|
|
|
|
- goodsNotiInfo.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
- goodsNotiInfo.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
- goodsNotiInfo.setGoodsCd(goods.getGoodsCd());
|
|
|
|
|
- goodsDao.saveGoodsNotiInfo(goodsNotiInfo);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 품목변경시 카테고리 전시카테고리 변경
|
|
|
|
|
+ GoodsCategory goodsCategory = new GoodsCategory();
|
|
|
|
|
+ goodsCategory.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
+ goodsCategory.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
+ goodsCategory.setGoodsCd(goods.getGoodsCd());
|
|
|
|
|
+ goodsCategory.setCateType("G031_10"); //상품분류카테고리
|
|
|
|
|
+ displayService.deleteGoodsCategory(goodsCategory);
|
|
|
|
|
+ goodsDao.createCategoryGoods(goods);
|
|
|
|
|
|
|
|
- this.saveGoodsCategory(goods);
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * 상품 품목 기준 카테고리 저장
|
|
|
|
|
- *
|
|
|
|
|
- * @param goods
|
|
|
|
|
- * @author eskim
|
|
|
|
|
- * @since 2020. 4. 21.
|
|
|
|
|
- */
|
|
|
|
|
- private void saveGoodsCategory(Goods goods) {
|
|
|
|
|
-
|
|
|
|
|
-// GoodsCategory goodsCategory = new GoodsCategory();
|
|
|
|
|
-// goodsCategory.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
-// goodsCategory.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
-// goodsCategory.setGoodsCd(goods.getGoodsCd());
|
|
|
|
|
-// displayService.deleteGoodsCategory(goodsCategory);
|
|
|
|
|
-//
|
|
|
|
|
-// Collection<ItemkindCategory> itemkindCategoryList = displayService.getItemkindCategoryList(goods.getItemkindCd());
|
|
|
|
|
-// for ItemkindCategory itemkindCategory : itemkindCategoryList) {
|
|
|
|
|
-// Category category = new Category();
|
|
|
|
|
-// category.setCateGb(itemkindCategory.getCateGb());
|
|
|
|
|
-// category.setCateCd(itemkindCategory.getCateCd());
|
|
|
|
|
-// category = displayService.getCategory4srch(category);
|
|
|
|
|
-//
|
|
|
|
|
-// CategoryGoods categoryGoods = new CategoryGoods();
|
|
|
|
|
-// categoryGoods.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
-// categoryGoods.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
-// String[] goodsCdArr = {goods.getGoodsCd()};
|
|
|
|
|
-// categoryGoods.setGoodsCdArr(goodsCdArr);
|
|
|
|
|
-// if (category.getCateGb() != null) {
|
|
|
|
|
-// categoryGoods.setNcateGb(String.valueOf(category.getCateGb()));
|
|
|
|
|
-// }
|
|
|
|
|
-// if (category.getCateType() != null) {
|
|
|
|
|
-// categoryGoods.setNcateType(String.valueOf(category.getCateType()));
|
|
|
|
|
-// }
|
|
|
|
|
-// if (category.getCateCd() != null) {
|
|
|
|
|
-// categoryGoods.setNcateCd(String.valueOf(category.getCateCd()));
|
|
|
|
|
-// }
|
|
|
|
|
-// if (category.getTcateCd() != null) {
|
|
|
|
|
-// categoryGoods.setNtcateCd(String.valueOf(category.getTcateCd()));
|
|
|
|
|
-// }
|
|
|
|
|
-// if (category.getMcateCd() != null) {
|
|
|
|
|
-// categoryGoods.setNmcateCd(String.valueOf(category.getMcateCd()));
|
|
|
|
|
-// }
|
|
|
|
|
-// if (category.getScateCd() != null) {
|
|
|
|
|
-// categoryGoods.setNscateCd(String.valueOf(category.getScateCd()));
|
|
|
|
|
-// }
|
|
|
|
|
-// if (category.getDcateCd() != null) {
|
|
|
|
|
-// categoryGoods.setNdcateCd(String.valueOf(category.getDcateCd()));
|
|
|
|
|
-// }
|
|
|
|
|
-// displayService.moveCategoryGoods(categoryGoods);
|
|
|
|
|
-// }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 상품 저장
|
|
* 상품 저장
|
|
|
*
|
|
*
|
|
@@ -2489,8 +2448,9 @@ public class TsaGoodsService {
|
|
|
|
|
|
|
|
int idx = 0;
|
|
int idx = 0;
|
|
|
for (AdKeywordGoods adKeywordGoods : adKeywordGoodsList) {
|
|
for (AdKeywordGoods adKeywordGoods : adKeywordGoodsList) {
|
|
|
- if (idx == 0)
|
|
|
|
|
|
|
+ if (idx == 0) {
|
|
|
goodsDao.deleteAdKeywordGoods(adKeywordGoods); // 전체 상품 삭제
|
|
goodsDao.deleteAdKeywordGoods(adKeywordGoods); // 전체 상품 삭제
|
|
|
|
|
+ }
|
|
|
adKeywordGoods.setAdKeywordSq(adKeyword.getAdKeywordSq());
|
|
adKeywordGoods.setAdKeywordSq(adKeyword.getAdKeywordSq());
|
|
|
adKeywordGoods.setRegNo(TsaSession.getInfo().getUserNo());
|
|
adKeywordGoods.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
adKeywordGoods.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
adKeywordGoods.setUpdNo(TsaSession.getInfo().getUserNo());
|