|
|
@@ -50,6 +50,8 @@ public class TscFreegiftService {
|
|
|
// 1. 장바구니 담긴 상품으로 적용된 사은품 프로모션 정보 조회 (with 상품금액)
|
|
|
Collection<Order> fregiftGoodsApplyAmtList = freegiftDao.getFreeGiftGoodsApplyAmt(order);
|
|
|
|
|
|
+ log.info("fregiftGoodsApplyAmtList.size() ::: {}", fregiftGoodsApplyAmtList.size());
|
|
|
+
|
|
|
// 1.1 장바구니 상품으로 적용된 사은품 여부 판단
|
|
|
if (fregiftGoodsApplyAmtList.size() > 0) {
|
|
|
int[] freegiftSqArr = new int[fregiftGoodsApplyAmtList.size()];
|
|
|
@@ -86,14 +88,24 @@ public class TscFreegiftService {
|
|
|
|
|
|
// 같은 사은품 프로모션끼리 등록
|
|
|
if (fregiftGoodsApplyAmt.getFreegiftSq() == freegiftGoodsApplySection.getFreegiftSq()) {
|
|
|
+
|
|
|
+ log.info("fregiftGoodsApplyAmt.getFreegiftSq() ::: {}", fregiftGoodsApplyAmt.getFreegiftSq());
|
|
|
+ log.info("freegiftAmt ::: {}", freegiftAmt);
|
|
|
+ log.info("sectionVal ::: {}", sectionVal);
|
|
|
+ log.info("tempFreegiftSectionSq ::: {}", tempFreegiftSectionSq);
|
|
|
+
|
|
|
if (freegiftAmt > sectionVal) {
|
|
|
tempFreegiftSectionSq = freegiftSectionSq;
|
|
|
} else {
|
|
|
- freegiftSectionSqArr[k] = tempFreegiftSectionSq;
|
|
|
- k++;
|
|
|
+ if (tempFreegiftSectionSq > 0) {
|
|
|
+ freegiftSectionSqArr[k] = tempFreegiftSectionSq;
|
|
|
+ k++;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ freegiftSectionSqArr[k] = tempFreegiftSectionSq;
|
|
|
}
|
|
|
|
|
|
// 3. 사은품 적용구간 의 적용 사은품정보조회
|