Selaa lähdekoodia

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.front into develop

jsshin 4 vuotta sitten
vanhempi
commit
dac6a68f44

+ 24 - 10
src/main/java/com/style24/front/biz/thirdparty/EigeneaiApi.java

@@ -16,6 +16,7 @@ import org.springframework.web.client.RestTemplate;
 
 import com.google.gson.Gson;
 import com.style24.persistence.domain.eigene.Eigeneai;
+import com.style24.persistence.domain.eigene.Eigeneai.Result;
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -29,7 +30,8 @@ import lombok.extern.slf4j.Slf4j;
 @Slf4j
 public class EigeneaiApi {
 
-	private String apiUrl = "http://api.eigene.io/rec";
+	private String apiUrl = "https://api.eigene.io/rec";
+	private String rtsApiUrl = "https://rts-api.eigene.io/api";
 	private String cuid = "1252aed4-78dc-46e8-b784-94ac42e86dd4";
 
 	@Autowired
@@ -46,12 +48,13 @@ public class EigeneaiApi {
 	/**
 	 * 주간베스트추천상품 목록
 	 * @param size - 결과에 포함할 상품수
+	 * @param cate1No - 카테고리1번호
 	 * @return
 	 * @author gagamel
 	 * @since 2021. 5. 14
 	 */
-	public Eigeneai getWeeklyBestGoodsList(int size) {
-		String requestUrl = apiUrl + "/m008?cuid=" + cuid + "&size=" + size;
+	public Eigeneai getWeeklyBestGoodsList(int size, Integer cate1No) {
+		String requestUrl = apiUrl + "/m060?cuid=" + cuid + "&size=" + size + "&incids=" + cate1No;
 		return this.getRecommendationGoodsList(requestUrl);
 	}
 
@@ -75,10 +78,15 @@ public class EigeneaiApi {
 	 * @author gagamel
 	 * @since 2021. 5. 14
 	 */
-	public Eigeneai getMonthlyClickBestGoodsList(int size) {
-		// TODO: 아이겐 미개발
-		String requestUrl = apiUrl + "/m008?cuid=" + cuid + "&cids=" + "" + "&size=" + size;
-		return this.getRecommendationGoodsList(requestUrl);
+	public Collection<Result> getMonthlyClickBestGoodsList(int size, Integer brandGroupNo) {
+		String requestUrl = apiUrl + "/m062?cuid=" + cuid + "&cids=" + "" + "&size=" + size + "&bids=" + brandGroupNo;
+
+		Eigeneai eigeneai = this.getRecommendationGoodsList(requestUrl);
+		if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
+			return eigeneai.getResults();
+		}
+
+		return new ArrayList<Result>();
 	}
 
 	/**
@@ -159,9 +167,15 @@ public class EigeneaiApi {
 	 * @author gagamel
 	 * @since 2021. 5. 14
 	 */
-	public Eigeneai getRealtimeGoodsList(int size) {
-		String requestUrl = apiUrl + "/stream?cuid=" + cuid + "&size=" + size; //iids
-		return this.getRecommendationGoodsList(requestUrl);
+	public Collection<Result> getRealtimeGoodsList(int size) {
+		String requestUrl = rtsApiUrl + "/stream?cuid=" + cuid + "&size=" + size + "&type=view";
+
+		Eigeneai eigeneai = this.getRecommendationGoodsList(requestUrl);
+		if (eigeneai.getResults() != null && !eigeneai.getResults().isEmpty()) {
+			return eigeneai.getResults();
+		}
+
+		return new ArrayList<Result>();
 	}
 
 	/**

+ 51 - 34
src/main/java/com/style24/front/biz/web/TsfDisplayController.java

@@ -9,8 +9,6 @@ import java.util.HashMap;
 
 import javax.servlet.http.HttpServletResponse;
 
-import com.style24.persistence.domain.searchengine.PlanningResponse;
-import com.style24.persistence.domain.searchengine.AutoCompleteResponse;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.mobile.device.Device;
@@ -32,6 +30,7 @@ import com.style24.front.biz.service.TsfDisplayService;
 import com.style24.front.biz.service.TsfGoodsService;
 import com.style24.front.biz.service.TsfPlanningService;
 import com.style24.front.biz.service.TsfSocialService;
+import com.style24.front.biz.thirdparty.EigeneaiApi;
 import com.style24.front.biz.thirdparty.SearchEngineDiquest;
 import com.style24.front.support.controller.TsfBaseController;
 import com.style24.front.support.env.TsfConstants;
@@ -49,8 +48,11 @@ import com.style24.persistence.domain.MainLayout;
 import com.style24.persistence.domain.Plan;
 import com.style24.persistence.domain.Popup;
 import com.style24.persistence.domain.Social;
+import com.style24.persistence.domain.eigene.Eigeneai.Result;
+import com.style24.persistence.domain.searchengine.AutoCompleteResponse;
 import com.style24.persistence.domain.searchengine.Filter;
 import com.style24.persistence.domain.searchengine.GoodsListResponse;
+import com.style24.persistence.domain.searchengine.PlanningResponse;
 import com.style24.persistence.domain.searchengine.SearchEngine;
 
 import lombok.extern.slf4j.Slf4j;
@@ -96,6 +98,9 @@ public class TsfDisplayController extends TsfBaseController {
 	@Autowired
 	private TsfCommonService commonService;
 
+	@Autowired
+	private EigeneaiApi eigeneaiApi;
+
 	/**
 	 * PC보기. 모바일에서 <PC> 형태로 볼 때
 	 * @return
@@ -162,7 +167,7 @@ public class TsfDisplayController extends TsfBaseController {
 			if (contentsLoc.equals("SGNB001") || contentsLoc.equals("SGNB002") || contentsLoc.equals("STAB001") || contentsLoc.equals("SMM003") || contentsLoc.equals("SMM004") || contentsLoc.equals("SMM006")) {
 				contents.setMaxRow(1);
 			}
-			if(contentsLoc.equals("SMM011")){
+			if (contentsLoc.equals("SMM011")) {
 				contents.setMaxRow(5);
 			}
 
@@ -207,13 +212,13 @@ public class TsfDisplayController extends TsfBaseController {
 			}
 
 			if (contentsLoc.equals("SMM009") || contentsLoc.equals("SMM012")) {
-				if(contentsLoc.equals("SMM009")){
+				if (contentsLoc.equals("SMM009")) {
 					contents.setMaxRow(5);
 				}
 				mainLayout.setMdPickList(displayService.getContentsForGoods(contents));
 			}
 
-			if (contentsLoc.equals("SMM003")||contentsLoc.equals("SBM007")){
+			if (contentsLoc.equals("SMM003") || contentsLoc.equals("SBM007")) {
 				mainLayout.setNewItemList(displayService.getContentsForGoods(contents));
 			}
 
@@ -345,20 +350,20 @@ public class TsfDisplayController extends TsfBaseController {
 			brandMain.setCate4Srch(cate4Srch);
 
 			if ("C".equals(brandMain.getContentsYn())) {
-				if(contentsLoc.equals("SBM017") || contentsLoc.equals("SBM018")||contentsLoc.equals("SBM019")){
+				if (contentsLoc.equals("SBM017") || contentsLoc.equals("SBM018") || contentsLoc.equals("SBM019")) {
 					cate4Srch.setBrandGroupNo(brandMain.getBrandGroupNo());
 					cate4Srch.setMaxRow(20);
 					Collection<Goods> goodsList = goodsService.getContentsCategoryGoodsList(cate4Srch);
 					brandMain.setGoodsList(goodsList);
 				}
 				brandMain.setContentsList(displayService.getContentsList(contents));
-			} else if("E".equals(brandMain.getContentsYn())){
+			} else if ("E".equals(brandMain.getContentsYn())) {
 				Cate4Srch cate4Srch2 = new Cate4Srch();
 				cate4Srch2.setBrandGroupNo(brandMain.getBrandGroupNo());
 				cate4Srch2.setContentsLoc(contentsLoc);
 				if (contentsLoc.equals("SBM013") || contentsLoc.equals("SBMM013")) {
 					cate4Srch2.setMaxRow(50);
-				}else{
+				} else {
 					cate4Srch2.setMaxRow(20);
 				}
 				Collection<Goods> goodsList = goodsService.getContentsCategoryGoodsList(cate4Srch2);
@@ -648,20 +653,20 @@ public class TsfDisplayController extends TsfBaseController {
 		// 검색엔진 연동 여부
 //		String syncYn = commonService.getSearchEngineSyncYn();
 //		if (syncYn.equals("Y")) { // 검색엔진을 통한 상품리스트 조회
-			mav.setViewName(super.getDeviceViewName("display/CategoryGoodsListForm"));
-			// 카테고리 목록
-			mav.addObject("allCateList", displayService.getAllCategoryList("G032_101"));
-			// 상품검색키워드 카테고리 목록
-			SearchEngine cate1 = new SearchEngine();
-			cate1.setBrandGroupNo(params.getBrandGroupNo() == null ? 0 : params.getBrandGroupNo());
-			cate1.setFrontGb(TsfSession.getFrontGb());
-			cate1.setSiteCd(TscConstants.Site.STYLE24.value());
-			cate1.setCateGb("G032_101");
-			cate1.setCate1No(params.getCate1No());
-			mav.addObject("cateList", diquest.getCategoryList(cate1));
-
-			// 상품리스트 카테고리별 필터 목록
-			filterList = diquest.getFilterList(params);
+		mav.setViewName(super.getDeviceViewName("display/CategoryGoodsListForm"));
+		// 카테고리 목록
+		mav.addObject("allCateList", displayService.getAllCategoryList("G032_101"));
+		// 상품검색키워드 카테고리 목록
+		SearchEngine cate1 = new SearchEngine();
+		cate1.setBrandGroupNo(params.getBrandGroupNo() == null ? 0 : params.getBrandGroupNo());
+		cate1.setFrontGb(TsfSession.getFrontGb());
+		cate1.setSiteCd(TscConstants.Site.STYLE24.value());
+		cate1.setCateGb("G032_101");
+		cate1.setCate1No(params.getCate1No());
+		mav.addObject("cateList", diquest.getCategoryList(cate1));
+
+		// 상품리스트 카테고리별 필터 목록
+		filterList = diquest.getFilterList(params);
 //		}else{
 //			// 카테고리 목록
 //			mav.addObject("cateList", displayService.getAllCategoryList(params.getCateGb()));
@@ -677,13 +682,13 @@ public class TsfDisplayController extends TsfBaseController {
 		mav.addObject("filterSeasonList", displayService.getCategoryFilterList(filterList, "SEASON"));
 		mav.addObject("filterColorList", displayService.getCategoryFilterList(filterList, "COLOR"));
 		mav.addObject("filterBenefitList", displayService.getCategoryFilterList(filterList, "BENEFIT"));
-		if(params.getFormalGb()!=null){
+		if (params.getFormalGb() != null) {
 			params.setFormalGb(params.getFormalGb().toUpperCase());
 		}
 		mav.addObject("params", params);
 
-		log.info("categoryGoodsListForm params:::::{}",params);
-		log.info("filterPriceList:::{}",displayService.getCategoryFilterList(filterList, "PRICE"));
+		log.info("categoryGoodsListForm params:::::{}", params);
+		log.info("filterPriceList:::{}", displayService.getCategoryFilterList(filterList, "PRICE"));
 
 		return mav;
 	}
@@ -722,8 +727,8 @@ public class TsfDisplayController extends TsfBaseController {
 		result.set("paging", pageable);
 		result.set("dataList", dataList);
 
-		log.info("pageable>>>>{}",pageable);
-		log.info("dataList>>>>{}",dataList);
+		log.info("pageable>>>>{}", pageable);
+		log.info("dataList>>>>{}", dataList);
 
 		return result;
 	}
@@ -981,7 +986,7 @@ public class TsfDisplayController extends TsfBaseController {
 		mav.addObject("filterBenefitList", displayService.getCategoryFilterList(filterList, "BENEFIT"));
 		mav.addObject("params", params);
 
-		log.info("filterPriceList:::{}",displayService.getCategoryFilterList(filterList, "PRICE"));
+		log.info("filterPriceList:::{}", displayService.getCategoryFilterList(filterList, "PRICE"));
 
 		return mav;
 	}
@@ -1008,13 +1013,13 @@ public class TsfDisplayController extends TsfBaseController {
 		params.setCustGb(TsfSession.getCustGb());
 
 		Collection<SearchEngine> dataList = new ArrayList<SearchEngine>();
-		log.info("getSearchGoodsList params::{}",params);
+		log.info("getSearchGoodsList params::{}", params);
 		// 검색엔진 연동 여부
 //		String syncYn = commonService.getSearchEngineSyncYn();
 //		if (syncYn.equals("Y")) { // 검색엔진을 통한 상품리스트 조회
-			GoodsListResponse response = diquest.getGoodsList(params);
-			pageable.setTotalCount(response.getTotalCount());
-			dataList = response.getResponse();
+		GoodsListResponse response = diquest.getGoodsList(params);
+		pageable.setTotalCount(response.getTotalCount());
+		dataList = response.getResponse();
 //		} else { // DB를 통한 상품리스트 조회
 //			pageable.setTotalCount(goodsService.getSearchGoodsCount(params));
 //			params.setPageable(pageable);
@@ -1049,7 +1054,7 @@ public class TsfDisplayController extends TsfBaseController {
 
 		Collection<SearchEngine> planList = new ArrayList<SearchEngine>();
 
-		PlanningResponse responsePlan = diquest.getPlanningList(params.getKeyword(),params.getPageNo(),params.getPageSize());
+		PlanningResponse responsePlan = diquest.getPlanningList(params.getKeyword(), params.getPageNo(), params.getPageSize());
 		pageable.setTotalCount(responsePlan.getTotalSize());
 		planList = responsePlan.getResponse();
 
@@ -1081,7 +1086,7 @@ public class TsfDisplayController extends TsfBaseController {
 
 		Collection<SearchEngine> eventList = new ArrayList<SearchEngine>();
 
-		PlanningResponse responsePlan = diquest.getEventList(params.getKeyword(),params.getPageNo(),params.getPageSize());
+		PlanningResponse responsePlan = diquest.getEventList(params.getKeyword(), params.getPageNo(), params.getPageSize());
 		pageable.setTotalCount(responsePlan.getTotalSize());
 		eventList = responsePlan.getResponse();
 
@@ -1175,4 +1180,16 @@ public class TsfDisplayController extends TsfBaseController {
 		return result;
 	}
 
+	/**
+	 * 주간베스트추천상품 목록
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 6. 29
+	 */
+	@GetMapping("/weekly/best/list")
+	@ResponseBody
+	public Collection<Result> getWeeklyBestGoodsList() {
+		return eigeneaiApi.getWeeklyBestGoodsList(30, 1100).getResults();
+	}
+
 }

+ 4 - 4
src/main/webapp/WEB-INF/views/mob/planning/PlanningDetailFormMob.html

@@ -775,15 +775,15 @@ if(template.length>0){
 			html += '							<div class="best_review">\n';
 			if(item.reviewSysImg!= null){
 				if (item.bestYn == 'Y') {
-					html += '								<a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'Y\', \'Y\',\''+item.reviewSq+'\',0);">\n';
+					html += '								<a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'Y\', \'Y\',\''+item.reviewSq+'\',1);">\n';
 				}else{
-					html += '								<a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'N\', \'Y\',\''+item.reviewSq+'\',0);">\n';
+					html += '								<a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'N\', \'Y\',\''+item.reviewSq+'\',1);">\n';
 				}
 			}else{
 				if (item.bestYn == 'Y') {
-					html += '								<a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'Y\', \'N\',\''+item.reviewSq+'\',0);">\n';
+					html += '								<a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'Y\', \'N\',\''+item.reviewSq+'\',1);">\n';
 				}else{
-					html += '								<a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'N\', \'N\',\''+item.reviewSq+'\',0);">\n';
+					html += '								<a href="javascript:void();" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'N\', \'N\',\''+item.reviewSq+'\',1);">\n';
 				}
 			}
 			html += '									<div class="lap">\n';

+ 20 - 12
src/main/webapp/WEB-INF/views/mob/planning/PlanningEventPollFormMob.html

@@ -46,7 +46,7 @@
 													</th:block>
 													<th:block th:unless="${pollData.pollQval1 != '기타'}">
 														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-1-'+${pollData.pollQsq}" th:value="${pollData.pollQval1}" class="etc"><label th:for="'rdi-1-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval1}"></span></label>
-														<textarea th:name="'etc_input_'+${pollData.pollQsq}" id="" class="etc_input" ></textarea>
+														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
 													</th:block>
 												</li>
 												<li th:if="${pollData.pollQval2 != null && pollData.pollQval2 != ''}">
@@ -55,7 +55,7 @@
 													</th:block>
 													<th:block th:unless="${pollData.pollQval2 != '기타'}">
 														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-2-'+${pollData.pollQsq}" th:value="${pollData.pollQval2}" class="etc"><label th:for="'rdi-2-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval2}"></span></label>
-														<textarea th:name="'etc_input_'+${pollData.pollQsq}" id="" class="etc_input" ></textarea>
+														<textarea th:name="'etc_input_'+${pollData.pollQsq}"onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
 													</th:block>
 												</li>
 												<li th:if="${pollData.pollQval3 != null && pollData.pollQval3 != ''}">
@@ -64,7 +64,7 @@
 													</th:block>
 													<th:block th:unless="${pollData.pollQval3 != '기타'}">
 														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-3-'+${pollData.pollQsq}" th:value="${pollData.pollQval3}" class="etc"><label th:for="'rdi-3-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval3}"></span></label>
-														<textarea th:name="'etc_input_'+${pollData.pollQsq}" id="" class="etc_input" ></textarea>
+														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
 													</th:block>
 												</li>
 												<li th:if="${pollData.pollQval4 != null && pollData.pollQval4 != ''}">
@@ -73,7 +73,7 @@
 													</th:block>
 													<th:block th:unless="${pollData.pollQval4 != '기타'}">
 														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-4-'+${pollData.pollQsq}" th:value="${pollData.pollQval4}" class="etc"><label th:for="'rdi-4-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval4}"></span></label>
-														<textarea th:name="'etc_input_'+${pollData.pollQsq}" id="" class="etc_input" > </textarea>
+														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" > </textarea>
 													</th:block>
 												</li>
 												<li th:if="${pollData.pollQval5 != null && pollData.pollQval5 != ''}">
@@ -82,7 +82,7 @@
 													</th:block>
 													<th:block th:unless="${pollData.pollQval5 != '기타'}">
 														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-5-'+${pollData.pollQsq}" th:value="${pollData.pollQval5}" class="etc"><label th:for="'rdi-5-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval5}"></span></label>
-														<textarea th:name="'etc_input_'+${pollData.pollQsq}" id="" class="etc_input" ></textarea>
+														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
 													</th:block>
 												</li>
 												<li th:if="${pollData.pollQval6 != null && pollData.pollQval6 != ''}">
@@ -91,7 +91,7 @@
 													</th:block>
 													<th:block th:unless="${pollData.pollQval6 != '기타'}">
 														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-6-'+${pollData.pollQsq}" th:value="${pollData.pollQval6}" class="etc"><label th:for="'rdi-6-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval6}"></span></label>
-														<textarea th:name="'etc_input_'+${pollData.pollQsq}" id="" class="etc_input" ></textarea>
+														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
 													</th:block>
 												</li>
 												<li th:if="${pollData.pollQval7 != null && pollData.pollQval7 != ''}">
@@ -100,7 +100,7 @@
 													</th:block>
 													<th:block th:unless="${pollData.pollQval7 != '기타'}">
 														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-7-'+${pollData.pollQsq}" th:value="${pollData.pollQval7}" class="etc"><label th:for="'rdi-7-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval7}"></span></label>
-														<textarea th:name="'etc_input_'+${pollData.pollQsq}" id="" class="etc_input" ></textarea>
+														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
 													</th:block>
 												</li>
 												<li th:if="${pollData.pollQval8 != null && pollData.pollQval8 != ''}">
@@ -109,7 +109,7 @@
 													</th:block>
 													<th:block th:unless="${pollData.pollQval8 != '기타'}">
 														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-8-'+${pollData.pollQsq}" th:value="${pollData.pollQval8}" class="etc"><label th:for="'rdi-8-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval8}"></span></label>
-														<textarea th:name="'etc_input_'+${pollData.pollQsq}" id="" class="etc_input" ></textarea>
+														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
 													</th:block>
 												</li>
 												<li th:if="${pollData.pollQval9 != null && pollData.pollQval9 != ''}">
@@ -118,7 +118,7 @@
 													</th:block>
 													<th:block th:unless="${pollData.pollQval9 != '기타'}">
 														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-9-'+${pollData.pollQsq}" th:value="${pollData.pollQval9}"class="etc"><label th:for="'rdi-9-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval9}"></span></label>
-														<textarea th:name="'etc_input_'+${pollData.pollQsq}" id="" class="etc_input" ></textarea>
+														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
 													</th:block>
 												</li>
 												<li th:if="${pollData.pollQval10 != null && pollData.pollQval10 != ''}">
@@ -127,7 +127,7 @@
 													</th:block>
 													<th:block th:unless="${pollData.pollQval10 != '기타'}">
 														<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-10-'+${pollData.pollQsq}" th:value="${pollData.pollQval10}" class="etc"><label th:for="'rdi-10-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval10}"></span></label>
-														<textarea th:name="'etc_input_'+${pollData.pollQsq}" id="" class="etc_input" ></textarea>
+														<textarea th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" id="" class="etc_input" ></textarea>
 													</th:block>
 												</li>
 											</ul>
@@ -177,14 +177,14 @@
 								<div class="survey_row q3" th:if="${pollData.pollQtype == '40'}">
 									<h4><span class="question" th:text="'Q'+${pollStat.index+1}+'.'"></span>[[${pollData.pollQtitle}]]</h4>
 									<div class="answer">
-										<textarea class="doc_ans" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}" placeholder="1,000자 이내로 입력해 주세요." style="resize: none;"></textarea>
+										<textarea class="doc_ans" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" onkeyup="chkChar(this)" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}" placeholder="1,000자 이내로 입력해 주세요." style="resize: none;"></textarea>
 										<p class="txt_cnt"><span id="ans_cnt" class="c_primary">0</span>/1,000</p>
 									</div>
 								</div>
 								<div class="survey_row q4" th:if="${pollData.pollQtype == '30'}">
 								<h4><span class="question" th:text="'Q'+${pollStat.index+1}+'.'"></span>[[${pollData.pollQtitle}]]</h4>
 									<div class="answer">
-										<textarea class="q4_ans" name="" id="" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}"></textarea>
+										<textarea class="q4_ans" name=""  onkeyup="chkChar(this)" id="" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}"></textarea>
 									</div>
 							
 								</div>
@@ -334,6 +334,14 @@ var fnSubmitPoll = function () {
 	})
 }
 
+	function chkChar(obj){
+	    var RegExp = /[\{\}\[\]\/?.,;:|\)*~`!^\-_+┼<>@\#$%&\'\"\\\(\=]/gi;	//정규식 구문
+	    if (RegExp.test(obj.value)) {
+	      // 특수문자 모두 제거    
+	      obj.value = obj.value.replace(RegExp , '');
+	    }
+	}
+	
 $(document).ready(function(){
 	//Q3 글자 수 카운트
 	$('.doc_ans').keyup(function (e){

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

@@ -62,29 +62,7 @@
 							</div>
 						</div>
 					</div>
-				<div class="coner_item01" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}">
-                    <!-- 프로모션배너 type1 --> 
-                    <!-- <div class="promotion_visual type1" th:if="${fsrcInfoTop != null and planInfo.planGb == 'P'}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div> -->
-                    <!-- <div class="promotion_visual type2" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div> -->           
-                    <!-- 프로모션배너 type1 -->                    
-                    <!-- 프로모션배너 type2 --> 
-               <!-- <div class="promotion_visual type2">
-                        <div class="swiper-container">
-                            <div class="swiper-wrapper ">
-                                <div class="swiper-slide">
-                                    <img alt="" src="/images/pc/thumb/bigbanner_slide01.png">
-                                </div>
-                                <div class="swiper-slide">
-                                    <img alt="" src="/images/pc/thumb/bigbanner_slide02.png"> 
-                                </div>
-                            </div>
-                        </div>
-                        <div class="swiper-button-prev"></div>
-                        <div class="swiper-button-next"></div>
-                        <div class="swiper-pagination"></div>
-                    </div> -->
-                    <!-- 프로모션배너 type2 -->                    
-                </div>
+				<div class="coner_item01" th:if="${fsrcInfoTop != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoTop.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div>
             </div>
             <!-- //상단 프로모션 배너 -->
             
@@ -96,7 +74,7 @@
 						 <div class="content wide dp_coupon" th:id="${a.tmplType}" style="display: none"></div>  <!-- //할인쿠폰 -->
 					</th:block>
 				<th:block th:if="${a.tmplType == 'G082_30'}">
-						<div class="content dp_mid_banner" th:id="${a.tmplType}" style="display: none"></div> <!-- //이미지-->
+						<div class="cont_body" th:id="${a.tmplType}" style="display: none"></div> <!-- //이미지-->
 					</th:block>
 				<th:block th:if="${a.tmplType == 'G082_50'}">
 						<div class="content dp_special" th:id="${a.tmplType + a.planContSq}" style="display: none"></div>
@@ -416,16 +394,16 @@ if(template.length>0){
 			html += '			<div class="best_review">\n';
 			if(item.reviewSysImg!= null){
 				if (item.bestYn == 'Y') {
-					html += '				<a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'Y\', \'Y\',\''+item.reviewSq+'\',0);">\n';
+					html += '				<a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'Y\', \'Y\',\''+item.reviewSq+'\',1);">\n';
 				}else{
-					html += '				<a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'N\', \'Y\',\''+item.reviewSq+'\',0);">\n';
+					html += '				<a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'N\', \'Y\',\''+item.reviewSq+'\',1);">\n';
 				}
 				
 			}else{
 				if (item.bestYn == 'Y') {
-					html += '				<a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'Y\', \'N\',\''+item.reviewSq+'\',0);">\n';
+					html += '				<a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'Y\', \'N\',\''+item.reviewSq+'\',1);">\n';
 				}else{
-					html += '				<a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'N\', \'N\',\''+item.reviewSq+'\',0);">\n';
+					html += '				<a href="javascript:void();" id="btn_pdBestReview_pop" onclick="cfPlanningReviewDetail(\''+item.goodsCd+'\',\'N\', \'N\',\''+item.reviewSq+'\',1);">\n';
 				}
 				
 			}
@@ -488,8 +466,7 @@ if(image.length>0){
 		$("#G082_30").show();
 		var html = '';
 		
-		html += '<div class="cont_body">\n     ';
-		html += '    <div class="mid_banner">\n';
+		html += '    <div class="promotion_visual type2">\n';
 		html += '        <div class="swiper-container">\n';
 		html += '            <div class="swiper-wrapper">\n';
 		for (var i = 0; i < image.length; i++) {
@@ -508,7 +485,6 @@ if(image.length>0){
 		html += '        <div class="swiper-button-next"></div>\n';
 		html += '        <div class="swiper-pagination"></div>\n';
 		html += '    </div>\n';
-		html += '</div>\n';
 		
 		$("#G082_30").append(html);
 	}
@@ -1147,19 +1123,20 @@ $(document).ready( function() {
     });            
 
     /* SLIDE - 상단 프로모션 배너 */
-	var promotion_visual_slide = new Swiper ('.dp_detail_visual .promotion_visual.type2 .swiper-container', {
+	var promotion_visual_slide = new Swiper ('.promotion_visual.type2 .swiper-container', {
 		loop: true,
 		slidesPerView: 1,
-		speed : 1500,
+              autoHeight:true,
+		speed : 1000,
 		navigation: {
 			nextEl: '.promotion_visual.type2 .swiper-button-next',
 			prevEl: '.promotion_visual.type2 .swiper-button-prev',
 		},
-        pagination: {
+              pagination: {
 			el: '.promotion_visual.type2 .swiper-pagination',
 			clickable: true,
 		},
-	}); 
+	});
 
     /* SLIDE - 중간 배너 */
 	var mid_banner_slide = new Swiper ('.dp_mid_banner .mid_banner .swiper-container', {

+ 21 - 14
src/main/webapp/WEB-INF/views/web/planning/PlanningEventPollFormWeb.html

@@ -68,7 +68,7 @@
 															</th:block>
 															<th:block th:unless="${pollData.pollQval1 != '기타'}">
 																<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-1-'+${pollData.pollQsq}" th:value="${pollData.pollQval1}" class="etc_radio"><label th:for="'rdi-1-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval1}"></span></label>
-																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" class="form_control etc_input" />
+																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" class="form_control etc_input" />
 															</th:block>
 														</li>
 														<li th:if="${pollData.pollQval2 != null && pollData.pollQval2 != ''}">
@@ -77,7 +77,7 @@
 															</th:block>
 															<th:block th:unless="${pollData.pollQval2 != '기타'}">
 																<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-2-'+${pollData.pollQsq}" th:value="${pollData.pollQval2}" class="etc_radio"><label th:for="'rdi-2-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval2}"></span></label>
-																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" class="form_control etc_input" />
+																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" class="form_control etc_input" />
 															</th:block>
 														</li>
 														<li th:if="${pollData.pollQval3 != null && pollData.pollQval3 != ''}">
@@ -86,7 +86,7 @@
 															</th:block>
 															<th:block th:unless="${pollData.pollQval3 != '기타'}">
 																<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-3-'+${pollData.pollQsq}" th:value="${pollData.pollQval3}" class="etc_radio"><label th:for="'rdi-3-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval3}"></span></label>
-																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" class="form_control etc_input" />
+																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}"onkeyup="chkChar(this)"  class="form_control etc_input" />
 															</th:block>
 														</li>
 														<li th:if="${pollData.pollQval4 != null && pollData.pollQval4 != ''}">
@@ -95,7 +95,7 @@
 															</th:block>
 															<th:block th:unless="${pollData.pollQval4 != '기타'}">
 																<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-4-'+${pollData.pollQsq}" th:value="${pollData.pollQval4}" class="etc_radio"><label th:for="'rdi-4-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval4}"></span></label>
-																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" class="form_control etc_input" />
+																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" class="form_control etc_input" />
 															</th:block>
 														</li>
 														<li th:if="${pollData.pollQval5 != null && pollData.pollQval5 != ''}">
@@ -104,7 +104,7 @@
 															</th:block>
 															<th:block th:unless="${pollData.pollQval5 != '기타'}">
 																<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-5-'+${pollData.pollQsq}" th:value="${pollData.pollQval5}" class="etc_radio"><label th:for="'rdi-5-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval5}"></span></label>
-																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" class="form_control etc_input" />
+																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" class="form_control etc_input" />
 															</th:block>
 														</li>
 														<li th:if="${pollData.pollQval6 != null && pollData.pollQval6 != ''}">
@@ -113,7 +113,7 @@
 															</th:block>
 															<th:block th:unless="${pollData.pollQval6 != '기타'}">
 																<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-6-'+${pollData.pollQsq}" th:value="${pollData.pollQval6}" class="etc_radio"><label th:for="'rdi-6-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval6}"></span></label>
-																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" class="form_control etc_input" />
+																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" class="form_control etc_input" />
 															</th:block>
 														</li>
 														<li th:if="${pollData.pollQval7 != null && pollData.pollQval7 != ''}">
@@ -122,7 +122,7 @@
 															</th:block>
 															<th:block th:unless="${pollData.pollQval7 != '기타'}">
 																<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-7-'+${pollData.pollQsq}" th:value="${pollData.pollQval7}" class="etc_radio"><label th:for="'rdi-7-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval7}"></span></label>
-																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" class="form_control etc_input" />
+																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" class="form_control etc_input" />
 															</th:block>
 														</li>
 														<li th:if="${pollData.pollQval8 != null && pollData.pollQval8 != ''}">
@@ -131,7 +131,7 @@
 															</th:block>
 															<th:block th:unless="${pollData.pollQval8 != '기타'}">
 																<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-8-'+${pollData.pollQsq}" th:value="${pollData.pollQval8}" class="etc_radio"><label th:for="'rdi-8-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval8}"></span></label>
-																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" class="form_control etc_input"/>
+																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" class="form_control etc_input"/>
 															</th:block>
 														</li>
 														<li th:if="${pollData.pollQval9 != null && pollData.pollQval9 != ''}">
@@ -140,7 +140,7 @@
 															</th:block>
 															<th:block th:unless="${pollData.pollQval9 != '기타'}">
 																<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-9-'+${pollData.pollQsq}" th:value="${pollData.pollQval9}"class="etc_radio"><label th:for="'rdi-9-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval9}"></span></label>
-																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" class="form_control etc_input" />
+																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" class="form_control etc_input" />
 															</th:block>
 														</li>
 														<li th:if="${pollData.pollQval10 != null && pollData.pollQval10 != ''}">
@@ -149,7 +149,7 @@
 															</th:block>
 															<th:block th:unless="${pollData.pollQval10 != '기타'}">
 																<input type="radio" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="'rdi-10-'+${pollData.pollQsq}" th:value="${pollData.pollQval10}" class="etc_radio"><label th:for="'rdi-10-'+${pollData.pollQsq}"><span th:text="${pollData.pollQval10}"></span></label>
-																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" class="form_control etc_input" />
+																<input type="text" th:name="'etc_input_'+${pollData.pollQsq}" onkeyup="chkChar(this)" class="form_control etc_input" />
 															</th:block>
 														</li>
 													</ul>
@@ -190,12 +190,12 @@
 												</th:block>
 												<th:block th:if="${pollData.pollQtype == '30'}">
 													<div class="input_wrap">
-														<input type="text" class="form_control" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}" />
+														<input type="text" class="form_control" onkeyup="chkChar(this)" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}" />
 													</div>
 												</th:block>
 												<th:block th:if="${pollData.pollQtype == '40'}">
 													<div class="input_wrap">
-														<textarea class="doc_ans" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}" placeholder="1,000자 이내로 입력해 주세요." style="resize: none;"></textarea>
+														<textarea class="doc_ans" th:name="${pollData.pollQsq+'_'+(pollStat.index+1)}" onkeyup="chkChar(this)" th:id="${pollData.pollQsq+'_'+(pollStat.index+1)}" placeholder="1,000자 이내로 입력해 주세요." style="resize: none;"></textarea>
 														<p class="txt_cnt">
 															<span id="ans_cnt" class="ans_cnt">(<em class="c_primary">0</em>/1000자)</span>
 														</p>
@@ -310,10 +310,17 @@ var fnSubmitPoll = function () {
 			});
 		}
 	})
-	
+}
 
-	
+function chkChar(obj){
+    var RegExp = /[\{\}\[\]\/?.,;:|\)*~`!^\-_+┼<>@\#$%&\'\"\\\(\=]/gi;	//정규식 구문
+    if (RegExp.test(obj.value)) {
+      // 특수문자 모두 제거    
+      obj.value = obj.value.replace(RegExp , '');
+    }
 }
+
+
 $(document).ready( function() {
 	
 	//SNS 공유 버튼 토글