Преглед изворни кода

총알배송, 이벤트 오류수정

sowon4187 пре 5 година
родитељ
комит
b295949a3d

+ 12 - 9
src/main/java/com/style24/front/biz/web/TsfPlanningController.java

@@ -503,16 +503,19 @@ public class TsfPlanningController extends TsfBaseController {
 	public ModelAndView planningShotDeliveryForm(Plan plan) throws Exception {
 		ModelAndView mav = new ModelAndView();
 		CustDeliveryAddr addr = new CustDeliveryAddr();
-		int custNo = TsfSession.getInfo().getCustNo();
-		// 고객정보 조회
-		Customer customer = new Customer();
-		customer.setSiteCd(TscConstants.Site.STYLE24.value());
-		customer.setCustNo(custNo);
-		customer.setCustStat(TscConstants.CustStat.ACTIVE.value());
-		customer = coreCustomerService.getCustomerInfo(customer);
-
-		mav.addObject("customerInfo", customer);
+		Integer custNo = null;
+		if (TsfSession.isLogin()) {
+			custNo = TsfSession.getInfo().getCustNo();
+			// 고객정보 조회
+			Customer customer = new Customer();
+			customer.setSiteCd(TscConstants.Site.STYLE24.value());
+			customer.setCustNo(custNo);
+			customer.setCustStat(TscConstants.CustStat.ACTIVE.value());
+			customer = coreCustomerService.getCustomerInfo(customer);
+			mav.addObject("customerInfo", customer);
+		}
 		
+
 		addr.setCustNo(custNo);
 		plan.setSiteCd(TscConstants.Site.STYLE24.value());
 		plan.setFrontGb(TsfSession.getFrontGb());

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

@@ -108,7 +108,7 @@
 						<div class="content dp_special" th:id="${a.tmplType + a.planContSq}"></div>
 				</th:block>
 			</th:block>
-			<div class="coner_item01" th:utext="${#strings.replace(#strings.replace(fsrcInfoBtm.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div>
+			<div class="coner_item01" th:if="${fsrcInfoBtm != null}" th:utext="${#strings.replace(#strings.replace(fsrcInfoBtm.fsrcPc,'&amplt;','<'),'&ampgt;','>')}"></div>
 			
 			 <!-- 댓글리스트 -->
 			<th:block th:if="${planInfo.replyYn == 'Y'}">

+ 10 - 5
src/main/webapp/WEB-INF/views/web/planning/PlanningMainFormWeb.html

@@ -36,7 +36,7 @@
 				</div>
 				<div class="cont_body">
 					<div class="taps">
-						<div>
+						<div id="taps">
 							<ul>
 								<li th:class="${cateNo == null ? 'active' : ''}"><a href="javascript:void(0);" onclick="cfnGoToPage(_PAGE_PLANNING_MAIN);">전체</a></li>
 								<li th:each="oneData, stat : ${cateList}" th:class="${oneData.cateNo == cateNo ? 'active' : '' }" ><a href="javascript:void(0);" th:onclick="|cfnGoToPage(_PAGE_PLANNING_MAIN + '?cateNo=${oneData.cateNo}');|">[[${oneData.cateNm}]]</a></li>
@@ -48,14 +48,14 @@
                             <p id="planningTotCnt"><span></span>개의 기획전</p>
                         </div>
                     </div>
-					 <div class="list_content nodata" style="display: none;" id="divPlanningNoData"> 데이터 없을시 클래스 nodata 추가
+					 <div class="list_content nodata" style="display: none;" id="divPlanningNoData"> 
 						<div class="list_defult">
 							<div>
 								<img src="/images/pc/ico_content_find.png" alt=""/>
 								<p>등록된 기획전이 없습니다.</p>
 							</div>
 							<div class="ui_row">
-								<button type="button" class="btn btn_default" onclick="cfnGoToPage(_PAGE_MAIN);"><span>으로 가기</span></button>
+								<button type="button" class="btn btn_default" onclick="cfnGoToPage(_PAGE_MAIN);"><span>메인으로 가기</span></button>
 							</div>
 						</div>
 					</div> 
@@ -120,7 +120,11 @@
 		
 		$.getJSON(actionUrl	, function(result, status) {
 				if (status == 'success') {
-
+					if(result.length == 0){
+						$('#planningTotCnt').html('<span>0</span>개의 기획전');
+						$("#taps").hide();
+					}
+						
                     if (result.length > 0) {
                        $('#planningTotCnt').html('<span>' + result.length.addComma() + '</span>개의 기획전');
 						
@@ -170,13 +174,14 @@
 						
 						tag += '</div>\n';
 						$('#divPlanningList').html(tag);
-						
+						$('#taps').show();
 						$('#divPlanningNoData').hide();
 						$('#divPlanningList').show();
 
                     }else{
                     	$('#divPlanningNoData').show();
     					$('#divPlanningList').hide();
+    					$('#taps').hide();
                     
                 	}
                 }