Parcourir la source

주문서개발중

jsh77b il y a 5 ans
Parent
commit
39ca32e26c

+ 14 - 2
src/main/java/com/style24/core/biz/service/TscFreegiftService.java

@@ -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. 사은품 적용구간 의 적용 사은품정보조회

+ 0 - 1
src/main/java/com/style24/core/biz/service/TscOrderService.java

@@ -922,7 +922,6 @@ public class TscOrderService {
 	 * @author jsh77b
 	 * @since 2021. 02. 02
 	 */	
-	@SuppressWarnings({ "unchecked", "rawtypes" })
 	public GagaMap getGoodsDcAmt(Collection<Order> tmtbGoodsApplyList) {
 		
 		GagaMap resultMap = new GagaMap();

+ 1 - 1
src/main/java/com/style24/persistence/mybatis/shop/TscOrder.xml

@@ -1656,7 +1656,7 @@
 					 END AS SAVE_PNT_AMT
 			 , CASE WHEN #{frontGb} IN ('P')      AND Z.PRE_PPNT_USABLE_YN IN ('Y') THEN (Z.CURR_PRICE * Z.GOODS_QTY) * (Z.PNT_PRATE/100)
 			        WHEN #{frontGb} IN ('M', 'A') AND Z.PRE_MPNT_USABLE_YN IN ('Y') THEN (Z.CURR_PRICE * Z.GOODS_QTY) * (Z.PNT_MRATE/100)
-					 END AS PRE_PNT_AMT
+					 END AS PRE_PNT_DC_AMT
 		FROM  ( SELECT CA.CART_SQ
 					 , CD.CART_DTL_SQ
 					 , BR.BRAND_ENM