Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/develop' into card007

card007 4 rokov pred
rodič
commit
52780600d6

+ 2 - 2
src/main/java/com/style24/front/biz/service/TsfDisplayService.java

@@ -805,7 +805,7 @@ public class TsfDisplayService {
 			goodsList = goodsDao.getContentsCategoryGoodsList(cate4Srch);
 			log.info("goodsList 1::::::{}",goodsList);
 		}
-
+/*
 		if (goodsList.size() < 100) {
 			// TODO 추천솔루션
 			log.info("goodsList.size()::::::{}",goodsList.size());
@@ -841,7 +841,7 @@ public class TsfDisplayService {
 			}
 			log.info("goodsList 2::::::{}",goodsList);
 		}
-
+*/
 		return goodsList;
 	}
 

+ 2 - 7
src/main/java/com/style24/front/biz/service/TsfPlanningService.java

@@ -113,17 +113,12 @@ public class TsfPlanningService {
 
 	/**
 	 * 접근 불가능한 기획전 메시지 조회
-	 * @param planSq - 기획전번호
+	 * @param plan
 	 * @return 접근 불가능 사유 메시지
 	 * @author gagamel
 	 * @since 2021. 3. 30
 	 */
-	public String getInaccessiblePlanningMessage(Integer planSq) {
-//		String msg = "";
-
-		Plan plan = new Plan();
-		plan.setPlanSq(planSq);
-
+	public String getInaccessiblePlanningMessage(Plan plan) {
 		// 유효한 기획전 여부 조회
 		if ("N".equals(planningDao.getAvailPlanningYn(plan))) {
 			return "진행중인 기획전/이벤트가 아닙니다.";

+ 1 - 7
src/main/java/com/style24/front/biz/thirdparty/KaKaoLogin.java

@@ -207,13 +207,7 @@ public class KaKaoLogin {
 			if (StringUtils.isNotBlank(kakaoAccount.getString("birthday_type"))) {
 				birthSm = kakaoAccount.getString("birthday_type").equals("SOLAR") ? "S":"L";
 			}
-
-			// TODO: 정식 카카오 로그인 정식 서비스되면 해당 내용 삭제 해야 함 2021.02.25 jsshin
-			String ci = kakaoAccount.getString("account_ci");
-//			if (StringUtils.isBlank(ci)) {
-//				ci = "LU9VuATNfK86YTDEsHvOGO5hOhgfHYlaj6rWKGZXPGJtBK4IHlFx/+tbBFrbYMjYUSzI9RCQHygvBwaqKS/tNA=="; // jsshin6246 CI값
-//				//ci = UUID.randomUUID().toString().replaceAll("-","");
-//			}
+			String ci = kakaoAccount.getString("ci");
 
 			resultMap.setString("snsId", snsId);
 			resultMap.setString("custNm", custNm);

+ 7 - 0
src/main/java/com/style24/front/biz/web/TsfIndexController.java

@@ -226,6 +226,13 @@ public class TsfIndexController extends TsfBaseController {
 			mav.addObject("error", ex.getMessage());
 		}
 
+		// 로그인이 된 상태로 콜백진입시 메인이동
+		boolean isLogin = TsfSession.isLogin();
+		if (isLogin) {
+			mav.setViewName("redirect:/");
+			return mav;
+		}
+
 		GagaMap userInfo = new GagaMap();
 		boolean isSnsLoing = false;
 		if (StringUtils.isNotBlank(code) && TscConstants.SnsType.KAKAO.value().equals(snsType)) {

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

@@ -1170,7 +1170,7 @@ public class TsfOrderController extends TsfBaseController {
 
 		int count = customerService.getGiftKakaoSendInfo(custContactHst);
 		
-		if (count < 30) {
+		if (count < 1) {
 			// 2021.05.31 알림톡전송 주문완료정보		
 			if (StringUtils.isNotBlank(orderInfo.getOrdPhnno())) {
 				Integer userNo = orderInfo.getCustNo();

+ 11 - 8
src/main/java/com/style24/front/biz/web/TsfPlanningController.java

@@ -152,7 +152,8 @@ public class TsfPlanningController extends TsfBaseController {
 		ModelAndView mav = new ModelAndView();
 		plan.setFrontGb(TsfSession.getFrontGb());
 		// 접근 불가능한 기획전 메시지 조회
-		String inaccessibleMsg = planningService.getInaccessiblePlanningMessage(plan.getPlanSq());
+		String inaccessibleMsg = planningService.getInaccessiblePlanningMessage(plan);
+
 		if (StringUtils.isNotBlank(inaccessibleMsg)) {
 			if (!TsfSession.isLogin()) {
 				mav.addObject("loginYn", "N");
@@ -726,6 +727,7 @@ public class TsfPlanningController extends TsfBaseController {
 			Collection<Plan> benefitList = planningService.getAttendBenefitList(plan);
 			plan.setEntryAllYn("Y");
 			count = planningService.getAttendEntryCount(plan);
+			String msg = "출석체크 되었습니다.";
 			for (Plan tPlan : benefitList) {
 				if (tPlan.getBasDays() == count) {
 					// 지급 방식이 포인트일 경우
@@ -749,8 +751,8 @@ public class TsfPlanningController extends TsfBaseController {
 				        point.setExpBeDt(df.format(cal.getTime()));
 				        point.setSignGb("+");
 						corePointService.saveCustomerPoint(point);
-						String msg =  "축하합니다. " + toNumFormat(pointAmt) + " 포인트가 지급 되었습니다!";
-						result.set("msg", msg);
+						msg =  "축하합니다. " + toNumFormat(pointAmt) + " 포인트가 지급 되었습니다!";
+//						result.set("msg", msg);
 						break;
 					}
 					else if(tPlan.getBenefitGb().equals("C")) {
@@ -765,8 +767,8 @@ public class TsfPlanningController extends TsfBaseController {
 						coupon.setPubReasonDtl("이벤트출석체크");
 						coupon.setEndAlimSendYn("N");
 						coreCouponService.saveCouponIssue(coupon);
-						String msg =  "축하합니다. " + toNumFormat(coupon.getDcVal()) +coupon.getDcWay() + " 할인쿠폰이 지급 되었습니다!";
-						result.set("msg", msg);
+						msg =  "축하합니다. " + toNumFormat(coupon.getDcVal()) +coupon.getDcWay() + " 할인쿠폰이 지급 되었습니다!";
+//						result.set("msg", msg);
 						break;
 					}
 					else if(tPlan.getBenefitGb().equals("A")) {
@@ -801,16 +803,17 @@ public class TsfPlanningController extends TsfBaseController {
 						coupon.setPubReasonDtl("출석체크");
 						coupon.setEndAlimSendYn("N");
 						coreCouponService.saveCouponIssue(coupon);
-						String msg =  "축하합니다. " + toNumFormat(pointAmt) + " 포인트와 " + toNumFormat(coupon.getDcVal()) +coupon.getDcWay() + " 할인쿠폰이 지급 되었습니다!";
-						result.set("msg", msg);
+						msg =  "축하합니다. " + toNumFormat(pointAmt) + " 포인트와 " + toNumFormat(coupon.getDcVal()) +coupon.getDcWay() + " 할인쿠폰이 지급 되었습니다!";
+//						result.set("msg", msg);
 						break;
 					}
 
 				}else {
-					result.set("msg", "출석체크 되었습니다.");
+//					result.set("msg", "출석체크 되었습니다.");
 					break;
 				}
 			}
+			result.set("msg", msg);
 		}
 
 		result.set("custAttendList",planningService.getCustAttendEntryList(plan));

+ 6 - 4
src/main/java/com/style24/persistence/mybatis/shop/TsfPlanning.xml

@@ -356,13 +356,15 @@
 	
 	<!-- 유효한 기획전 여부 조회 -->
 	<select id="getAvailPlanningYn" parameterType="Plan" resultType="String">
-		/* TsfPlanning.getDeviceAccessibleYn */
+		/* TsfPlanning.getAvailPlanningYn */
 		SELECT CASE WHEN IFNULL((SELECT COUNT(*)
 		                         FROM   TB_PLAN
 		                         WHERE  PLAN_SQ = #{planSq}
-		                         AND    NOW() BETWEEN DISP_STDT AND DISP_EDDT
-		                         AND    DEL_YN = 'N'
-		                         AND    OPEN_YN = 'Y'
+		                         <if test='adminPreview != "Y"'>
+		                          AND    NOW() BETWEEN DISP_STDT AND DISP_EDDT
+		                          AND    OPEN_YN = 'Y'
+		                          AND    DEL_YN = 'N'
+		                         </if>
 		                        ),0) > 0 THEN 'Y'
 		            ELSE 'N'
 		       END

+ 138 - 11
src/main/webapp/WEB-INF/views/mob/display/BestMainFormMob.html

@@ -111,11 +111,9 @@
 				</div>
 				<div class="popup_con">
 					<div class="button_list clear">
-						<button type="button" class="on"><span>구매성별 전체</span></button>
-						<button type="button"><span>구매성별1</span></button>
-						<button type="button"><span>구매성별2</span></button>
-						<button type="button"><span>구매성별3</span></button>
-						<button type="button"><span>구매성별4</span></button>
+						<button type="button" class="on" onclick="fnGetEigenD002(this, 'gender');" data-id="" ><span>구매성별 전체</span></button>
+						<button type="button" onclick="fnGetEigenD002(this, 'gender');" data-id="A" ><span>남성</span></button>
+						<button type="button" onclick="fnGetEigenD002(this, 'gender');" data-id="B" ><span>여성</span></button>
 					</div>
 				</div>
 			</div>
@@ -128,11 +126,12 @@
 				</div>
 				<div class="popup_con">
 					<div class="button_list clear">
-						<button type="button" class="on"><span>구매연령 전체</span></button>
-						<button type="button"><span>구매연령1</span></button>
-						<button type="button"><span>구매연령2</span></button>
-						<button type="button"><span>구매연령3</span></button>
-						<button type="button"><span>구매연령4</span></button>
+						<button type="button" class="on" onclick="fnGetEigenD002(this, 'age');" data-id="" ><span>구매연령 전체</span></button>
+						<button type="button" onclick="fnGetEigenD002(this, 'age');" data-id="10" ><span>10대</span></button>
+						<button type="button" onclick="fnGetEigenD002(this, 'age');" data-id="20" ><span>20대</span></button>
+						<button type="button" onclick="fnGetEigenD002(this, 'age');" data-id="30" ><span>30대</span></button>
+						<button type="button" onclick="fnGetEigenD002(this, 'age');" data-id="40" ><span>40대</span></button>
+						<button type="button" onclick="fnGetEigenD002(this, 'age');" data-id="50" ><span>50대 이상</span></button>
 					</div>
 				</div>
 			</div>
@@ -247,7 +246,7 @@
 
 			$.getJSON('/display/realtime/best/list' , data, function (result, status){
 				$("#itemViewArea").html('');
-				console.log(result);
+				// console.log(result);
 				if(result.length > 0){
 					$.each(result, function (idx, item){
 						// 2021.08.30 이미지 null 처리
@@ -306,9 +305,15 @@
 			gagajf.ajaxFormSubmit("/display/best/main/goods/list", document.bestGoodsForm,  fnCallbackBestTop100);
 		}
 
+		let bestCnt = 0;
+		let eigenBestCnt = 0;
+
 		var fnCallbackBestTop100 = function (result){
 			$("#prodArea").html('');
 			var tag = '';
+
+			bestCnt = result.dataList.length;
+
 			if(result.dataList.length > 0){
 				$.each(result.dataList, function (idx, item){
 					tag += '<div class="item_prod">\n';
@@ -381,6 +386,128 @@
 
 				$("#prodArea").append(tag);
 			}
+
+			// 수동설정이 100미만이면 추천솔루션 데이터 추가 조회
+			if(bestCnt < 100){
+				eigenBestCnt = 100 - bestCnt;
+				fnGetEigenBestData(eigenBestCnt);
+			}
+		}
+
+		// 추천솔루션 데이터 추가 조회
+		var fnGetEigenBestData = function (cnt){
+			var eigenUrl = '';
+			var selectCateNo = $("#bestGoodsForm input[name=cateNo]").val();
+
+			if(gagajf.isNull(selectCateNo)){
+				/* cateNo 전체 일 때 */
+				eigenUrl = 'https://api.eigene.io/rec/m061?size='+cnt+'&cuid=1252aed4-78dc-46e8-b784-94ac42e86dd4';
+			}else{
+				eigenUrl = 'https://api.eigene.io/rec/m060?size='+cnt+'&cuid=1252aed4-78dc-46e8-b784-94ac42e86dd4&incids='+selectCateNo;
+			}
+			var tag = '';
+
+			$.getJSON(eigenUrl, function (result, status){
+				if (status === 'success') {
+					if (!gagajf.isNull(result.results)) {
+						$.each(result.results, function (idx, item) {
+							tag += '<div class="item_prod">\n';
+							tag += '	<div class="item_state">\n';
+							tag += '		<button type="button" class="itemLike"  onclick="wishlistDelete(this)" goodsCd="'+item.product.itemId+'" goodsNm="'+ item.product.itemName+'" ithrCd="" contentsLoc="IN10_01" planDtlSq="">관심상품 추가</button>\n';
+							tag += '		<a href="javascript:void(0);" class="itemLink" onclick="cfnGoToGoodsDetail(\''+item.product.itemId+'\', \'\')">\n';
+							tag += '<div class="shape ';
+							if(cnt == 100 && idx==0){
+								tag += ' ranker';
+							}
+							tag += '"><span>'+(idx+1)+'</span></div>\n';
+							tag += '			<div class="itemPic">\n';
+							tag += '				<img alt="BLUE-a" class=" vLHTC pd_img" src="'+ item.product.itemImage +'">\n';
+							tag += '			</div>\n';
+							tag += '			<p class="itemBrand">'+item.product.brandName+'</p>\n';
+							tag += '			<div class="itemName">'+item.product.itemName+'</div>\n';
+							tag += '			<p class="itemPrice">';
+							if (item.product.originalPrice != item.product.salePrice) {
+								tag += '						<span class="itemPrice_original">' + item.product.originalPrice.addComma() + '</span>\n';
+							}
+							tag += item.product.salePrice.addComma();
+							if (item.product.originalPrice != item.product.salePrice) {
+								tag+='						<span class=" itemPercent">'+ Math.round((item.product.originalPrice - item.product.salePrice) / (item.product.originalPrice * 1.0) * 100) +'%</span>\n';
+							}
+							tag += '			</p>\n';
+							tag += '		</a>\n';
+							tag += '	</div>\n';
+							tag += '</div>\n';
+						});
+						$("#prodArea").append(tag);
+					}
+				}
+			});
+		}
+
+		// 구매 성별/연령 별 베스트 상품 추천
+		var fnGetEigenD002 = function (obj, key){
+			var gender = '';
+			var age = '';
+
+			if(key == 'gender'){
+				gender = $(obj).attr("data-id");
+				$("#odDatePop2").find(".popup_con .button_list").find("button").each(function (){
+					if($(this).hasClass("on")){
+						age = $(this).attr("data-id");
+					}
+				});
+			}else{
+				age = $(obj).attr("data-id");
+				$("#odDatePop1").find(".popup_con .button_list").find("button").each(function (){
+					if($(this).hasClass("on")){
+						gender = $(this).attr("data-id");
+					}
+				});
+			}
+
+			if(gagajf.isNull(gender) && gagajf.isNull(age)){
+				$("#prodArea").html('');
+				fnGetEigenBestData(100);
+			}else{
+				$("#prodArea").html('');
+				var eigenUrl = 'https://api.eigene.io/rec/d002?size=100&cuid=1252aed4-78dc-46e8-b784-94ac42e86dd4&gender='+gender+'&age='+age;
+				var tag = '';
+				$.getJSON(eigenUrl, function (result, status){
+					if (status === 'success') {
+						if (!gagajf.isNull(result.results)) {
+							$.each(result.results, function (idx, item) {
+								tag += '<div class="item_prod">\n';
+								tag += '	<div class="item_state">\n';
+								tag += '		<button type="button" class="itemLike"  onclick="wishlistDelete(this)" goodsCd="'+item.product.itemId+'" goodsNm="'+ item.product.itemName+'" ithrCd="" contentsLoc="IN10_01" planDtlSq="">관심상품 추가</button>\n';
+								tag += '		<a href="javascript:void(0);" class="itemLink" onclick="cfnGoToGoodsDetail(\''+item.product.itemId+'\', \'\')">\n';
+								tag += '<div class="shape ';
+								if(idx==0){
+									tag += ' ranker';
+								}
+								tag += '"><span>'+(idx+1)+'</span></div>\n';
+								tag += '			<div class="itemPic">\n';
+								tag += '				<img alt="BLUE-a" class=" vLHTC pd_img" src="'+ item.product.itemImage +'">\n';
+								tag += '			</div>\n';
+								tag += '			<p class="itemBrand">'+item.product.brandName+'</p>\n';
+								tag += '			<div class="itemName">'+item.product.itemName+'</div>\n';
+								tag += '			<p class="itemPrice">';
+								if (item.product.originalPrice != item.product.salePrice) {
+									tag += '						<span class="itemPrice_original">' + item.product.originalPrice.addComma() + '</span>\n';
+								}
+								tag += item.product.salePrice.addComma();
+								if (item.product.originalPrice != item.product.salePrice) {
+									tag+='						<span class=" itemPercent">'+ Math.round((item.product.originalPrice - item.product.salePrice) / (item.product.originalPrice * 1.0) * 100) +'%</span>\n';
+								}
+								tag += '			</p>\n';
+								tag += '		</a>\n';
+								tag += '	</div>\n';
+								tag += '</div>\n';
+							});
+							$("#prodArea").append(tag);
+						}
+					}
+				});
+			}
 		}
 
 		$(document).ready(function() {

+ 114 - 100
src/main/webapp/WEB-INF/views/mob/display/MallMainFormMob.html

@@ -491,13 +491,8 @@
 								<h2 th:text="${mainData.contentsTitle}">당신을 위한 제안</h2>
 							</div>
 
-							<div class="swiper-container post-sug">
-								<div class="swiper-wrapper" id="recomItemArea">
+							<div class="swiper-container post-sug" id="recomItemArea">
 
-
-								</div>
-								<!-- Add Pagination -->
-								<div class="swiper-pagination"></div>
 							</div>
 						</div>
 					</div>
@@ -585,10 +580,9 @@
 		// 컨텐츠 호출
 		$(document).ready(function() {
 			// 당신을 위한 제안 쿠키값 확인 (로그인시 확인됨)
-			/*
+
 			var pcId = gagajf.getCookie("RB_PCID");
-			20210927 xodud1202 > 수빈과장님 요청
-			fnGetEigenApi(pcId); */
+			fnGetEigenApi(pcId);
 
 			post_visual.slideTo(2, 0, false); // 접속 시, 슬라이드페이지 이동
 
@@ -682,6 +676,7 @@
 				if (status === 'success') {
 					if (!gagajf.isNull(result.products) && result.products.length > 0) {
 						$("#recomItemArea").html('');
+						itemTag += '<div class="swiper-wrapper" >';
 
 						$.each(result.products, function (idx, item) {
 							if (idx == 0 || idx == 5) {
@@ -695,7 +690,11 @@
 								itemTag += '	<ol class="list_cate">\n';
 							}
 
-							itemTag += '			<li class="first" id="key'+idx+'" data-idx="'+idx+'">\n';
+							itemTag += '			<li ';
+							if (idx == 0 || idx == 5) {
+								itemTag += ' class="first" ';
+							}
+							itemTag += ' id="key'+idx+'" data-idx="'+idx+'" onclick="fnClickRecommendKey(this,\''+idx+'\');">\n';
 							itemTag += '				<dl>\n';
 							itemTag += '					<dt>\n';
 							itemTag += '						<button>\n';
@@ -755,6 +754,9 @@
 							}
 						});
 
+						itemTag += '</div>';
+						itemTag += '<div class="swiper-pagination"></div>';
+
 						if(itemTag.indexOf('swiper-slide') >-1 ){
 							$("#recomItemArea").html(itemTag);
 							fnSwiperScript();
@@ -763,112 +765,124 @@
 				}
 			});
 		}
-
 		/*]]>*/
 
 	</script>
 
 	<script type="text/javascript">
-		var fnSwiperScript = function (){
-		// post_sug
 		var numCnt = 0;
-		var post_sug = new Swiper('.swiper-container.post-sug', {
+		var foryouIndex = 0;
+		var cntNum = 0;
+		var fnSwiperScript = function (){
+			// post_sug
+			var post_sug = new Swiper('.swiper-container.post-sug', {
 
-			a11y: {
-				enabled: true,
-				notificationClass: 'swiper-notification',
-				prevSlideMessage: '이전 슬라이드',
-				nextSlideMessage: '다음 슬라이드',
-				firstSlideMessage: '첫번째 슬라이드 입니다',
-				lastSlideMessage: '마지막 슬라이드 입니다',
-				paginationBulletMessage: '슬라이드 {{index}}로 이동',
-			},
-			pagination: {
-				el: '.swiper-pagination',
-			},
-			// autoplay: {
-			// 	delay: 24700,
-			// 	disableOnInteraction: false,
-			// },
-			on : {
-				slideChange: function(){
-					foryouIndex = 0;
-					if(numCnt === 0){
-						$(".swiper-slide.type1 .list_cate > li").removeClass('on');
-						$(".swiper-slide.type2 .list_cate > li").removeClass('on');
-						$(".swiper-slide.type2 .list_cate .first").addClass('on');
-						numCnt = 1;
-					} else {
-						$(".swiper-slide.type1 .list_cate > li").removeClass('on');
-						$(".swiper-slide.type2 .list_cate > li").removeClass('on');
-						$(".swiper-slide.type1 .list_cate .first").addClass('on');
-						numCnt = 0;
+				a11y: {
+					enabled: true,
+					notificationClass: 'swiper-notification',
+					prevSlideMessage: '이전 슬라이드',
+					nextSlideMessage: '다음 슬라이드',
+					firstSlideMessage: '첫번째 슬라이드 입니다',
+					lastSlideMessage: '마지막 슬라이드 입니다',
+					paginationBulletMessage: '슬라이드 {{index}}로 이동',
+				},
+				pagination: {
+					el: '.swiper-pagination',
+				},
+				// autoplay: {
+				// 	delay: 24700,
+				// 	disableOnInteraction: false,
+				// },
+				on : {
+					slideChange: function(){
+						foryouIndex = 0;
+						if(numCnt === 0){
+							$(".swiper-slide.type1 .list_cate > li").removeClass('on');
+							$(".swiper-slide.type2 .list_cate > li").removeClass('on');
+							$(".swiper-slide.type2 .list_cate .first").addClass('on');
+							numCnt = 1;
+						} else {
+							$(".swiper-slide.type1 .list_cate > li").removeClass('on');
+							$(".swiper-slide.type2 .list_cate > li").removeClass('on');
+							$(".swiper-slide.type1 .list_cate .first").addClass('on');
+							numCnt = 0;
+						}
 					}
-				}
-			},
+				},
 
-		});
+			});
 
-		var foryouIndex = 0;
-		var cntNum = 0;
-		function foryouInterval(_foryouIndex) {
-			var foryouCateItems1 = $(".main_foryou .post-sug .swiper-slide.type1.swiper-slide-active .list_cate li");
-			var foryouCateItems2 = $(".main_foryou .post-sug .swiper-slide.type2.swiper-slide-active .list_cate li");
-			$(".main_foryou .post-sug .swiper-slide.type1 .list_cate li").removeClass("on");
-			$(".main_foryou .post-sug .swiper-slide.type2 .list_cate li").removeClass("on");
-
-			if($(".main_foryou .post-sug .swiper-slide.type1").hasClass("swiper-slide-active")){
-				$(foryouCateItems1[(_foryouIndex ) % 5]).addClass("on");
-				if (_foryouIndex >= 5) foryouIndex = 0;
-				foryouIndex++;
-				(foryouCateItems1).click(function () {
-					foryouIndex = $(this).index();
-					clearInterval(stopInter);
-					stopInter = startTimeInterval();
-				});
+			function foryouInterval(_foryouIndex) {
+				var foryouCateItems1 = $(".main_foryou .post-sug .swiper-slide.type1.swiper-slide-active .list_cate li");
+				var foryouCateItems2 = $(".main_foryou .post-sug .swiper-slide.type2.swiper-slide-active .list_cate li");
+				$(".main_foryou .post-sug .swiper-slide.type1 .list_cate li").removeClass("on");
+				$(".main_foryou .post-sug .swiper-slide.type2 .list_cate li").removeClass("on");
+
+				if($(".main_foryou .post-sug .swiper-slide.type1").hasClass("swiper-slide-active")){
+					$(foryouCateItems1[(_foryouIndex) % 5]).addClass("on");
+					if (_foryouIndex >= 5) foryouIndex = 0;
+					foryouIndex++;
+					// $(foryouCateItems1).click(function () {
+					// 	foryouIndex = $(this).index();
+					// 	clearInterval(stopInter);
+					// 	stopInter = startTimeInterval();
+					// });
+				}
+				if($(".main_foryou .post-sug .swiper-slide.type2").hasClass("swiper-slide-active")){
+					$(foryouCateItems2[(_foryouIndex) % 5]).addClass("on");
+					if (_foryouIndex >= 5) foryouIndex = 0;
+					foryouIndex++;
+					// $(foryouCateItems2).click(function () {
+					// 	foryouIndex = $(this).index();
+					// 	clearInterval(stopInter);
+					// 	stopInter = startTimeInterval();
+					// });
+				}
 			}
-			if($(".main_foryou .post-sug .swiper-slide.type2").hasClass("swiper-slide-active")){
-				$(foryouCateItems2[(_foryouIndex ) % 5]).addClass("on");
-				if (_foryouIndex >= 5) foryouIndex = 0;
-				foryouIndex++;
-				$(foryouCateItems2).click(function () {
-					foryouIndex = $(this).index();
-					clearInterval(stopInter);
-					stopInter = startTimeInterval();
-				});
+			function startTimeInterval(){
+				return setInterval(function () {
+					foryouInterval(foryouIndex);
+				}, 5000);
 			}
-		}
-		function startTimeInterval(){
-			return setInterval(function () {
-				foryouInterval(foryouIndex);
-			}, 5000);
-		}
-
-		var stopInter = startTimeInterval();
+			var stopInter = startTimeInterval();
 
-		//setTimeout(function () {
-		//		foryouInterval(foryouIndex);
-		//		if (foryouIndex >= 5) foryouIndex = 0;
-		//		foryouIndex++;
-		//}, 2000);
+			var post_sug_items = new Swiper ('.swiper-container.post-sug-items', {
+				autoHeight: true, //210720_ 추가
+				slidesPerView: 3,
+				spaceBetween: 10,
+				speed : 1000,
+				a11y: {
+					enabled: true,
+					notificationClass: 'swiper-notification',
+					prevSlideMessage: '이전 슬라이드',
+					nextSlideMessage: '다음 슬라이드',
+					firstSlideMessage: '첫번째 슬라이드 입니다',
+					lastSlideMessage: '마지막 슬라이드 입니다',
+					paginationBulletMessage: '슬라이드 {{index}}로 이동',
+				},
+			});
+		}
 
+		var fnClickRecommendKey = function (obj, key){
+			var onIdx = '';
+			$(".main_foryou .post-sug .swiper-slide .list_cate li").each(function (){
+				if($(this).hasClass("on")){
+					onIdx = $(this).attr('data-idx');
+					$(this).removeClass("on");
+				}
+			});
 
+			if(onIdx == key){
+				$("#key"+key).removeClass("on");
+			}else{
+				$("#key"+key).addClass("on");
+			}
 
-		var post_sug_items = new Swiper ('.swiper-container.post-sug-items', {
-			autoHeight: true, //210720_ 추가
-			slidesPerView: 3,
-			spaceBetween: 10,
-			speed : 1000,
-			a11y: {
-				enabled: true,
-				notificationClass: 'swiper-notification',
-				prevSlideMessage: '이전 슬라이드',
-				nextSlideMessage: '다음 슬라이드',
-				firstSlideMessage: '첫번째 슬라이드 입니다',
-				lastSlideMessage: '마지막 슬라이드 입니다',
-				paginationBulletMessage: '슬라이드 {{index}}로 이동',
-			},
-		});
+			$(".main_foryou .post-sug .swiper-slide .list_cate li").each(function (){
+				if($(this).hasClass("on")){
+					foryouIndex = $(this).attr('data-idx');
+				}
+			});
 		}
 	</script>
 

+ 16 - 3
src/main/webapp/WEB-INF/views/mob/order/OrderFormMob.html

@@ -2318,7 +2318,7 @@ var custCpnApply = function(obj, idx, cpnType) {
 						var goodsCpnDcAmt 	= parseInt($(this).parent().find(".goodsCpnDcAmt").text());
 						
 						var tempAmt 		= ((orgCurrPrice - cpn1DcAmt) * goodsQty) - tmtb1DcAmt - tmtb2DcAmt - goodsCpnDcAmt;
-						var tempDiv 		= parseInt((tempAmt / tempSumAmt) * 100);
+						var tempDiv 		= (tempAmt / tempSumAmt) * 100;
 						var cartCpnDcAmt	= 0;
 				
 						if (index == cartSqLen) {
@@ -2555,6 +2555,9 @@ var custCpnSumAmtCal = function() {
 	var savePntSumAmt		= 0;
 	var totDcSumAmt			= 0;
 	
+	// 2021.10.01 포인트, 상품권 주문금액 분배를 위해서 주문금액  - 할인금액 적용
+	var ordDcSumAmt			= 0;
+	
 	$("#orderAmtForm .cartSq").each(function(){
 		var orgCurrPrice 	= parseInt($(this).parent().find(".orgCurrPrice").text());
 		var cpn1DcAmt		= parseInt($(this).parent().find(".cpn1DcAmt").text());
@@ -2591,6 +2594,9 @@ var custCpnSumAmtCal = function() {
 		
 		totDcSumAmt			= totDcSumAmt + dcSumAmt;
 		
+		// 2021.10.01 포인트, 상품권 주문금액 분배를 위해서 주문금액  - 할인금액 적용
+		ordDcSumAmt			= ordDcSumAmt + (ordAmt - dcSumAmt);
+		
 		// 주문금액설정
 		$(this).parent().find(".ordAmt").text(ordAmt);
 		$(this).parent().find(".dcSumAmt").text(dcSumAmt);
@@ -2604,7 +2610,11 @@ var custCpnSumAmtCal = function() {
 		var ordAmt 			= parseInt($(this).parent().find(".ordAmt").text());
 		var dcSumAmt		= parseInt($(this).parent().find(".dcSumAmt").text()); 
 		var prePntDcAmt1	= parseInt($(this).parent().find(".prePntDcAmt1").text());
-		var tempDiv 		= (ordAmt / ordSumAmt) * 100;
+		
+		// 2021.10.01 포인트, 상품권 주문금액 분배를 위해서 주문금액  - 할인금액 적용
+		var ordDcAmt		= ordAmt - dcSumAmt;
+		var tempDiv 		= (ordDcAmt / ordDcSumAmt) * 100;
+		
 		var pntDcAmt1 		= 0;
 		var savePntAmt1		= 0;
 		
@@ -2670,7 +2680,10 @@ var custCpnSumAmtCal = function() {
 		var ordAmt 			= parseInt($(this).parent().find(".ordAmt").text());
 		var dcSumAmt		= parseInt($(this).parent().find(".dcSumAmt").text());
 		var pntDcAmt1		= parseInt($(this).parent().find(".pntDcAmt1").text());
-		var tempDiv 		= (ordAmt / ordSumAmt) * 100;
+		
+		// 2021.10.01 포인트, 상품권 주문금액 분배를 위해서 주문금액  - 할인금액 적용
+		var ordDcAmt		= ordAmt - dcSumAmt - pntDcAmt1;
+		var tempDiv 		= (ordDcAmt / ordDcSumAmt) * 100;
 		var gfcdUseAmt1		= 0;
 		
 		// 전체상품 상품권금액 전체 적용 일때 첫번째 상품부터 차감 형식 입니다.

+ 129 - 10
src/main/webapp/WEB-INF/views/web/display/BestMainFormWeb.html

@@ -98,9 +98,9 @@
 											<div class="select">구매 성별 전체</div>
 											<ul class="list">
 												<!-- 선택처리 class="selected" / 선택불가 aria-disabled="true" 추가  -->
-												<li class="selected">전체</li>
-												<li>남성</li>
-												<li>여성</li>
+												<li class="selected" data-id="" onclick="fnGetEigenD002(this, 'gender');">전체</li>
+												<li data-id="A" onclick="fnGetEigenD002(this, 'gender');">남성</li>
+												<li data-id="B" onclick="fnGetEigenD002(this, 'gender');">여성</li>
 											</ul>
 										</div>
 									</div>
@@ -109,12 +109,12 @@
 											<div class="select">구매 연령 전체</div>
 											<ul class="list">
 												<!-- 선택처리 class="selected" / 선택불가 aria-disabled="true" 추가  -->
-												<li class="selected">전체</li>
-												<li>10대</li>
-												<li>20대</li>
-												<li>30대</li>
-												<li>40대</li>
-												<li>50대 이상</li>
+												<li class="selected" data-id="" onclick="fnGetEigenD002(this, 'age');">전체</li>
+												<li data-id="10" onclick="fnGetEigenD002(this, 'age');">10대</li>
+												<li data-id="20" onclick="fnGetEigenD002(this, 'age');">20대</li>
+												<li data-id="30" onclick="fnGetEigenD002(this, 'age');">30대</li>
+												<li data-id="40" onclick="fnGetEigenD002(this, 'age');">40대</li>
+												<li data-id="50" onclick="fnGetEigenD002(this, 'age');">50대 이상</li>
 											</ul>
 										</div>
 									</div>
@@ -185,7 +185,6 @@
 
 		$.getJSON('/display/realtime/best/list' , data, function (result, status){
 			$("#itemViewArea").html('');
-			console.log(result);
 			if(result.length > 0){
 				$.each(result, function (idx, item){
 					// 2021.08.30 이미지 null 처리
@@ -235,9 +234,15 @@
 		gagajf.ajaxFormSubmit("/display/best/main/goods/list", document.bestGoodsForm,  fnCallbackBestTop100);
 	}
 
+	let bestCnt = 0;
+	let eigenBestCnt = 0;
+
 	var fnCallbackBestTop100 = function (result){
 		$("#prodArea").html('');
 		var tag = '';
+
+		bestCnt = result.dataList.length;
+
 		if(result.dataList.length > 0){
 			$.each(result.dataList, function (idx, item){
 				tag += '<div class="item_prod">\n';
@@ -307,6 +312,120 @@
 
 			$("#prodArea").append(tag);
 		}
+		// 수동설정이 100미만이면 추천솔루션 데이터 추가 조회
+		if(bestCnt < 100){
+			eigenBestCnt = 100 - bestCnt;
+			fnGetEigenBestData(eigenBestCnt);
+		}
+	}
+
+	// 추천솔루션 데이터 추가 조회
+	var fnGetEigenBestData = function (cnt){
+		var eigenUrl = '';
+		var selectCateNo = $("#bestGoodsForm input[name=cateNo]").val();
+
+		if(gagajf.isNull(selectCateNo)){
+			/* cateNo 전체 일 때 */
+			eigenUrl = 'https://api.eigene.io/rec/m061?size='+cnt+'&cuid=1252aed4-78dc-46e8-b784-94ac42e86dd4';
+		}else{
+			eigenUrl = 'https://api.eigene.io/rec/m060?size='+cnt+'&cuid=1252aed4-78dc-46e8-b784-94ac42e86dd4&incids='+selectCateNo;
+		}
+		var tag = '';
+		$.getJSON(eigenUrl, function (result, status){
+			if (status === 'success') {
+				if (!gagajf.isNull(result.results)) {
+					$.each(result.results, function (idx, item) {
+						tag += '<div class="item_prod">\n';
+						tag += '	<div class="item_state">\n';
+						tag += '		<button type="button" class="itemLike" onclick="wishlistDelete(this)" goodsCd="'+item.product.itemId+'" goodsNm="'+ item.product.itemName+'" ithrCd="" contentsLoc="IN10_01" planDtlSq="">관심상품 추가</button>\n';
+						tag += '		<a href="javascript:void(0);" class="itemLink" onclick="cfnGoToGoodsDetail(\''+item.product.itemId+'\', \'\',\'IN10_01\')">\n';
+						tag += '<div class="shape ';
+						if(cnt == 100 && idx==0){
+							tag += ' ranker';
+						}
+						tag += '"><span>'+(bestCnt+idx+1)+'</span></div>\n';
+						tag += '			<div class="itemPic">\n';
+						tag += '				<img alt="BLUE-a" class=" vLHTC pd_img" src="'+ item.product.itemImage +'">\n';
+						tag += '			</div>\n';
+						tag += '			<p class="itemBrand">'+item.product.brandName+'</p>\n';
+						tag += '			<div class="itemName">'+item.product.itemName+'</div>\n';
+						tag += '			<p class="itemPrice">'+item.product.salePrice.addComma();
+						if (item.product.originalPrice != item.product.salePrice) {
+							tag+='						<span class="itemPrice_original">'+item.product.originalPrice.addComma()+'</span>\n';
+							tag+='						<span class=" itemPercent">'+ Math.round((item.product.originalPrice - item.product.salePrice) / (item.product.originalPrice * 1.0) * 100) +'%</span>\n';
+						}
+						tag += '			</p>\n';
+						tag += '		</a>\n';
+						tag += '	</div>\n';
+						tag += '</div>\n';
+					});
+					$("#prodArea").append(tag);
+				}
+			}
+		});
+	}
+
+	// 구매 성별/연령 별 베스트 상품 추천
+	var fnGetEigenD002 = function (obj, key){
+		var gender = '';
+		var age = '';
+
+		if(key == 'gender'){
+			gender = $(obj).attr("data-id");
+			$('.select_age .list').find('li').each(function (){
+				if($(this).hasClass("selected")){
+					age = $(this).attr("data-id");
+				}
+			});
+		}else{
+			age = $(obj).attr("data-id");
+			$('.select_sex .list').find('li').each(function (){
+				if($(this).hasClass("selected")){
+					gender = $(this).attr("data-id");
+				}
+			});
+		}
+
+		if(gagajf.isNull(gender) && gagajf.isNull(age)){
+			$("#prodArea").html('');
+			fnGetEigenBestData(100);
+		}else{
+			$("#prodArea").html('');
+			var eigenUrl = 'https://api.eigene.io/rec/d002?size=100&cuid=1252aed4-78dc-46e8-b784-94ac42e86dd4&gender='+gender+'&age='+age;
+			var tag = '';
+			$.getJSON(eigenUrl, function (result, status){
+				if (status === 'success') {
+					if (!gagajf.isNull(result.results)) {
+						$.each(result.results, function (idx, item) {
+							tag += '<div class="item_prod">\n';
+							tag += '	<div class="item_state">\n';
+							tag += '		<button type="button" class="itemLike" onclick="wishlistDelete(this)" goodsCd="'+item.product.itemId+'" goodsNm="'+ item.product.itemName+'" ithrCd="" contentsLoc="IN10_01" planDtlSq="">관심상품 추가</button>\n';
+							tag += '		<a href="javascript:void(0);" class="itemLink" onclick="cfnGoToGoodsDetail(\''+item.product.itemId+'\', \'\',\'IN10_01\')">\n';
+							tag += '<div class="shape ';
+							if(idx==0){
+								tag += ' ranker';
+							}
+							tag += '"><span>'+(idx+1)+'</span></div>\n';
+							tag += '			<div class="itemPic">\n';
+							tag += '				<img alt="BLUE-a" class=" vLHTC pd_img" src="'+ item.product.itemImage +'">\n';
+							tag += '			</div>\n';
+							tag += '			<p class="itemBrand">'+item.product.brandName+'</p>\n';
+							tag += '			<div class="itemName">'+item.product.itemName+'</div>\n';
+							tag += '			<p class="itemPrice">'+item.product.salePrice.addComma();
+							if (item.product.originalPrice != item.product.salePrice) {
+								tag+='						<span class="itemPrice_original">'+item.product.originalPrice.addComma()+'</span>\n';
+								tag+='						<span class=" itemPercent">'+ Math.round((item.product.originalPrice - item.product.salePrice) / (item.product.originalPrice * 1.0) * 100) +'%</span>\n';
+							}
+							tag += '			</p>\n';
+							tag += '		</a>\n';
+							tag += '	</div>\n';
+							tag += '</div>\n';
+						});
+						$("#prodArea").append(tag);
+					}
+				}
+			});
+		}
 	}
 
 	$(document).ready(function() {

+ 0 - 2
src/main/webapp/WEB-INF/views/web/display/MallMainFormWeb.html

@@ -618,13 +618,11 @@ $(document).ready( function() {
 	$(".it_nav .btn").eq(randomNum).trigger('click');
 
 	// 당신을 위한 제안 쿠키값 확인 (로그인시 확인됨)
-	/* 20210927 xodud1202 > 수빈과장님 요청
 	var pcId = gagajf.getCookie("RB_PCID");
 	// 추천솔루션 API 호출
 	//if(!gagajf.isNull(pcId)){
 		fnGetEigenApi(pcId);
 	//}
-	 */
 });
 
 /**

+ 16 - 3
src/main/webapp/WEB-INF/views/web/order/OrderFormWeb.html

@@ -2132,7 +2132,7 @@ var custCpnApply = function(obj) {
 						var goodsCpnDcAmt 	= parseInt($(this).parent().find(".goodsCpnDcAmt").text());
 						
 						var tempAmt 		= ((orgCurrPrice - cpn1DcAmt) * goodsQty) - tmtb1DcAmt - tmtb2DcAmt - goodsCpnDcAmt;
-						var tempDiv 		= parseInt((tempAmt / tempSumAmt) * 100);
+						var tempDiv 		= (tempAmt / tempSumAmt) * 100;
 						var cartCpnDcAmt	= 0;
 				
 						if (index == cartSqLen) {
@@ -2357,6 +2357,9 @@ var custCpnSumAmtCal = function() {
 	var realOrdSumAmt		= 0;
 	var savePntSumAmt		= 0;
 	
+	// 2021.10.01 포인트, 상품권 주문금액 분배를 위해서 주문금액  - 할인금액 적용
+	var ordDcSumAmt			= 0;
+	
 	$("#orderAmtForm .cartSq").each(function(){
 		var orgCurrPrice 	= parseInt($(this).parent().find(".orgCurrPrice").text());
 		var cpn1DcAmt		= parseInt($(this).parent().find(".cpn1DcAmt").text());
@@ -2391,6 +2394,9 @@ var custCpnSumAmtCal = function() {
 			dcSumAmt		= tmtb1DcAmt + tmtb2DcAmt + goodsCpnDcAmt + cartCpnDcAmt;
 		}
 		
+		// 2021.10.01 포인트, 상품권 주문금액 분배를 위해서 주문금액  - 할인금액 적용
+		ordDcSumAmt			= ordDcSumAmt + (ordAmt - dcSumAmt);
+		
 		// 주문금액설정
 		$(this).parent().find(".ordAmt").text(ordAmt);
 		$(this).parent().find(".dcSumAmt").text(dcSumAmt);
@@ -2403,7 +2409,11 @@ var custCpnSumAmtCal = function() {
 		var ordAmt 			= parseInt($(this).parent().find(".ordAmt").text());
 		var dcSumAmt		= parseInt($(this).parent().find(".dcSumAmt").text());
 		var prePntDcAmt1	= parseInt($(this).parent().find(".prePntDcAmt1").text());
-		var tempDiv 		= (ordAmt / ordSumAmt) * 100;
+		
+		// 2021.10.01 포인트, 상품권 주문금액 분배를 위해서 주문금액  - 할인금액 적용
+		var ordDcAmt		= ordAmt - dcSumAmt;
+		var tempDiv 		= (ordDcAmt / ordDcSumAmt) * 100;
+		
 		var pntDcAmt1 		= 0;
 		var savePntAmt1		= 0;
 		
@@ -2461,7 +2471,10 @@ var custCpnSumAmtCal = function() {
 		var ordAmt 			= parseInt($(this).parent().find(".ordAmt").text());
 		var dcSumAmt		= parseInt($(this).parent().find(".dcSumAmt").text());
 		var pntDcAmt1		= parseInt($(this).parent().find(".pntDcAmt1").text());
-		var tempDiv 		= (ordAmt / ordSumAmt) * 100;
+		
+		// 2021.10.01 포인트, 상품권 주문금액 분배를 위해서 주문금액  - 할인금액 적용
+		var ordDcAmt		= ordAmt - dcSumAmt - pntDcAmt1;
+		var tempDiv 		= (ordDcAmt / ordDcSumAmt) * 100;
 		var gfcdUseAmt1		= 0;
 		
 		// 전체상품 상품권금액 전체 적용 일때 첫번째 상품부터 차감 형식 입니다.

+ 3 - 3
src/main/webapp/WEB-INF/views/web/planning/PlanningDetailFormWeb.html

@@ -44,15 +44,15 @@
 									<div id="layerShare" class="setShare open">
 										<span>
 											<button type="button" class="kk"
-												th:attr="onclick=|cfnSendToKakao('${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '${planView+ '/'+planInfo.mainPimg}');|">
+												th:attr="onclick=|cfnSendToKakao('${frontUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '${planView+ '/'+planInfo.mainPimg}');|">
 												<span>카카오톡</span>
 											</button>
 											<button type="button" class="fb"
-												th:attr="onclick=|sendSns('facebook', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|">
+												th:attr="onclick=|sendSns('facebook', '${frontUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm}', '', '');|">
 												<span>페이스북</span>
 											</button>
 											<button type="button" class="tw" 
-												th:attr="onclick=|sendSns('twitter', '${stylelUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|">
+												th:attr="onclick=|sendSns('twitter', '${frontUrl+'/planning/detail/form?planSq='+planInfo.planSq}', '${planInfo.planNm+ '#style24몰'}', '', '');|">
 												<span>트위터</span>
 											</button>
 											<button type="button" class="url btn_copy">

+ 8 - 5
src/main/webapp/ux/style24_link.js

@@ -1575,16 +1575,19 @@ function sendSns(sns, url, txt, media, description)
 	var _media = encodeURIComponent(media);
 	var _description = encodeURIComponent(description);
 	
-	_url = location.protocol + _url.replaceAll('#enp_mbris','') + '&share=Y'
-//	_url = location.protocol + encodeURIComponent(url);
-	
+	// _url = location.protocol + _url.replaceAll('#enp_mbris','') + '&share=Y'
+
+	_url = location.protocol + encodeURIComponent(url);
+
 	switch(sns)
 	{
 		case 'facebook':
-			window.open('http://www.facebook.com/sharer/sharer.php?u=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
+			var faceUrl = _isApp == 'true' ? 'public://?link=http://www.facebook.com/sharer/sharer.php?u=' : 'http://www.facebook.com/sharer/sharer.php?u=';
+			window.open(faceUrl + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
 			break;
 		case 'twitter':
-			window.open('http://twitter.com/intent/tweet?text=' + _txt + '&url=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
+			var twitUrl = _isApp == 'true' ? 'public://?link=http://twitter.com/intent/tweet?text=' : 'http://twitter.com/intent/tweet?text=';
+			window.open(twitUrl + _txt + '&url=' + _url, "_blank", 'width=600,height=400,resizable=yes,scrollbars=yes');
 			break;
 		default:
 			mcxDialog.alert('지원하지 않는 SNS입니다.');