Kaynağa Gözat

Merge branch 'develop' into bin2107

bin2107 4 yıl önce
ebeveyn
işleme
b7c75a5dbd

+ 11 - 0
src/main/java/com/style24/front/biz/dao/TsfWishlistDao.java

@@ -43,4 +43,15 @@ public interface TsfWishlistDao {
 	 * @date 2021. 5. 13
 	 */
 	Collection<Goods> getQuickWishList(WishList wishList);
+	
+	/**
+	 * 위시리스트 상품여부용
+	 *
+	 * @param 
+	 * @return
+	 * @author eskim
+	 * @date 2021. 6. 30
+	 */
+	int getWishListGoodsCount(WishList wishList);
+	
 }

+ 19 - 0
src/main/java/com/style24/front/biz/service/TsfWishlistService.java

@@ -67,4 +67,23 @@ public class TsfWishlistService {
 		wishList.setCustNo(login.getCustNo());
 		return wishListDao.getQuickWishList(wishList);
 	}
+	
+	/**
+	 * 위시리스트 상품여부용 
+	 *
+	 * @param 
+	 * @return
+	 * @author eskim
+	 * @date 2021. 6. 30
+	 */
+	public int getWishListGoodsCount(String goodsCd){
+		WishList wishList = new WishList();
+		Login login = TsfSession.getInfo();
+		wishList.setCustNo(login.getCustNo());
+		wishList.setGoodsCd(goodsCd);
+		return wishListDao.getWishListGoodsCount(wishList);
+	}
+	
+	
+	
 }

+ 10 - 282
src/main/java/com/style24/front/biz/web/TsfGoodsController.java

@@ -239,45 +239,7 @@ public class TsfGoodsController extends TsfBaseController {
 			// pc 추천 영역
 			if ("P".equals(paramsGoods.getFrontGb())) {
 				// 이상픔과 함께본 상품
-				paramsGoods.setMaxRownum(15);
-				String[] arrGoodsCd = {
-					"B192DO995P",
-					"L191TJ571P",
-					"L191WB304P",
-					"B192DO996P",
-					"L191WB305P",
-					"B192SH720P",
-					"L191WB703P",
-					"10813858",
-					"10813859",
-					"L171JP121P",
-					"10813860",
-					"L171JP721P",
-					"10813862",
-					"L171TJ501P",
-					"10814432",
-					"10813855",
-					"L171TJ561P",
-					"B172SH710P",
-					"B192SH730P"};
-
-				StringBuilder sql = new StringBuilder();
-				if (arrGoodsCd.length > 0) {
-					int idx = 1;
-					for (String goodsCd : arrGoodsCd) {
-						if (!StringUtils.isBlank(goodsCd)) {
-							if (idx > 1) {
-								sql.append("UNION ALL ");
-							}
-							sql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
-						}
-					}
-					paramsGoods.setGoodsSql(sql.toString());
-				}
-
-				paramsGoods.setArrGoodsCd(arrGoodsCd);
-				mav.addObject("togetherGoodsList", goodsService.getRecommendGoodsList(paramsGoods));
-
+				mav.addObject("togetherGoodsList", eigeneaiApi.getRelatedGoodsList(goods.getGoodsCd(),15));
 			}
 
 		} else {
@@ -346,124 +308,17 @@ public class TsfGoodsController extends TsfBaseController {
 			// pc 추천 영역
 			if ("P".equals(paramsGoods.getFrontGb())) {
 				// 이상픔과 함께본 상품
-				paramsGoods.setMaxRownum(15);
-				String[] arrGoodsCd = {
-					"B192DO995P",
-					"L191TJ571P",
-					"L191WB304P",
-					"B192DO996P",
-					"L191WB305P",
-					"B192SH720P",
-					"L191WB703P",
-					"10813858",
-					"10813859",
-					"L171JP121P",
-					"10813860",
-					"L171JP721P",
-					"10813862",
-					"L171TJ501P",
-					"10814432",
-					"10813855",
-					"L171TJ561P",
-					"B172SH710P",
-					"B192SH730P"};
-
-				StringBuilder sql = new StringBuilder();
-				if (arrGoodsCd.length > 0) {
-					int idx = 1;
-					for (String goodsCd : arrGoodsCd) {
-						if (!StringUtils.isBlank(goodsCd)) {
-							if (idx > 1) {
-								sql.append("UNION ALL ");
-							}
-							sql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
-						}
-					}
-					paramsGoods.setGoodsSql(sql.toString());
-				}
-
-				paramsGoods.setArrGoodsCd(arrGoodsCd);
-				mav.addObject("togetherGoodsList", goodsService.getRecommendGoodsList(paramsGoods));
+//				log.info("[상품상세  이상픔과 함께본 상품] =={}", eigeneaiApi.getRelatedGoodsList(goods.getGoodsCd(),15));
+				mav.addObject("togetherGoodsList", eigeneaiApi.getRelatedGoodsList(goods.getGoodsCd(),15));
 
 				// 브랜드 추천 상품
-				paramsGoods.setMaxRownum(15);
-				String[] arrBrandGoodsCd = {
-					"L191WB304P",
-					"B192DO996P",
-					"L191WB305P",
-					"B192DO995P",
-					"L191TJ571P",
-					"B192SH720P",
-					"L191WB703P",
-					"10813858",
-					"10813859",
-					"L171JP121P",
-					"10813860",
-					"L171JP721P",
-					"10813862",
-					"L171TJ501P",
-					"10814432",
-					"10813855",
-					"L171TJ561P",
-					"B172SH710P",
-					"B192SH730P"};
-
-				StringBuilder brandSql = new StringBuilder();
-				if (arrGoodsCd.length > 0) {
-					int idx = 1;
-					for (String goodsCd : arrBrandGoodsCd) {
-						if (!StringUtils.isBlank(goodsCd)) {
-							if (idx > 1) {
-								brandSql.append("UNION ALL ");
-							}
-							brandSql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
-						}
-					}
-					paramsGoods.setGoodsSql(brandSql.toString());
-				}
-
-				paramsGoods.setArrGoodsCd(arrBrandGoodsCd);
-				mav.addObject("recommendGoodsList", goodsService.getRecommendGoodsList(paramsGoods));
+//				log.info("[상품상세  브랜드 추천 상품] =={}", eigeneaiApi.getBrandRelatedGoodsList(15,goods.getGoodsCd(), goods.getBrandGroupNo()));
+				mav.addObject("recommendGoodsList", eigeneaiApi.getBrandRelatedGoodsList(15,goods.getGoodsCd(), goods.getBrandGroupNo()));
 
 				// 비슷한 상품
-				paramsGoods.setMaxRownum(15);
-				String[] arrLikeGoodsCd = {
-					"B192DO995P",
-					"L191TJ571P",
-					"L191WB304P",
-					"L171TJ561P",
-					"B172SH710P",
-					"B192SH730P",
-					"B192DO996P",
-					"L191WB305P",
-					"B192SH720P",
-					"L191WB703P",
-					"10813858",
-					"10813859",
-					"L171JP121P",
-					"10813860",
-					"L171JP721P",
-					"10813862",
-					"L171TJ501P",
-					"10814432",
-					"10813855"};
-
-				StringBuilder likeSql = new StringBuilder();
-				if (arrGoodsCd.length > 0) {
-					int idx = 1;
-					for (String goodsCd : arrLikeGoodsCd) {
-						if (!StringUtils.isBlank(goodsCd)) {
-							if (idx > 1) {
-								likeSql.append("UNION ALL ");
-							}
-							likeSql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
-						}
-					}
-					paramsGoods.setGoodsSql(likeSql.toString());
-				}
+//				log.info("[상품상세  비슷한 상품] =={}", eigeneaiApi.getSameCategoryRelatedGoodsList(15,goods.getGoodsCd()));
+				mav.addObject("likeGoodsList", eigeneaiApi.getSameCategoryRelatedGoodsList(15,goods.getGoodsCd()));
 
-				paramsGoods.setArrGoodsCd(arrLikeGoodsCd);
-				mav.addObject("likeGoodsList", goodsService.getRecommendGoodsList(paramsGoods));
 			}
 
 			// 상품 공통 베너
@@ -1148,51 +1003,10 @@ public class TsfGoodsController extends TsfBaseController {
 	 */
 	@PostMapping("/detail/together/frame")
 	public ModelAndView goodsTogetherForm(@RequestBody Goods goods) {
-
 		ModelAndView mav = new ModelAndView();
-		// 상품관련 기본값 설정(회원 등급, 앱, PC/모바일 등)
-		setGoods(goods);
-		goods.setMaxRownum(15);
-		String[] arrGoodsCd = {"10813855",
-			"L171TJ561P",
-			"B172SH710P",
-			"B192DO995P",
-			"L191TJ571P",
-			"L191WB304P",
-			"B192DO996P",
-			"L191WB305P",
-			"B192SH720P",
-			"L191WB703P",
-			"10813858",
-			"10813859",
-			"L171JP121P",
-			"10813860",
-			"L171JP721P",
-			"10813862",
-			"L171TJ501P",
-			"10814432",
-			"B192SH730P"};
-
-		StringBuilder sql = new StringBuilder();
-		if (arrGoodsCd.length > 0) {
-			int idx = 1;
-			for (String goodsCd : arrGoodsCd) {
-				if (!StringUtils.isBlank(goodsCd)) {
-					if (idx > 1) {
-						sql.append("UNION ALL ");
-					}
-					sql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
-				}
-			}
-			goods.setGoodsSql(sql.toString());
-		}
-
-		goods.setArrGoodsCd(arrGoodsCd);
-		mav.addObject("goodsList", goodsService.getRecommendGoodsList(goods));
-		//log.info("goodsTogetherForm = goods{}", goods);
+		mav.addObject("goodsList", eigeneaiApi.getRelatedGoodsList(goods.getGoodsCd(),15));
 		goods.setIthrCd("IN15_03");
 		mav.addObject("params", goods);
-
 		mav.setViewName(super.getDeviceViewName("goods/GoodsOtherForm"));
 		return mav;
 	}
@@ -1206,53 +1020,10 @@ public class TsfGoodsController extends TsfBaseController {
 	 */
 	@PostMapping("/detail/recommend/frame")
 	public ModelAndView goodsRecommendForm(@RequestBody Goods goods) {
-
 		ModelAndView mav = new ModelAndView();
-		// 상품관련 기본값 설정(회원 등급, 앱, PC/모바일 등)
-		setGoods(goods);
-		goods.setMaxRownum(15);
-
-		String[] arrGoodsCd = {"10813855",
-			"L171TJ561P",
-			"B172SH710P",
-			"B192DO995P",
-			"L191TJ571P",
-			"L191WB304P",
-			"B192DO996P",
-			"L191WB305P",
-			"B192SH720P",
-			"L191WB703P",
-			"10813858",
-			"10813859",
-			"L171JP121P",
-			"10813860",
-			"L171JP721P",
-			"10813862",
-			"L171TJ501P",
-			"10814432",
-			"B192SH730P"};
-
-		StringBuilder sql = new StringBuilder();
-		if (arrGoodsCd.length > 0) {
-			int idx = 1;
-			for (String goodsCd : arrGoodsCd) {
-				if (!StringUtils.isBlank(goodsCd)) {
-					if (idx > 1) {
-						sql.append("UNION ALL ");
-					}
-					sql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
-				}
-			}
-			goods.setGoodsSql(sql.toString());
-		}
-
-		goods.setArrGoodsCd(arrGoodsCd);
-
-		mav.addObject("goodsList", goodsService.getRecommendGoodsList(goods));
-		//log.info("goodsRecommendForm = goods{}", goods);
+		mav.addObject("goodsList", eigeneaiApi.getBrandRelatedGoodsList(15,goods.getGoodsCd(), goods.getBrandGroupNo()));
 		goods.setIthrCd("IN15_04");
 		mav.addObject("params", goods);
-
 		mav.setViewName(super.getDeviceViewName("goods/GoodsOtherForm"));
 		return mav;
 	}
@@ -1266,53 +1037,10 @@ public class TsfGoodsController extends TsfBaseController {
 	 */
 	@PostMapping("/detail/like/frame")
 	public ModelAndView goodsLikeForm(@RequestBody Goods goods) {
-
 		ModelAndView mav = new ModelAndView();
-		// 상품관련 기본값 설정(회원 등급, 앱, PC/모바일 등)
-		setGoods(goods);
-		goods.setMaxRownum(15);
-
-		String[] arrGoodsCd = {"10813855",
-			"L171TJ561P",
-			"B172SH710P",
-			"B192DO995P",
-			"L191TJ571P",
-			"L191WB304P",
-			"B192DO996P",
-			"L191WB305P",
-			"B192SH720P",
-			"L191WB703P",
-			"10813858",
-			"10813859",
-			"L171JP121P",
-			"10813860",
-			"L171JP721P",
-			"10813862",
-			"L171TJ501P",
-			"10814432",
-			"B192SH730P"};
-
-		StringBuilder sql = new StringBuilder();
-		if (arrGoodsCd.length > 0) {
-			int idx = 1;
-			for (String goodsCd : arrGoodsCd) {
-				if (!StringUtils.isBlank(goodsCd)) {
-					if (idx > 1) {
-						sql.append("UNION ALL ");
-					}
-					sql.append("SELECT '").append(goodsCd).append("' AS GOODS_CD, ").append(idx++).append(" AS DISP_ORD FROM DUAL\r\n");
-				}
-			}
-			goods.setGoodsSql(sql.toString());
-		}
-
-		goods.setArrGoodsCd(arrGoodsCd);
-
-		mav.addObject("goodsList", goodsService.getRecommendGoodsList(goods));
-		//log.info("goodsLikeForm = goods{}", goods);
+		mav.addObject("goodsList", eigeneaiApi.getSameCategoryRelatedGoodsList(15,goods.getGoodsCd()));
 		goods.setIthrCd("IN15_05");
 		mav.addObject("params", goods);
-
 		mav.setViewName(super.getDeviceViewName("goods/GoodsOtherForm"));
 		return mav;
 	}

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

@@ -21,10 +21,6 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 import org.springframework.web.servlet.ModelAndView;
 
-import com.gagaframework.web.parameter.GagaMap;
-import com.gagaframework.web.rest.server.GagaResponse;
-import com.gagaframework.web.rest.server.GagaResponseStatus;
-import com.gagaframework.web.util.GagaCookieUtil;
 import com.style24.core.biz.service.TscCouponService;
 import com.style24.core.biz.service.TscCustomerService;
 import com.style24.core.biz.service.TscEnvsetService;
@@ -74,6 +70,11 @@ import com.style24.persistence.domain.WishList;
 
 import lombok.extern.slf4j.Slf4j;
 
+import com.gagaframework.web.parameter.GagaMap;
+import com.gagaframework.web.rest.server.GagaResponse;
+import com.gagaframework.web.rest.server.GagaResponseStatus;
+import com.gagaframework.web.util.GagaCookieUtil;
+
 /**
  * 마이페이지 Controller
  * 
@@ -2659,4 +2660,24 @@ public class TsfMypageController extends TsfBaseController {
 		
 		return super.ok(env.getProperty("SUCC_0005"));
 	}
+	
+	
+	/**
+	 * 위시리스트 상품여부 
+	 * 
+	 * @return
+	 * @author eskim
+	 * @since 2021. 6. 30
+	 */
+	@GetMapping("/wish/list/check/{goodsCd}")
+	@ResponseBody
+	public String getAjaxWishListCheck(@PathVariable(value = "goodsCd") String goodsCd) {
+		String result = "N";
+		if (wishListService.getWishListGoodsCount(goodsCd) > 0) {
+			result = "Y";
+		}
+		return result;
+	}
+	
+	
 }

+ 5 - 2
src/main/java/com/style24/front/biz/web/TsfPlanningController.java

@@ -734,8 +734,9 @@ public class TsfPlanningController extends TsfBaseController {
 				        cal.setTime(new Date());
 				        DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
 				        int usableDay = tPlan.getPntUsableDay();
-				       cal.add(Calendar.DATE, +usableDay);
+				        cal.add(Calendar.DATE, +usableDay);
 				        point.setExpBeDt(df.format(cal.getTime()));
+				        point.setSignGb("+");
 						corePointService.saveCustomerPoint(point);
 						String msg =  "축하합니다. " + toNumFormat(pointAmt) + " 포인트가 지급 되었습니다!";
 						result.set("msg", msg);
@@ -773,8 +774,9 @@ public class TsfPlanningController extends TsfBaseController {
 				        cal.setTime(new Date());
 				        DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
 				        int usableDay = tPlan.getPntUsableDay();
-				       cal.add(Calendar.DATE, +usableDay);
+				        cal.add(Calendar.DATE, +usableDay);
 				        point.setExpBeDt(df.format(cal.getTime()));
+				        point.setSignGb("+");
 						corePointService.saveCustomerPoint(point);
 						
 						CustCoupon coupon = new CustCoupon();
@@ -790,6 +792,7 @@ public class TsfPlanningController extends TsfBaseController {
 						coreCouponService.saveCouponIssue(coupon);
 						String msg =  "축하합니다. " + toNumFormat(pointAmt) + " 포인트와 " + toNumFormat(coupon.getDcVal()) +coupon.getDcWay() + " 할인쿠폰이 지급 되었습니다!";
 						result.set("msg", msg);
+						break;
 					}
 
 				}else {

+ 1 - 0
src/main/java/com/style24/persistence/domain/eigene/Eigeneai.java

@@ -31,6 +31,7 @@ public class Eigeneai implements Serializable {
 		private String category3;		// 3레벨카테고리
 		private double originalPrice;	// 정상가
 		private double salePrice;		// 판매가
+		private String brandName;		// 브랜드명
 	}
 
 	// 결과상품정보

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

@@ -845,8 +845,7 @@
 		WITH  TAB_MASTER_GOODS AS (
 		SELECT  Z.*
 		FROM (
-		    SELECT @rownum := @rownum + 1 AS RNUM
-		         , B.GOODS_CD
+		    SELECT B.GOODS_CD
 		         , G.GOODS_NM
 		         , G.GOODS_GB
 		         , G.FOREIGN_BUY_YN
@@ -861,7 +860,6 @@
 		         , G.CURR_PRICE
 		         , GS.STOCK_QTY
 		    FROM TB_TMTB A
-		    JOIN ( SELECT @rownum := 0) R
 		    INNER JOIN TB_TMTB_APPLY_GOODS B ON A.TMTB_SQ  = B.TMTB_SQ
 		                                     AND B.DEL_YN = 'N'
 		                                     AND B.GOODS_GB IN ( 'G800_10', 'G800_20')  -- 기본과 적용상품
@@ -899,8 +897,8 @@
 		    AND A.TMTB_SQ = #{tmtbSq}
 		    </otherwise>
 		    </choose>
+		    LIMIT #{maxRownum}
 		    ) Z
-		WHERE RNUM <![CDATA[<= ]]>#{maxRownum}
 		)
 		, TAB_GOODS AS (
 		    SELECT G.GOODS_CD

+ 10 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsfWishlist.xml

@@ -296,4 +296,14 @@
 		    )Z
 		    ORDER BY FIELD(Z.STOCK_QTY_SUM, 1, 2 ,3 ,4 ,5) DESC ,Z.REG_DT DESC
 	</select>
+	
+	<!-- 위시리스트 상품여부용-->
+	<select id="getWishListGoodsCount" parameterType="WishList" resultType="int">
+		/* TsfWishlist.getWishListGoodsCount*/
+		SELECT COUNT(*)
+		FROM TB_WISHLIST
+		WHERE CUST_NO = #{custNo}
+		AND GOODS_CD = #{goodsCd}
+	</select>
+	
 </mapper>

+ 1 - 1
src/main/webapp/WEB-INF/views/mob/goods/GoodsDealDetailFormMob.html

@@ -1570,7 +1570,7 @@
 			}
 			// 광고 스크립트용
 			
-			var snsGoodsImg = _uploadGoodsUrl + [[${goodsInfo.sysImgNm}]];
+			var snsGoodsImg = _uploadGoodsUrl + "/"+ [[${goodsInfo.sysImgNm}]];
 			var snsUrl = location.protocol + _PAGE_GOODS_DETAIL + params.goodsCd +'&colorCd =' + params.colorCd  ;
 			var snsGoodsFullNm = [[${goodsInfo.goodsFullNm}]];
 			

+ 5 - 5
src/main/webapp/WEB-INF/views/mob/goods/GoodsDetailFormMob.html

@@ -2818,7 +2818,7 @@
 		}
 		// 광고 스크립트용
 		
-		var snsGoodsImg = _uploadGoodsUrl + [[${goodsInfo.sysImgNm}]];
+		var snsGoodsImg = _uploadGoodsUrl + "/" + [[${goodsInfo.sysImgNm}]];
 		var snsUrl = location.protocol + _PAGE_GOODS_DETAIL + params.goodsCd +'&colorCd =' + params.colorCd  ;
 		var snsGoodsFullNm = [[${goodsInfo.goodsFullNm}]];
 		
@@ -3021,10 +3021,10 @@
         }
     });
    
-    window.onscroll = function() {
-		document.getElementsByClassName('.modal.pd_pop.pd_review_pop .pd_review .area_rv_empty .btn_group_flex').style.top =
-		window.pageYOffset + 'px';
-	};
+    //window.onscroll = function() {
+	//	document.getElementsByClassName('.modal.pd_pop.pd_review_pop .pd_review .area_rv_empty .btn_group_flex').style.top =
+	//	window.pageYOffset + 'px';
+	//};
 /*]]>*/
 </script>
 

+ 38 - 10
src/main/webapp/WEB-INF/views/mob/goods/GoodsOtherFormMob.html

@@ -23,20 +23,20 @@
 	<div class="area_slider">
 		<div class="swiper-container">
 			<div class="swiper-wrapper">
-				<div class="swiper-slide" th:each="goodsInfo, status : ${goodsList}">
+				<div class="swiper-slide" th:each="result, status : ${goodsList}">
 					<div class="item_prod">
 						<div class="item_state">
-							<button type="button" class="itemLike" th:classappend="${goodsInfo.wishYn == 'Y'}? 'likeit active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsInfo.goodsCd}, ithrCd=${params.ithrCd}, contentsLoc='', planDtlSq=''">관심상품 추가</button>
-							<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${goodsInfo.goodsCd}]], '',[[${params.ithrCd}]],'','','pc_detail');" class="itemLink" >
+							<button type="button" class="itemLike" th:classappend="${result.product.itemId == 'Y'}? 'likeit active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${result.product.itemId}, ithrCd=${params.ithrCd}, contentsLoc='', planDtlSq=''">관심상품 추가</button>
+							<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${result.product.itemId}]], '',[[${params.ithrCd}]],'','','pc_detail');" class="itemLink" >
 								<div class="itemPic">
-									<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm+'?RS=156'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
+									<img alt="" class="vLHTC pd_img" th:src="${result.product.itemImage+'?RS=156'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 								</div>
-								<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
-								<div class="itemName" th:text="${goodsInfo.goodsFullNm}">남성 로고 자카드 방풍 패딩</div>
+								<p class="itemBrand" th:text="${result.product.brandName}">BRAND NAME1</p>
+								<div class="itemName" th:text="${result.product.itemName}">남성 로고 자카드 방풍 패딩</div>
 								<p class="itemPrice">
-									<span class="itemPrice_original" th:if="${goodsInfo.listPrice > goodsInfo.currPrice}"  th:text="${#numbers.formatInteger(goodsInfo.listPrice, 0,'COMMA')}">1,000,000</span>
-									<th:block th:text="${#numbers.formatInteger(goodsInfo.currPrice, 0,'COMMA')}"></th:block>
-									<span class="itemPercent" th:if="${goodsInfo.dcRate > 0}" th:text="|${#numbers.formatDecimal(goodsInfo.dcRate,0,0)}%|">30%</span>
+									<span class="itemPrice_original" th:if="${result.product.originalPrice != result.product.salePrice}" th:text="${#numbers.formatInteger(result.product.originalPrice, 0,'COMMA')}">1,000,000</span>
+									<th:block th:text="${#numbers.formatInteger(result.product.salePrice, 0,'COMMA')}"></th:block>
+									<span class="itemPercent" th:if="${result.product.originalPrice != result.product.salePrice}"  th:text="${(result.product.originalPrice == 0 ? 0 : #numbers.formatDecimal((result.product.originalPrice - result.product.salePrice) / (result.product.originalPrice * 1.0) * 100, 1, 0)) + '%'}">0%</span>
 								</p>
 							</a>
 						</div>
@@ -77,9 +77,37 @@
 			slidesPerView: 3,
 			spaceBetween: 8,
 		});	 
-		
 	});
 	
+	window.onload = function(){
+		
+		// 위시처리- 로그인 되어 있을시
+//		if (cfCheckLogin()) {
+//			//이상품과 함께본 상품
+//			let targetT = $('#goodsTogetherbArea').find('.item_state').find('.itemLike');
+//			let targetTSize = targetT.length;
+//			
+//			targetT.each(function(){
+//				let goodsCd = $(this).attr('goodscd');
+//				let url = "/mypage/wish/list/check/"+goodsCd;
+//				var result = '';
+//				$.ajax({
+//					type: 'get'
+//					, async: false
+//					, url: url
+//					, success: function (data) {
+//						//likeit active
+//						if ("Y" == data){
+//							$(this).addClass('likeit').addClass('active');
+//						}
+//					}
+//				});
+//			});
+//			
+//		}
+	};
+	
+	
 /*]]>*/
 </script>	
 

+ 12 - 10
src/main/webapp/WEB-INF/views/web/goods/GoodsDealDetailFormWeb.html

@@ -365,20 +365,22 @@
 				<div class="area_slider">
 					<div class="swiper-container">
 						<div class="swiper-wrapper">
-							<div class="swiper-slide" th:each="goodsInfo, status : ${togetherGoodsList}">
+							<div class="swiper-slide" th:each="result, status : ${togetherGoodsList}">
 								<div class="item_prod">
 									<div class="item_state">
-										<button type="button" class="itemLike" th:classappend="${goodsInfo.wishYn == 'Y'}? 'active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsInfo.goodsCd}, ithrCd='IN15_03', contentsLoc='', planDtlSq=''">관심상품 추가</button>
-										<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${goodsInfo.goodsCd}]], '','IN15_03','','','pc_detail');" class="itemLink" >
+										<button type="button" class="itemLike" th:classappend="${result.product.itemId == 'Y'}? 'active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${result.product.itemId}, ithrCd='IN15_03', contentsLoc='', planDtlSq=''">관심상품 추가</button>
+										<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${result.product.itemId}]], '','IN15_03','','','pc_detail');" class="itemLink" >
 											<div class="itemPic">
-												<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm +'?RS=300'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
+												<img alt="" class="vLHTC pd_img" th:src="${result.product.itemImage +'?RS=300'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 											</div>
-											<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
-											<div class="itemName" th:text="${goodsInfo.goodsFullNm}">남성 로고 자카드 방풍 패딩</div>
+											<p class="itemBrand" th:text="${result.product.brandName}">BRAND NAME1</p>
+											<div class="itemName" th:text="${result.product.itemName}">남성 로고 자카드 방풍 패딩</div>
 											<p class="itemPrice">
-												<th:block th:text="${#numbers.formatInteger(goodsInfo.currPrice, 0,'COMMA')}"></th:block>
-												<span class="itemPrice_original" th:if="${goodsInfo.listPrice > goodsInfo.currPrice}"  th:text="${#numbers.formatInteger(goodsInfo.listPrice, 0,'COMMA')}">1,000,000</span>
-												<span class="itemPercent" th:if="${goodsInfo.dcRate > 0}" th:text="|${#numbers.formatDecimal(goodsInfo.dcRate,0,0)}%|">30%</span>
+												<th:block th:text="${#numbers.formatInteger(result.product.salePrice, 0,'COMMA')}"></th:block>
+												<th:block th:if="${result.product.originalPrice != result.product.salePrice}">
+												<span class="itemPrice_original" th:if="${result.product.originalPrice > result.product.salePrice}"  th:text="${#numbers.formatInteger(result.product.originalPrice, 0,'COMMA')}">1,000,000</span>
+												<span class="itemPercent" th:if="${result.product.salePrice != result.product.originalPrice}" th:text="${(result.product.originalPrice == 0 ? 0 : #numbers.formatDecimal((result.product.originalPrice - result.product.salePrice) / (result.product.originalPrice * 1.0) * 100, 1, 0)) + '%'}">0%</span>
+												</th:block>
 											</p>
 										</a>
 									</div>
@@ -1505,7 +1507,7 @@ function buy_nc_req(cartSqArr) {
 	}
 	// 광고 스크립트용
 	
-	var snsGoodsImg = _uploadGoodsUrl + [[${goodsInfo.sysImgNm}]];
+	var snsGoodsImg = _uploadGoodsUrl + "/"+  [[${goodsInfo.sysImgNm}]];
 	var snsUrl = location.protocol + _PAGE_GOODS_DETAIL + params.goodsCd;
 	if (typeof (params.colorCd) != 'undefined') snsUrl += "&colorCd=" + params.colorCd;
 	var snsGoodsFullNm = [[${goodsInfo.goodsFullNm}]];

+ 34 - 28
src/main/webapp/WEB-INF/views/web/goods/GoodsDetailFormWeb.html

@@ -1159,20 +1159,22 @@
 				<div class="area_slider">
 					<div class="swiper-container">
 						<div class="swiper-wrapper">
-							<div class="swiper-slide" th:each="goodsInfo, status : ${togetherGoodsList}">
+							<div class="swiper-slide" th:each="result, status : ${togetherGoodsList}">
 								<div class="item_prod">
 									<div class="item_state">
-										<button type="button" class="itemLike" th:classappend="${goodsInfo.wishYn == 'Y'}? 'active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsInfo.goodsCd}, ithrCd='IN15_03', contentsLoc='', planDtlSq=''">관심상품 추가</button>
-										<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${goodsInfo.goodsCd}]], '','IN15_03','','','pc_detail');" class="itemLink" >
+										<button type="button" class="itemLike" th:classappend="${result.product.itemId == 'Y'}? 'active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${result.product.itemId}, ithrCd='IN15_03', contentsLoc='', planDtlSq=''">관심상품 추가</button>
+										<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${result.product.itemId}]], '','IN15_03','','','pc_detail');" class="itemLink" >
 											<div class="itemPic">
-												<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm +'?RS=300'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
+												<img alt="" class="vLHTC pd_img" th:src="${result.product.itemImage +'?RS=300'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 											</div>
-											<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
-											<div class="itemName" th:text="${goodsInfo.goodsFullNm}">남성 로고 자카드 방풍 패딩</div>
+											<p class="itemBrand" th:text="${result.product.brandName}">BRAND NAME1</p>
+											<div class="itemName" th:text="${result.product.itemName}">남성 로고 자카드 방풍 패딩</div>
 											<p class="itemPrice">
-												<th:block th:text="${#numbers.formatInteger(goodsInfo.currPrice, 0,'COMMA')}"></th:block>
-												<span class="itemPrice_original" th:if="${goodsInfo.listPrice > goodsInfo.currPrice}"  th:text="${#numbers.formatInteger(goodsInfo.listPrice, 0,'COMMA')}">1,000,000</span>
-												<span class="itemPercent" th:if="${goodsInfo.dcRate > 0}" th:text="|${#numbers.formatDecimal(goodsInfo.dcRate,0,0)}%|">30%</span>
+												<th:block th:text="${#numbers.formatInteger(result.product.salePrice, 0,'COMMA')}"></th:block>
+												<th:block th:if="${result.product.originalPrice != result.product.salePrice}">
+												<span class="itemPrice_original" th:if="${result.product.originalPrice > result.product.salePrice}"  th:text="${#numbers.formatInteger(result.product.originalPrice, 0,'COMMA')}">1,000,000</span>
+												<span class="itemPercent" th:if="${result.product.salePrice != result.product.originalPrice}" th:text="${(result.product.originalPrice == 0 ? 0 : #numbers.formatDecimal((result.product.originalPrice - result.product.salePrice) / (result.product.originalPrice * 1.0) * 100, 1, 0)) + '%'}">0%</span>
+												</th:block>
 											</p>
 										</a>
 									</div>
@@ -1284,20 +1286,22 @@
 				<div class="area_slider">
 					<div class="swiper-container">
 						<div class="swiper-wrapper">
-							<div class="swiper-slide" th:each="goodsInfo, status : ${recommendGoodsList}">
+							<div class="swiper-slide" th:each="result, status : ${recommendGoodsList}">
 								<div class="item_prod">
 									<div class="item_state">
-										<button type="button" class="itemLike" th:classappend="${goodsInfo.wishYn == 'Y'}? 'active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsInfo.goodsCd}, ithrCd='IN15_04', contentsLoc='', planDtlSq=''">관심상품 추가</button>
-										<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${goodsInfo.goodsCd}]], '','IN15_04','','','pc_detail');" class="itemLink" >
+										<button type="button" class="itemLike" th:classappend="${result.product.itemId == 'Y'}? 'active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${result.product.itemId}, ithrCd='IN15_03', contentsLoc='', planDtlSq=''">관심상품 추가</button>
+										<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${result.product.itemId}]], '','IN15_03','','','pc_detail');" class="itemLink" >
 											<div class="itemPic">
-												<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm +'?RS=300'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
+												<img alt="" class="vLHTC pd_img" th:src="${result.product.itemImage +'?RS=300'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 											</div>
-											<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
-											<div class="itemName" th:text="${goodsInfo.goodsFullNm}">남성 로고 자카드 방풍 패딩</div>
+											<p class="itemBrand" th:text="${result.product.brandName}">BRAND NAME1</p>
+											<div class="itemName" th:text="${result.product.itemName}">남성 로고 자카드 방풍 패딩</div>
 											<p class="itemPrice">
-												<th:block th:text="${#numbers.formatInteger(goodsInfo.currPrice, 0,'COMMA')}"></th:block>
-												<span class="itemPrice_original" th:if="${goodsInfo.listPrice > goodsInfo.currPrice}"  th:text="${#numbers.formatInteger(goodsInfo.listPrice, 0,'COMMA')}">1,000,000</span>
-												<span class="itemPercent" th:if="${goodsInfo.dcRate > 0}" th:text="|${#numbers.formatDecimal(goodsInfo.dcRate,0,0)}%|">30%</span>
+												<th:block th:text="${#numbers.formatInteger(result.product.salePrice, 0,'COMMA')}"></th:block>
+												<th:block th:if="${result.product.originalPrice != result.product.salePrice}">
+												<span class="itemPrice_original" th:if="${result.product.originalPrice > result.product.salePrice}"  th:text="${#numbers.formatInteger(result.product.originalPrice, 0,'COMMA')}">1,000,000</span>
+												<span class="itemPercent" th:if="${result.product.salePrice != result.product.originalPrice}" th:text="${(result.product.originalPrice == 0 ? 0 : #numbers.formatDecimal((result.product.originalPrice - result.product.salePrice) / (result.product.originalPrice * 1.0) * 100, 1, 0)) + '%'}">0%</span>
+												</th:block>
 											</p>
 										</a>
 									</div>
@@ -1326,20 +1330,22 @@
 				<div class="area_slider">
 					<div class="swiper-container">
 						<div class="swiper-wrapper">
-							<div class="swiper-slide" th:each="goodsInfo, status : ${likeGoodsList}">
+							<div class="swiper-slide" th:each="result, status : ${likeGoodsList}">
 								<div class="item_prod">
 									<div class="item_state">
-										<button type="button" class="itemLike" th:classappend="${goodsInfo.wishYn == 'Y'}? 'active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsInfo.goodsCd}, ithrCd='IN15_05', contentsLoc='', planDtlSq=''">관심상품 추가</button>
-										<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${goodsInfo.goodsCd}]], '','IN15_05','','','pc_detail');" class="itemLink" >
+										<button type="button" class="itemLike" th:classappend="${result.product.itemId == 'Y'}? 'active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${result.product.itemId}, ithrCd='IN15_03', contentsLoc='', planDtlSq=''">관심상품 추가</button>
+										<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${result.product.itemId}]], '','IN15_03','','','pc_detail');" class="itemLink" >
 											<div class="itemPic">
-												<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm +'?RS=300'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
+												<img alt="" class="vLHTC pd_img" th:src="${result.product.itemImage +'?RS=300'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 											</div>
-											<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
-											<div class="itemName" th:text="${goodsInfo.goodsFullNm}">남성 로고 자카드 방풍 패딩</div>
+											<p class="itemBrand" th:text="${result.product.brandName}">BRAND NAME1</p>
+											<div class="itemName" th:text="${result.product.itemName}">남성 로고 자카드 방풍 패딩</div>
 											<p class="itemPrice">
-												<th:block th:text="${#numbers.formatInteger(goodsInfo.currPrice, 0,'COMMA')}"></th:block>
-												<span class="itemPrice_original" th:if="${goodsInfo.listPrice > goodsInfo.currPrice}"  th:text="${#numbers.formatInteger(goodsInfo.listPrice, 0,'COMMA')}">1,000,000</span>
-												<span class="itemPercent" th:if="${goodsInfo.dcRate > 0}" th:text="|${#numbers.formatDecimal(goodsInfo.dcRate,0,0)}%|">30%</span>
+												<th:block th:text="${#numbers.formatInteger(result.product.salePrice, 0,'COMMA')}"></th:block>
+												<th:block th:if="${result.product.originalPrice != result.product.salePrice}">
+												<span class="itemPrice_original" th:if="${result.product.originalPrice > result.product.salePrice}"  th:text="${#numbers.formatInteger(result.product.originalPrice, 0,'COMMA')}">1,000,000</span>
+												<span class="itemPercent" th:if="${result.product.salePrice != result.product.originalPrice}" th:text="${(result.product.originalPrice == 0 ? 0 : #numbers.formatDecimal((result.product.originalPrice - result.product.salePrice) / (result.product.originalPrice * 1.0) * 100, 1, 0)) + '%'}">0%</span>
+												</th:block>
 											</p>
 										</a>
 									</div>
@@ -2759,7 +2765,7 @@
 	// 광고 스크립트용
 	
      
-	var snsGoodsImg = _uploadGoodsUrl + [[${goodsInfo.sysImgNm}]];
+	var snsGoodsImg = _uploadGoodsUrl + "/" + [[${goodsInfo.sysImgNm}]];
 	var snsUrl = location.protocol + _PAGE_GOODS_DETAIL + params.goodsCd;
 	if (typeof (params.colorCd) != 'undefined') snsUrl += "&colorCd=" + params.colorCd;
 	var snsGoodsFullNm = [[${goodsInfo.goodsFullNm}]];

+ 11 - 11
src/main/webapp/WEB-INF/views/web/goods/GoodsOtherFormWeb.html

@@ -17,7 +17,6 @@
  <th:block th:if="${goodsList != null and !goodsList.empty}">
 <div class="cont_head">
 	<h3 class="subH1 t_c mb40">
-		<th:block th:if="${params.goodsOtherGb =='tmtb'}" th:text="${'함께하면 할인되는 다다익선 상품'}"></th:block>
 		<th:block th:if="${params.goodsOtherGb =='together'}" th:text="${'이 상품과 함께 본 상품'}"></th:block>
 		<th:block th:if="${params.goodsOtherGb =='recommend'}" th:text="${params.brandGroupNm +' 추천상품'}"></th:block>
 		<th:block th:if="${params.goodsOtherGb =='like'}" th:text="${'이 상품과 비슷한 상품'}"></th:block>
@@ -28,21 +27,22 @@
 	<div class="area_slider">
 		<div class="swiper-container">
 			<div class="swiper-wrapper">
-				<div class="swiper-slide" th:each="goodsInfo, status : ${goodsList}">
+				<div class="swiper-slide" th:each="result, status : ${goodsList}">
 					<div class="item_prod">
 						<div class="item_state">
-							<button type="button" class="itemLike" th:classappend="${goodsInfo.wishYn == 'Y'}? 'active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${goodsInfo.goodsCd}, ithrCd=${params.ithrCd}, contentsLoc=${params.contentsLoc}, planDtlSq=''">관심상품 추가</button>
-							<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${goodsInfo.goodsCd}]], '',[[${params.ithrCd}]],[[${params.contentsLoc}]],'','pc_detail');" class="itemLink" >
+							<button type="button" class="itemLike" th:classappend="${result.product.itemId == 'Y'}? 'active' : ''"  onclick="cfnPutWishList(this);" th:attr="goodsCd=${result.product.itemId}, ithrCd='IN15_03', contentsLoc='', planDtlSq=''">관심상품 추가</button>
+							<a href="javascript:void(0);" th:onclick="cfnGoToGoodsDetail([[${result.product.itemId}]], '','IN15_03','','','pc_detail');" class="itemLink" >
 								<div class="itemPic">
-									<img alt="" class="vLHTC pd_img" th:src="${imgGoodsUrl+'/'+goodsInfo.sysImgNm +'?RS=300'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
-									
+									<img alt="" class="vLHTC pd_img" th:src="${result.product.itemImage +'?RS=300'}" th:onerror="'this.src=\''+@{${uxImgUrl}+ '/images/pc/thumb/bg_item_none.png'}+'\';'">
 								</div>
-								<p class="itemBrand" th:text="${goodsInfo.brandGroupNm}">BRAND NAME1</p>
-								<div class="itemName" th:text="${goodsInfo.goodsFullNm}">남성 로고 자카드 방풍 패딩</div>
+								<p class="itemBrand" th:text="${result.product.brandName}">BRAND NAME1</p>
+								<div class="itemName" th:text="${result.product.itemName}">남성 로고 자카드 방풍 패딩</div>
 								<p class="itemPrice">
-									<th:block th:text="${#numbers.formatInteger(goodsInfo.currPrice, 0,'COMMA')}"></th:block>
-									<span class="itemPrice_original" th:if="${goodsInfo.listPrice > goodsInfo.currPrice}"  th:text="${#numbers.formatInteger(goodsInfo.listPrice, 0,'COMMA')}">1,000,000</span>
-									<span class="itemPercent" th:if="${goodsInfo.dcRate > 0}" th:text="|${#numbers.formatDecimal(goodsInfo.dcRate,0,0)}%|">30%</span>
+									<th:block th:text="${#numbers.formatInteger(result.product.salePrice, 0,'COMMA')}"></th:block>
+									<th:block th:if="${result.product.originalPrice != result.product.salePrice}">
+									<span class="itemPrice_original" th:text="${#numbers.formatInteger(result.product.originalPrice, 0,'COMMA')}">1,000,000</span>
+									<span class="itemPercent" th:text="${(result.product.originalPrice == 0 ? 0 : #numbers.formatDecimal((result.product.originalPrice - result.product.salePrice) / (result.product.originalPrice * 1.0) * 100, 1, 0)) + '%'}">0%</span>
+									</th:block>
 								</p>
 							</a>
 						</div>