Sfoglia il codice sorgente

Merge branch 'develop' into bin2107

bin2107 4 anni fa
parent
commit
b8a9fa1511

+ 70 - 26
src/main/java/com/style24/front/biz/service/TsfGoodsService.java

@@ -571,6 +571,7 @@ public class TsfGoodsService {
 	 * @date 2021. 3. 8
 	 */
 	public Collection<Goods> getTmtbGoodsList(Goods goods) {
+		Integer[] arrTmtbSq = goods.getArrTmtbSq();		// 장바구니 다다익선 추천상품 적용을 위해 백업.
 		goods.setArrTmtbSq(null);		// 배열 사용하여 진행시에 IN절에 걸려 query timeout 걸려 null처리
 		Collection<Goods> result = new ArrayList<Goods>();
 
@@ -586,43 +587,86 @@ public class TsfGoodsService {
 			tCount = 20;
 		}
 
-		for (Tmtb tmtb : tmtbSqList) {
-
-			goods.setTmtbSq(tmtb.getTmtbSq());
-			Collection<Goods> tmtbGoodsList = goodsDao.getTmtbGoodsList(goods);
-			if (tmtbGoodsList == null || tmtbGoodsList.isEmpty()) {
-				continue;
-			}
+		// 상품상세 다다익선 조회 쿼리
+		if(arrTmtbSq == null || arrTmtbSq.length < 1) {
+			for (Tmtb tmtb : tmtbSqList) {
+				goods.setTmtbSq(tmtb.getTmtbSq());
+				Collection<Goods> tmtbGoodsList = goodsDao.getTmtbGoodsList(goods);
+				if (tmtbGoodsList == null || tmtbGoodsList.isEmpty()) {
+					continue;
+				}
 
-			if (tCount <= 0) { //잔여수가 없으면 종료
-				break;
-			}
+				if (tCount <= 0) { //잔여수가 없으면 종료
+					break;
+				}
 
-			//다다익선 조회 상품 수
-			rCount = tmtbGoodsList.size();
+				//다다익선 조회 상품 수
+				rCount = tmtbGoodsList.size();
 
-			if (tCount > rCount) { 	//조회수보다 잔여수가 클경우
-				result.addAll(tmtbGoodsList);
-				tCount = tCount - rCount; //남은 잔여수 계산
-			} else {
-				if (tCount == rCount) {	//잔여 수량과 조회수가 같은면 종료
+				if (tCount > rCount) { 	//조회수보다 잔여수가 클경우
 					result.addAll(tmtbGoodsList);
-					break;
+					tCount = tCount - rCount; //남은 잔여수 계산
 				} else {
+					if (tCount == rCount) {	//잔여 수량과 조회수가 같은면 종료
+						result.addAll(tmtbGoodsList);
+						break;
+					} else {
 
-					for (int i = 0; i < tCount; i++) {  //잔여수량만큼 loop
-						int tmtbGoodsListCnt = 0;
-						for (Goods tmtbGoods : tmtbGoodsList) {
-							if (i == tmtbGoodsListCnt) {
-								result.add(tmtbGoods);
-								tCount--;
-								break;
+						for (int i = 0; i < tCount; i++) {  //잔여수량만큼 loop
+							int tmtbGoodsListCnt = 0;
+							for (Goods tmtbGoods : tmtbGoodsList) {
+								if (i == tmtbGoodsListCnt) {
+									result.add(tmtbGoods);
+									tCount--;
+									break;
+								}
+								tmtbGoodsListCnt++;
 							}
-							tmtbGoodsListCnt++;
 						}
 					}
+
 				}
+			}
+		} else {		// 장바구니 다다익선 팝업 조회 쿼리
+			for (int tmtb : arrTmtbSq) {
+				if(tmtb > 0) {
+					goods.setTmtbSq(tmtb);
+					Collection<Goods> tmtbGoodsList = goodsDao.getTmtbGoodsList(goods);
+					if (tmtbGoodsList == null || tmtbGoodsList.isEmpty()) {
+						continue;
+					}
+
+					if (tCount <= 0) { //잔여수가 없으면 종료
+						break;
+					}
+
+					//다다익선 조회 상품 수
+					rCount = tmtbGoodsList.size();
 
+					if (tCount > rCount) { 	//조회수보다 잔여수가 클경우
+						result.addAll(tmtbGoodsList);
+						tCount = tCount - rCount; //남은 잔여수 계산
+					} else {
+						if (tCount == rCount) {	//잔여 수량과 조회수가 같은면 종료
+							result.addAll(tmtbGoodsList);
+							break;
+						} else {
+
+							for (int i = 0; i < tCount; i++) {  //잔여수량만큼 loop
+								int tmtbGoodsListCnt = 0;
+								for (Goods tmtbGoods : tmtbGoodsList) {
+									if (i == tmtbGoodsListCnt) {
+										result.add(tmtbGoods);
+										tCount--;
+										break;
+									}
+									tmtbGoodsListCnt++;
+								}
+							}
+						}
+
+					}
+				}
 			}
 		}
 

+ 1 - 1
src/main/java/com/style24/front/biz/web/TsfMypageController.java

@@ -799,7 +799,7 @@ public class TsfMypageController extends TsfBaseController {
 	 */
 	@PostMapping("/return/cancel")
 	@ResponseBody
-	public GagaResponse rtnReqCancel(@RequestBody OrderChange orderChange) {
+	public GagaResponse rtnReqCancel(@RequestBody OrderChange orderChange) throws Exception {
 
 		if (orderChange== null) {
 			throw new IllegalStateException(message.getMessage("FAIL_1001"));

+ 1 - 1
src/main/java/com/style24/front/biz/web/TsfOrderController.java

@@ -427,7 +427,7 @@ public class TsfOrderController extends TsfBaseController {
 			deliveryAddrInfo.setRecipDtlAddr(order.getRecipDtlAddr());
 			
 			if (order.getDelvMemo() == null || "".equals(order.getDelvMemo())) {
-				deliveryAddrInfo.setDelvMemo("직접받고 부재시 문 앞");
+				deliveryAddrInfo.setDelvMemo("직접 받고 부재 시 문 앞");
 			} else {
 				deliveryAddrInfo.setDelvMemo(order.getDelvMemo());
 			}

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

@@ -974,9 +974,9 @@
 		                , G.SELF_GOODS_YN
 		                , G.MAIN_COLOR_CD ) A
 		LEFT   OUTER JOIN TB_COLOR C
-		ON     A.CART_OPT_CD1 = C.COLOR_CD
+		ON     A.OPT_CD1 = C.COLOR_CD
 		AND    C.USE_YN = 'Y'
-		ORDER  BY NULLIF(C.COLOR_KNM, A.CART_OPT_CD1)
+		ORDER  BY NULLIF(C.COLOR_KNM, A.OPT_CD1)
 	</select>
 
 	<!-- 장바구니 상품 사이즈 정보 조회 -->

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

@@ -432,6 +432,7 @@
 		         INNER JOIN VW_STOCK VS
 		            ON OP.GOODS_CD = VS.GOODS_CD
 		           AND OP.OPT_CD = VS.OPT_CD
+		           AND VS.DISP_YN = 'Y'
 		          LEFT OUTER JOIN TB_COLOR C
 		            ON C.COLOR_CD = IFNULL(NULLIF(ODI.OPT_CD1, ''), G1.MAIN_COLOR_CD)
 		           AND C.USE_YN = 'Y'

+ 5 - 0
src/main/resources/config/application-locd.yml

@@ -94,6 +94,11 @@ naverPay:
     order.api.url: https://test-api.pay.naver.com/o/customer/api/order/v20/register
     order.pc.url: https://test-order.pay.naver.com/customer/buy/
     order.mobile.url: https://test-m.pay.naver.com/o/customer/buy/
+    access.license: 01000100005b15bb8faab722d100d589f34bd64843659e37a168b3617443c4f52a3fda45b8
+    secret.key: AQABAADtZ/jOC1Y3LNsyI0TWwCMvPfrg0sqM9pnxliSegbjSqQ==
+    port.address: http://sandbox.api.naver.com/Checkout/MallService5
+    service.name: MallService5
+    version: 5.0
 
 # 검색엔진(NHN다이퀘스트)
 search:

+ 5 - 0
src/main/resources/config/application-run.yml

@@ -117,6 +117,11 @@ naverPay:
     order.api.url: https://api.pay.naver.com/o/customer/api/order/v20/register
     order.pc.url: https://order.pay.naver.com/customer/buy/
     order.mobile.url: https://m.pay.naver.com/o/customer/buy/
+    access.license:
+    secret.key:
+    port.address: http://ec.api.naver.com/Checkout/MallService5
+    service.name: MallService5
+    version: 5.0
 
 # 검색엔진(NHN다이퀘스트)
 search:

+ 5 - 0
src/main/resources/config/application-style.yml

@@ -106,6 +106,11 @@ naverPay:
     order.api.url: https://test-api.pay.naver.com/o/customer/api/order/v20/register
     order.pc.url: https://test-order.pay.naver.com/customer/buy/
     order.mobile.url: https://test-m.pay.naver.com/o/customer/buy/
+    access.license: 01000100005b15bb8faab722d100d589f34bd64843659e37a168b3617443c4f52a3fda45b8
+    secret.key: AQABAADtZ/jOC1Y3LNsyI0TWwCMvPfrg0sqM9pnxliSegbjSqQ==
+    port.address: http://sandbox.api.naver.com/Checkout/MallService5
+    service.name: MallService5
+    version: 5.0
 
 # 검색엔진(NHN다이퀘스트)
 search:

+ 5 - 0
src/main/resources/config/application-tsit.yml

@@ -99,6 +99,11 @@ naverPay:
     order.api.url: https://test-api.pay.naver.com/o/customer/api/order/v20/register
     order.pc.url: https://test-order.pay.naver.com/customer/buy/
     order.mobile.url: https://test-m.pay.naver.com/o/customer/buy/
+    access.license: 01000100005b15bb8faab722d100d589f34bd64843659e37a168b3617443c4f52a3fda45b8
+    secret.key: AQABAADtZ/jOC1Y3LNsyI0TWwCMvPfrg0sqM9pnxliSegbjSqQ==
+    port.address: http://sandbox.api.naver.com/Checkout/MallService5
+    service.name: MallService5
+    version: 5.0
 
 # 검색엔진(NHN다이퀘스트)
 search:

+ 1 - 0
src/main/webapp/WEB-INF/views/mob/mypage/MypageCreExchangeDetailFormMob.html

@@ -344,6 +344,7 @@
 	/*<![CDATA[*/
 	let addrGb = '';
 	let memoGb = '';
+	let jsonObj = {};
 	let kcpReceiptUrl = [[${kcpReceiptUrl}]];
 	let oneData = [[${oneData}]];
 	let isLogin = [[${isLogin}]];

+ 1 - 0
src/main/webapp/WEB-INF/views/mob/mypage/MypageCreReturnDetailFormMob.html

@@ -289,6 +289,7 @@
 /*<![CDATA[*/
 let oneData = [[${oneData}]];
 var isLogin = [[${isLogin}]];
+let jsonObj = {};
 let kcpReceiptUrl = [[${kcpReceiptUrl}]];
 let refundYn = [[${refundYn}]];
 

+ 1 - 0
src/main/webapp/WEB-INF/views/mob/mypage/NoMemberCreExchangeDetailFormMob.html

@@ -329,6 +329,7 @@
 	/*<![CDATA[*/
 	let oneData = [[${oneData}]];
 	var isLogin = [[${isLogin}]];
+	let jsonObj = {};
 	let kcpReceiptUrl = [[${kcpReceiptUrl}]];
 	let addrGb = '';
 	let memoGb = '';

+ 1 - 0
src/main/webapp/WEB-INF/views/mob/mypage/NoMemberCreReturnDetailFormMob.html

@@ -279,6 +279,7 @@
 /*<![CDATA[*/
 let oneData = [[${oneData}]];
 var isLogin = [[${isLogin}]];
+var jsonObj = {};
 let kcpReceiptUrl = [[${kcpReceiptUrl}]];
 let refundYn = [[${refundYn}]];
 

+ 1 - 1
src/main/webapp/WEB-INF/views/mob/order/OrderNoMemberMob.html

@@ -95,7 +95,7 @@
 					<div class="form_field">
 						<div class="agree_nomb_txt_box">
 							<div class="agree_nombPrivacy">
-								<input id="chk-nombPrivacy-agr" type="checkbox" checked="">
+								<input id="chk-nombPrivacy-agr" type="checkbox">
 								<label for="chk-nombPrivacy-agr"><span>비회원 개인정보 수집&#47;이용 동의&nbsp;&nbsp;<em class="tmark_required">(필수)</em></span></label>
 							</div>
 							<div>