|
|
@@ -942,24 +942,55 @@ public class TsfCartService {
|
|
|
cart.setQtyGoodsGb(apply.getQtyGoodsGb());
|
|
|
cart.setAmtGoodsGb(apply.getAmtGoodsGb());
|
|
|
}
|
|
|
- } else if (TscConstants.GoodsGb.BASE.value().equals(apply.getQtyGoodsGb()) || TscConstants.GoodsGb.BASE.value().equals(apply.getAmtGoodsGb())) {
|
|
|
- if (cart.getCartSq().equals(apply.getCartSq())) {
|
|
|
- // 2021.02.24 jsh77b
|
|
|
- if ("N".equals(apply.getApplyQtySectionYn())) {
|
|
|
- cart.setApplyQtySectionYn(apply.getApplyQtySectionYn());
|
|
|
- cart.setQtyTmtbNm(apply.getQtyTmtbNm());
|
|
|
- cart.setQtyTmtbSq(apply.getQtyTmtbSq());
|
|
|
+ }
|
|
|
+ else if (TscConstants.GoodsGb.BASE.value().equals(apply.getQtyGoodsGb()) || TscConstants.GoodsGb.BASE.value().equals(apply.getAmtGoodsGb())) {
|
|
|
+
|
|
|
+ // 2022.01.05 적용상품에 있으면 기본상품이 적용되는 정보를 적용하지 않음
|
|
|
+ Boolean temp1 = true;
|
|
|
+ Boolean temp2 = true;
|
|
|
+
|
|
|
+ for (Order applyTemp : tmtbApplyList) {
|
|
|
+ if (TscConstants.GoodsGb.APPLY.value().equals(applyTemp.getQtyGoodsGb()) || TscConstants.GoodsGb.APPLY.value().equals(applyTemp.getAmtGoodsGb())) {
|
|
|
+ if (apply.getCartSq().equals(applyTemp.getCartSq())) {
|
|
|
+
|
|
|
+ // 2021.11.11 추가
|
|
|
+ if ("Y".equals(applyTemp.getApplyQtySectionYn())) {
|
|
|
+ temp1 = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 2021.11.11 추가
|
|
|
+ if ("Y".equals(applyTemp.getApplyAmtSectionYn())) {
|
|
|
+ temp2 = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- // 2021.11.11 추가
|
|
|
- if ("N".equals(apply.getApplyAmtSectionYn())) {
|
|
|
- cart.setApplyAmtSectionYn(apply.getApplyAmtSectionYn());
|
|
|
- cart.setAmtTmtbNm(apply.getAmtTmtbNm());
|
|
|
- cart.setAmtTmtbSq(apply.getAmtTmtbSq());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (cart.getCartSq().equals(apply.getCartSq())) {
|
|
|
+
|
|
|
+ // 수량 기본상품의 정보만 유일하게 존재
|
|
|
+ if (temp1) {
|
|
|
+ // 2021.02.24 jsh77b
|
|
|
+ if ("N".equals(apply.getApplyQtySectionYn())) {
|
|
|
+ cart.setApplyQtySectionYn(apply.getApplyQtySectionYn());
|
|
|
+ cart.setQtyTmtbNm(apply.getQtyTmtbNm());
|
|
|
+ cart.setQtyTmtbSq(apply.getQtyTmtbSq());
|
|
|
+ }
|
|
|
+ cart.setQtyGoodsGb(apply.getQtyGoodsGb());
|
|
|
}
|
|
|
|
|
|
- cart.setQtyGoodsGb(apply.getQtyGoodsGb());
|
|
|
- cart.setAmtGoodsGb(apply.getAmtGoodsGb());
|
|
|
+ // 금액 기본상품의 정보만 유일하게 존재
|
|
|
+ if (temp2) {
|
|
|
+ // 2021.11.11 추가
|
|
|
+ if ("N".equals(apply.getApplyAmtSectionYn())) {
|
|
|
+ cart.setApplyAmtSectionYn(apply.getApplyAmtSectionYn());
|
|
|
+ cart.setAmtTmtbNm(apply.getAmtTmtbNm());
|
|
|
+ cart.setAmtTmtbSq(apply.getAmtTmtbSq());
|
|
|
+ }
|
|
|
+ cart.setAmtGoodsGb(apply.getAmtGoodsGb());
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -967,11 +998,7 @@ public class TsfCartService {
|
|
|
// 2021.11.11 다다익선 할인 적용된 상품 상품보기 숨김 처리 로직 추가
|
|
|
if (tmtbSqList != null && tmtbSqList.size() > 0) {
|
|
|
// 장바구니상품목록수정
|
|
|
- for (Order cart : cartGoodsList) {
|
|
|
-
|
|
|
- log.info("cart.getQtyGoodsGb() ::: {}", cart.getQtyGoodsGb());
|
|
|
- log.info("cart.getAmtGoodsGb() ::: {}", cart.getAmtGoodsGb());
|
|
|
-
|
|
|
+ for (Order cart : cartGoodsList) {
|
|
|
// 기본상품일때
|
|
|
if (TscConstants.GoodsGb.BASE.value().equals(cart.getQtyGoodsGb()) || TscConstants.GoodsGb.BASE.value().equals(cart.getAmtGoodsGb())) {
|
|
|
for (Order tmtbSq : tmtbSqList) {
|