소스 검색

이태영 - 20200301 임시커밋

xodud1202 5 년 전
부모
커밋
65489c4552

+ 5 - 5
src/main/java/com/style24/front/biz/service/TsfCartService.java

@@ -54,7 +54,7 @@ public class TsfCartService {
 	 * 장바구니 저장
 	 * 장바구니 저장
 	 * 단품 : goodsCd, optCd, optCd1, optCd2
 	 * 단품 : goodsCd, optCd, optCd1, optCd2
 	 * 세트 : goodsCd,
 	 * 세트 : goodsCd,
-	 * @param cart
+	 * @param params
 	 */
 	 */
 	public void saveCartInfo(Collection<Cart> params) {
 	public void saveCartInfo(Collection<Cart> params) {
 		Cart cart = new Cart();
 		Cart cart = new Cart();
@@ -318,7 +318,7 @@ public class TsfCartService {
 
 
 	/**
 	/**
 	 * 다다익선 할인 금액 조회
 	 * 다다익선 할인 금액 조회
-	 * @param Order
+	 * @param param
 	 * param.cartSqArr[] : 필수
 	 * param.cartSqArr[] : 필수
 	 * @return String
 	 * @return String
 	 * @author xodud1202
 	 * @author xodud1202
@@ -334,8 +334,6 @@ public class TsfCartService {
 
 
 		// 장바구니 등록 다다익선 일련번호 지정
 		// 장바구니 등록 다다익선 일련번호 지정
 		List<Integer> applySq 		= new ArrayList<Integer>();
 		List<Integer> applySq 		= new ArrayList<Integer>();
-		List<Integer> qtyApplySq	= new ArrayList<Integer>();
-		List<Integer> amtApplySq 	= new ArrayList<Integer>();
 		
 		
 		for(Order tmtbApply : tmtbApplyList) {
 		for(Order tmtbApply : tmtbApplyList) {
 			if(TscConstants.GoodsGb.BASE.value().equals(tmtbApply.getQtyGoodsGb()) || TscConstants.GoodsGb.BASE.value().equals(tmtbApply.getAmtGoodsGb())) {
 			if(TscConstants.GoodsGb.BASE.value().equals(tmtbApply.getQtyGoodsGb()) || TscConstants.GoodsGb.BASE.value().equals(tmtbApply.getAmtGoodsGb())) {
@@ -512,7 +510,7 @@ public class TsfCartService {
 	/**
 	/**
 	 * 장바구니 배송단위별 상품 정보 조회
 	 * 장바구니 배송단위별 상품 정보 조회
 	 *
 	 *
-	 * @param Order
+	 * @param cartGoodsList
 	 * @author jsh77b
 	 * @author jsh77b
 	 * @since 2021. 02. 02
 	 * @since 2021. 02. 02
 	 */
 	 */
@@ -711,6 +709,7 @@ public class TsfCartService {
 				comp.setCartSq(cart.getCartSq());
 				comp.setCartSq(cart.getCartSq());
 				comp.setCartColorList(cartDao.selectCartGoodsColorList(comp));
 				comp.setCartColorList(cartDao.selectCartGoodsColorList(comp));
 				for(Cart color : comp.getCartColorList()) {
 				for(Cart color : comp.getCartColorList()) {
+					color.setCartSq(comp.getCartSq());
 					color.setCartSizeList(cartDao.selectCartGoodsSizeList(color));
 					color.setCartSizeList(cartDao.selectCartGoodsSizeList(color));
 				}
 				}
 			}
 			}
@@ -725,6 +724,7 @@ public class TsfCartService {
 
 
 					if("Y".equals(cart.getSelfGoodsYn())) {		// 자사 상품은 TB_GOODS_IMG.COLOR_CD = TB_OPTION.OPT_CD1
 					if("Y".equals(cart.getSelfGoodsYn())) {		// 자사 상품은 TB_GOODS_IMG.COLOR_CD = TB_OPTION.OPT_CD1
 						for(Cart color : comp.getCartColorList()) {
 						for(Cart color : comp.getCartColorList()) {
+							color.setCartSq(cart.getCartSq());
 							color.setCartImgList(cartDao.selectCartSelfGoodsOptionImgList(color));
 							color.setCartImgList(cartDao.selectCartSelfGoodsOptionImgList(color));
 							color.setCartSizeList(cartDao.selectCartGoodsSizeList(color));
 							color.setCartSizeList(cartDao.selectCartGoodsSizeList(color));
 						}
 						}

+ 2 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfCart.xml

@@ -827,6 +827,7 @@
 		LEFT   OUTER JOIN TB_CART_DETAIL CD
 		LEFT   OUTER JOIN TB_CART_DETAIL CD
 		ON     G.GOODS_CD = CD.ITEM_CD
 		ON     G.GOODS_CD = CD.ITEM_CD
 		AND    ST.OPT_CD = CD.OPT_CD
 		AND    ST.OPT_CD = CD.OPT_CD
+		AND    CD.CART_SQ = #{cartSq}
 		WHERE  ST.DISP_YN = 'Y'
 		WHERE  ST.DISP_YN = 'Y'
 		AND    G.SELF_MALL_YN = 'Y'
 		AND    G.SELF_MALL_YN = 'Y'
 		AND    G.GOODS_STAT = 'G008_90'
 		AND    G.GOODS_STAT = 'G008_90'
@@ -853,6 +854,7 @@
 		LEFT   OUTER JOIN TB_CART_DETAIL CD
 		LEFT   OUTER JOIN TB_CART_DETAIL CD
 		ON     G.GOODS_CD = CD.ITEM_CD
 		ON     G.GOODS_CD = CD.ITEM_CD
 		AND    ST.OPT_CD = CD.OPT_CD
 		AND    ST.OPT_CD = CD.OPT_CD
+		AND    CD.CART_SQ = #{cartSq}
 		WHERE  1=1
 		WHERE  1=1
 		AND    G.GOODS_CD = #{goodsCd}
 		AND    G.GOODS_CD = #{goodsCd}
 		<if test="optCd1 != null and optCd1 != ''">
 		<if test="optCd1 != null and optCd1 != ''">

+ 5 - 5
src/main/webapp/WEB-INF/views/web/cart/cartChangeOptionPopupWeb.html

@@ -49,7 +49,7 @@
 												<select id="">
 												<select id="">
 													<th:block th:each="size, i : ${color.cartSizeList}">
 													<th:block th:each="size, i : ${color.cartSizeList}">
 														<th:block th:if="${color.optCd1.equals(size.optCd1)}">
 														<th:block th:if="${color.optCd1.equals(size.optCd1)}">
-															<option th:value="${size.optCd2}" th:text="${size.optCd2}"></option>
+															<option th:value="${size.optCd}" th:text="${size.optCd2}" th:selected="${color.cartColorNm != null}"></option>
 														</th:block>
 														</th:block>
 													</th:block>
 													</th:block>
 												</select>
 												</select>
@@ -58,7 +58,7 @@
 										<div class="form_field">
 										<div class="form_field">
 											<select id="">
 											<select id="">
 												<th:block th:each="color, index : ${comp.cartColorList}">
 												<th:block th:each="color, index : ${comp.cartColorList}">
-													<option th:value="${color.optCd1}" rel="icon-temperature" th:text="${color.colorNm}"></option>
+													<option th:value="${color.optCd1}" rel="icon-temperature" th:text="${color.colorNm}" th:selected="${color.cartColorNm != null}"></option>
 												</th:block>
 												</th:block>
 											</select>
 											</select>
 										</div>
 										</div>
@@ -67,7 +67,7 @@
 											<select id="">
 											<select id="">
 												<th:block th:each="size, i : ${color.cartSizeList}">
 												<th:block th:each="size, i : ${color.cartSizeList}">
 													<th:block th:if="${color.optCd1.equals(size.optCd1)}">
 													<th:block th:if="${color.optCd1.equals(size.optCd1)}">
-														<option th:value="${size.optCd2}" th:text="${size.optCd2}"></option>
+														<option th:value="${size.optCd}" th:text="${size.optCd2}" th:selected="${size.cartOptCd != null}"></option>
 													</th:block>
 													</th:block>
 												</th:block>
 												</th:block>
 											</select>
 											</select>
@@ -127,7 +127,7 @@
 										<div class="form_field">
 										<div class="form_field">
 											<select id="">
 											<select id="">
 												<th:block th:each="color, index : ${comp.cartColorList}">
 												<th:block th:each="color, index : ${comp.cartColorList}">
-												<option th:value="${color.optCd}" th:text="${color.optCd1 + '/' + color.optCd2}"></option>
+												<option th:value="${color.optCd}" th:text="${color.optCd1 + '/' + color.optCd2}" th:selected="${color.cartOptCd != null}"></option>
 												</th:block>
 												</th:block>
 											</select>
 											</select>
 										</div>
 										</div>
@@ -145,7 +145,7 @@
 								</div>
 								</div>
 							</div>
 							</div>
 							<div class="btn_group_block">
 							<div class="btn_group_block">
-								<button class="btn btn_dark btn_block" id=""><span>옵션변경</span></button>
+								<button class="btn btn_dark btn_block" th:onclick="|fnChangeCartOption(${cart.cartSq})|"><span>옵션변경</span></button>
 							</div>
 							</div>
 						</div>
 						</div>
 					</div>
 					</div>