Explorar o código

목록 페이징 추가 중

jsshin %!s(int64=5) %!d(string=hai) anos
pai
achega
2ad1ee6b69

+ 28 - 0
src/main/java/com/style24/admin/biz/dao/TsaCustomerDao.java

@@ -28,6 +28,15 @@ import java.util.Collection;
 @Repository
 public interface TsaCustomerDao {
 
+	/**
+	 * 활동회원 건수
+	 * @param customerSearch - 검색조건
+	 * @return int
+	 * @author jsshin
+	 * @since 2021. 2. 01
+	 */
+	int getCustomerActiveListCount(CustomerSearch customerSearch);
+
 	/**
 	 * 활동회원 목록
 	 * @param customerSearch - 검색조건
@@ -180,6 +189,15 @@ public interface TsaCustomerDao {
 	 */
 	Collection<CustContactHst> getCustomerContactList(Integer custNo);
 
+	/**
+	 * 탈퇴회원 목록 건수
+	 * @param customerSearch - 검색조건
+	 * @return Collection<Customer>
+	 * @author jsshin
+	 * @since 2021. 02. 01
+	 */
+	int getCustomerSecedeListCount(CustomerSearch customerSearch);
+
 	/**
 	 * 탈퇴회원 목록
 	 * @param customerSearch - 검색조건
@@ -189,6 +207,15 @@ public interface TsaCustomerDao {
 	 */
 	Collection<Customer> getCustomerSecedeList(CustomerSearch customerSearch);
 
+	/**
+	 * 휴면회원 목록 건수
+	 * @param customerSearch - 검색조건
+	 * @return Collection<Customer>
+	 * @author jsshin
+	 * @since 2021. 02. 01
+	 */
+	int getCustomerDormantListCount(CustomerSearch customerSearch);
+
 	/**
 	 * 휴면회원 목록
 	 * @param customerSearch - 검색조건
@@ -201,4 +228,5 @@ public interface TsaCustomerDao {
 	void createException();
 
 
+
 }

+ 33 - 0
src/main/java/com/style24/admin/biz/service/TsaCustomerService.java

@@ -41,6 +41,17 @@ public class TsaCustomerService {
 	@Autowired
 	private TscCustomerService coreCustomerService;
 
+	/**
+	 * 활동회원 건수
+	 * @param customerSearch - 검색조건
+	 * @return int
+	 * @author jsshin
+	 * @since 2021. 2. 01
+	 */
+	public int getCustomerActiveListCount(CustomerSearch customerSearch) {
+		return  customerDao.getCustomerActiveListCount(customerSearch);
+	}
+
 	/**
 	 * 활동회원 목록
 	 * @param customerSearch - 검색조건
@@ -298,6 +309,17 @@ public class TsaCustomerService {
 		coreCustomerService.createCustomerContactHistory(custContactHst);
 	}
 
+	/**
+	 * 탈퇴회원 목록 건수
+	 * @param customerSearch - 검색조건
+	 * @return Collection<Customer>
+	 * @author jsshin
+	 * @since 2021. 02. 01
+	 */
+	public int getCustomerSecedeListCount(CustomerSearch customerSearch) {
+		return customerDao.getCustomerSecedeListCount(customerSearch);
+	}
+
 	/**
 	 * 탈퇴회원 목록
 	 * @param customerSearch - 검색조건
@@ -309,6 +331,17 @@ public class TsaCustomerService {
 		return customerDao.getCustomerSecedeList(customerSearch);
 	}
 
+	/**
+	 * 휴면회원 목록 건수
+	 * @param customerSearch - 검색조건
+	 * @return Collection<Customer>
+	 * @author jsshin
+	 * @since 2021. 02. 01
+	 */
+	public int getCustomerDormantListCount(CustomerSearch customerSearch) {
+		return customerDao.getCustomerDormantListCount(customerSearch);
+	}
+
 	/**
 	 * 휴면회원 목록
 	 * @param customerSearch - 검색조건

+ 30 - 6
src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -12,6 +12,7 @@ import com.style24.admin.biz.service.TsaSystemService;
 import com.style24.core.support.env.TscConstants;
 import com.style24.core.support.session.TscSession;
 import com.style24.core.support.util.CryptoUtils;
+import com.style24.persistence.TscPageRequest;
 import com.style24.persistence.domain.Coupon;
 import com.style24.persistence.domain.CustContactHst;
 import com.style24.persistence.domain.CustGrade;
@@ -309,9 +310,17 @@ public class TsaCustomerController extends TsaBaseController {
 	 */
 	@PostMapping("/active/list")
 	@ResponseBody
-	public Collection<Customer> getCustomerActiveList(@RequestBody CustomerSearch customerSearch) {
+	public GagaMap getCustomerActiveList(@RequestBody CustomerSearch customerSearch) {
+		GagaMap result = new GagaMap();
+		customerSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
+		log.info("customerSearch.toString() {}", customerSearch.toString());
+		customerSearch.setPageable(new TscPageRequest(customerSearch.getPageNo(), customerSearch.getPageSize()));
+		customerSearch.getPageable().setTotalCount(customerService.getCustomerActiveListCount(customerSearch));
 		TscSession.setAttribute("maskingYn", TsaSession.getInfo().getMaskingYn());
-		return customerService.getCustomerActiveList(customerSearch);
+
+		result.set("pageing", customerSearch);
+		result.set("custList", customerService.getCustomerActiveList(customerSearch));
+		return result;
 	}
 
 	/**
@@ -902,9 +911,17 @@ public class TsaCustomerController extends TsaBaseController {
 	 */
 	@PostMapping("/secede/list")
 	@ResponseBody
-	public Collection<Customer> getCustomerSecedeList(@RequestBody CustomerSearch customerSearch) {
+	public GagaMap getCustomerSecedeList(@RequestBody CustomerSearch customerSearch) {
+		GagaMap result = new GagaMap();
+		customerSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
+		customerSearch.setPageable(new TscPageRequest(customerSearch.getPageNo() - 1, customerSearch.getPageSize()));
+		customerSearch.getPageable().setTotalCount(customerService.getCustomerSecedeListCount(customerSearch));
+
 		TscSession.setAttribute("maskingYn", TsaSession.getInfo().getMaskingYn());
-		return customerService.getCustomerSecedeList(customerSearch);
+		result.set("pageing", customerSearch);
+		result.set("custList", customerService.getCustomerSecedeList(customerSearch));
+
+		return result;
 	}
 
 	/**
@@ -934,9 +951,16 @@ public class TsaCustomerController extends TsaBaseController {
 	 */
 	@PostMapping("/dormant/list")
 	@ResponseBody
-	public Collection<Customer>getCustomerDormantList(@RequestBody CustomerSearch customerSearch) {
+	public GagaMap getCustomerDormantList(@RequestBody CustomerSearch customerSearch) {
+		GagaMap result = new GagaMap();
+		customerSearch.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
+		customerSearch.setPageable(new TscPageRequest(customerSearch.getPageNo() - 1, customerSearch.getPageSize()));
+		customerSearch.getPageable().setTotalCount(customerService.getCustomerDormantListCount(customerSearch));
 		TscSession.setAttribute("maskingYn", TsaSession.getInfo().getMaskingYn());
-		return customerService.getCustomerDormantList(customerSearch);
+
+		result.set("pageing", customerSearch);
+		result.set("custList", customerService.getCustomerDormantList(customerSearch));
+		return result;
 	}
 
 

+ 6 - 0
src/main/java/com/style24/persistence/domain/CustomerSearch.java

@@ -1,6 +1,7 @@
 package com.style24.persistence.domain;
 
 import com.style24.persistence.TscBaseDomain;
+import com.style24.persistence.TscPageRequest;
 import lombok.Data;
 
 /**
@@ -33,4 +34,9 @@ public class CustomerSearch extends TscBaseDomain {
 	private String email;
 	private String custId;
 
+	private TscPageRequest pageable;
+	private int pageNo = 1;
+	private int pageSize = 50;
+	private int pageUnit = 10;
+
 }

+ 146 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsaCustomer.xml

@@ -2,9 +2,84 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.style24.admin.biz.dao.TsaCustomerDao">
 
+	<sql id="getListPaging_Header">
+		SELECT T.*
+		FROM  (
+	</sql>
+
+	<sql id="getListPaging_Footer">
+		) T
+		LIMIT #{pageable.startRow}, #{pageable.pageSize}
+	</sql>
+	<!-- 활동회원목록 건수-->
+
+	<!-- 활동회원목록 -->
+	<select id="getCustomerActiveListCount" parameterType="CustomerSearch" resultType="int">
+		/* TsaCustomer.getCustomerActiveListCount */
+		SELECT COUNT(*) AS CNT
+		FROM   TB_CUSTOMER
+		WHERE  CUST_STAT = 'G104_10'
+		<if test="searchGb == 'custNo'">
+		AND    CUST_NO = #{searchTxt}
+		</if>
+		<if test="searchGb == 'custNm'">
+		AND    LOWER(CUST_NM) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		</if>
+		<if test="searchGb == 'email'">
+		AND    LOWER(EMAIL) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		</if>
+		<if test="searchGb == 'custId'">
+		AND    LOWER(CUST_ID) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		</if>
+		<if test="siteCd != null and siteCd != ''">
+		AND    SITE_CD = #{siteCd}
+		</if>
+		<if test="cellPhnno != null and cellPhnno != ''">
+		AND    CELL_PHNNO = #{cellPhnno}
+		</if>
+		<if test="custGb != null and custGb != ''">
+		AND    CUST_GB = #{custGb}
+		</if>
+		<if test="custGrade != null and custGrade != ''">
+		AND    CUST_GRADE = #{custGrade}
+		</if>
+		<if test="managedRsn != null and managedRsn != ''">
+		AND    MANAGED_RSN = #{managedRsn}
+		</if>
+		<if test="smsAgreeYn != null and smsAgreeYn != ''">
+		AND   SMS_AGREE_YN = #{smsAgreeYn}
+		</if>
+		<if test="emailAgreeYn != null and emailAgreeYn != ''">
+		AND   EMAIL_AGREE_YN = #{emailAgreeYn}
+		</if>
+		<if test="appAgreeYn != null and appAgreeYn != ''">
+		AND   APP_AGREE_YN = #{appAgreeYn}
+		</if>
+		<if test="stDate != null and edDate != '' and stDate != null and edDate != ''">
+		     <if test="searchDateGb == 'joinDt'">
+		AND   JOIN_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		AND   JOIN_DT <![CDATA[<]]> DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
+		     </if>
+		     <if test="searchDateGb == 'loginLdt'">
+		AND   LOGIN_LDT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		AND   LOGIN_LDT <![CDATA[<]]> DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
+		     </if>
+		</if>
+		<if test="custNm != null and custNm != ''">
+		AND    LOWER(CUST_NM) LIKE CONCAT('%',LOWER(#{custNm}),'%')
+		</if>
+		<if test="email != null and email != ''">
+		AND    LOWER(EMAIL) LIKE CONCAT('%',LOWER(#{eamil}),'%')
+		</if>
+		<if test="custId != null and custId != ''">
+		AND    CUST_ID = #{custId}
+		</if>
+	</select>
+
 	<!-- 활동회원목록 -->
 	<select id="getCustomerActiveList" parameterType="CustomerSearch" resultType="Customer">
 		/* TsaCustomer.getCustomerActiveList */
+		<include refid="getListPaging_Header"/>
 		SELECT CUST_NO
 		     , CUST_ID
 		     , CUST_NM
@@ -112,6 +187,7 @@
 		<if test="custId != null and custId != ''">
 		AND    CUST_ID = #{custId}
 		</if>
+		<include refid="getListPaging_Footer"/>
 	</select>
 
 	<!--회원정보 수정-->
@@ -657,8 +733,43 @@
 	</select>
 
 	<!-- 탈퇴회원목록 -->
+	<select id="getCustomerSecedeListCount" parameterType="CustomerSearch" resultType="int">
+		/* TsaCustomer.getCustomerSecedeListCount */
+		SELECT COUNT(*) AS CNT
+		FROM   TB_SECEDE_CUST
+		WHERE  CUST_STAT = 'G104_30'
+		<if test="searchTxt != null and searchTxt != ''">
+		    <if test="searchGb == 'custNo'">
+		AND    CUST_NO = #{searchTxt}
+		    </if>
+		    <if test="searchGb == 'custNm'">
+		AND    LOWER(CUST_NM) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		    </if>
+		    <if test="searchGb == 'email'">
+		AND    LOWER(EMAIL) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		    </if>
+		    <if test="searchGb == 'custNo'">
+		AND    LOWER(CUST_NO) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		    </if>
+		</if>
+		<if test="siteCd != null and siteCd != ''">
+		AND    SITE_CD = #{siteCd}
+		</if>
+		<if test="cellPhnno != null and cellPhnno != ''">
+		AND    CELL_PHNNO = #{cellPhnno}
+		</if>
+		<if test="secedeRsn != null and secedeRsn != ''">
+		AND    SECEDE_RSN = #{secedeRsn}
+		</if>
+		<if test="stDate != null and stDate != '' and edDate != null and edDate != ''">
+		AND    SECEDE_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		AND    SECEDE_DT <![CDATA[<]]> DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
+		</if>
+	</select>
+
 	<select id="getCustomerSecedeList" parameterType="CustomerSearch" resultType="Customer">
 		/* TsaCustomer.getSecedeCustomerList */
+		<include refid="getListPaging_Header"/>
 		SELECT CUST_NO
 		     , CUST_ID
 		     , CUST_NM
@@ -738,10 +849,44 @@
 		AND    SECEDE_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
 		AND    SECEDE_DT <![CDATA[<]]> DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
 		</if>
+		<include refid="getListPaging_Footer"/>
+	</select>
+
+	<!-- 휴면회원목록 -->
+	<select id="getCustomerDormantListCount" parameterType="CustomerSearch" resultType="int">
+		/* TsaCustomer.getCustomerDormantListCount */
+		SELECT COUNT(*) AS CNT
+		FROM   TB_DORMANT_CUST
+		WHERE  CUST_STAT = 'G104_20'
+		<if test="searchTxt != null and searchTxt != ''">
+		    <if test="searchGb == 'custNo'">
+		AND    CUST_NO = #{searchTxt}
+		    </if>
+		    <if test="searchGb == 'custNm'">
+		AND    LOWER(CUST_NM) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		    </if>
+		    <if test="searchGb == 'email'">
+		AND    LOWER(EMAIL) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		    </if>
+		    <if test="searchGb == 'custNo'">
+		AND    LOWER(CUST_NO) LIKE CONCAT('%',LOWER(#{searchTxt}),'%')
+		    </if>
+		</if>
+		<if test="siteCd != null and siteCd != ''">
+		AND    SITE_CD = #{siteCd}
+		</if>
+		<if test="cellPhnno != null and cellPhnno != ''">
+		AND    CELL_PHNNO = #{cellPhnno}
+		</if>
+		<if test="stDate != null and stDate != '' and edDate != null and edDate != ''">
+		AND    DORMANT_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		AND    DORMANT_DT <![CDATA[<]]> DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
+		</if>
 	</select>
 
 	<!-- 휴면회원목록 -->
 	<select id="getCustomerDormantList" parameterType="CustomerSearch" resultType="Customer">
+		<include refid="getListPaging_Header"/>
 		/* TsaCustomer.getDormantCustomerList */
 		SELECT CUST_NO
 		     , CUST_ID
@@ -820,6 +965,7 @@
 		AND    DORMANT_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
 		AND    DORMANT_DT <![CDATA[<]]> DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
 		</if>
+		<include refid="getListPaging_Footer"/>
 	</select>
 
 	<insert id="createException">

+ 44 - 12
src/main/webapp/WEB-INF/views/customer/CustomerActiveListForm.html

@@ -26,8 +26,8 @@
 	<!-- //메뉴 설명 -->
 
 	<!-- 검색조건 영역 -->
+	<form id="custActiveForm" name="custActiveForm" action="#" th:action="@{'/customer/active/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
 	<div class="panelStyle">
-		<form id="searchForm" name="searchForm" action="#" th:action="@{'/customer/active/list'}" onsubmit="$('#btnSearch').trigger('click'); return false;">
 			<table class="frmStyle" aria-describedby="검색조건">
 				<colgroup>
 					<col style="width:10%;"/>
@@ -115,20 +115,41 @@
 			<ul class="panelBar">
 				<li class="center">
 					<button type="button" class="btn btn-base btn-lg" id="btnSearch">조회</button>
-					<button type="button" class="btn btn-gray btn-lg" onclick="$('#searchForm')[0].reset();">초기화</button>
+					<button type="button" class="btn btn-gray btn-lg" onclick="$('#custActiveForm')[0].reset();">초기화</button>
 				</li>
 			</ul>
-		</form>
+
 	</div>
 	<!-- //검색조건 영역 -->
 
 	<!-- 리스트 영역 -->
-	<div class="panelStyle">
-		<div id="gridList" style="width: 100%; height: 570px" class="ag-theme-balham"></div>
-	</div>
+		<div class="panelStyle">
+			<ul class="panelBar">
+				<li class="right">
+					검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>&nbsp;
+					쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;
+					<select id="pageSize" name="pageSize">
+						<option value="3" selected="selected">3개씩 보기</option>
+						<option value="4">4개씩 보기</option>
+						<option value="50">50개씩 보기</option>
+						<option value="100">100개씩 보기</option>
+						<option value="500">500개씩 보기</option>
+						<option value="1000">1000개씩 보기</option>
+					</select>
+					<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
+				</li>
+			</ul>
+			<div id="gridList" style="width: 100%; height: 570px" class="ag-theme-balham"></div>
+			<ul class="panelBar">
+				<li class="center">
+					<div class="tablePaging" id="custListPagination"></div>
+				</li>
+			</ul>
+		</div>
+	</form>
 	<!-- //리스트 영역 -->
 </div>
-
+<script type="text/javascript" th:src="@{'/ux/plugins/gaga/gaga.paging.js?v=' + ${#calendars.format(#calendars.createNow(), 'yyyyMMddHHmmss')}}" src="/ux/plugins/gaga/gaga.paging.js"></script>
 <script th:inline="javascript">
 	/*<![CDATA[*/
 
@@ -205,22 +226,22 @@
 	});
 
 	//엔터키 조회
-	$('#searchForm input[name=cellPhnno], #searchForm input[name=searchNm]').on('keypress' ,function (event) {
+	$('#custActiveForm input[name=cellPhnno], #custActiveForm input[name=searchNm]').on('keypress' ,function (event) {
 		if (event.which === 13) {
 			fnSearch();
 		}
 	});
 
 	// 휴대폰 자동 하이픈
-	$('#searchForm input[name=cellPhnno]').on('input keyup keydown paste change', function () {
+	$('#custActiveForm input[name=cellPhnno]').on('input keyup keydown paste change', function () {
 		cfnCellPhonnHypen(this);
 	});
 
 	// 유효성 확인
 	var fnValidationCheck = function () {
 		// 입력 값 체크
-		const $searchGb = $('#searchForm select[name=searchGb]');	// 검색구분
-		const $searchTxt = $('#searchForm input[name=searchTxt]');	// 검색내용
+		const $searchGb = $('#custActiveForm select[name=searchGb]');	// 검색구분
+		const $searchTxt = $('#custActiveForm input[name=searchTxt]');	// 검색내용
 		let isSearchVaild = true;
 		let validationMessage;
 
@@ -261,9 +282,20 @@
 		if (!validation) {
 			return;
 		}
-		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
+		//gagaAgGrid.fetch($('#custActiveForm').prop('action'), gridOptions, '#custActiveForm');
+		gagaPaging.init('custActiveForm', fnSearchCallBack, 'custListPagination', $('#custActiveForm select[name=pageSize]').val());
+		gagaPaging.load($('#custActiveForm input[name=pageNo]').val());
 	};
 
+	var fnSearchCallBack = function (result) {
+		$('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		$('#custActiveForm input[name=pageNo]').val(result.pageing.pageable.pageNo.addComma());
+		$('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+		$('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+
+		gridOptions.api.setRowData(result.custList);
+		gagaPaging.createPagination(result.pageing.pageable);
+	};
 
 	$(document).ready(function() {
 		// 공통 달력 생성

+ 32 - 1
src/main/webapp/WEB-INF/views/customer/CustomerDormantListForm.html

@@ -82,11 +82,30 @@
 
 	<!-- 리스트 영역 -->
 	<div class="panelStyle">
+		<ul class="panelBar">
+			<li class="right">
+				검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>&nbsp;
+				쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;
+				<select id="pageSize" name="pageSize">
+					<option value="50" selected="selected">50개씩 보기</option>
+					<option value="100">100개씩 보기</option>
+					<option value="500">500개씩 보기</option>
+					<option value="1000">1000개씩 보기</option>
+				</select>
+				<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
+			</li>
+		</ul>
 		<div id="gridList" style="width: 100%; height: 570px" class="ag-theme-balham"></div>
+		<ul class="panelBar">
+			<li class="center">
+				<div class="tablePaging" id="custListPagination"></div>
+			</li>
+		</ul>
 	</div>
 	<!-- //리스트 영역 -->
 </div>
 
+<script type="text/javascript" th:src="@{'/ux/plugins/gaga/gaga.paging.js?v=' + ${#calendars.format(#calendars.createNow(), 'yyyyMMddHHmmss')}}" src="/ux/plugins/gaga/gaga.paging.js"></script>
 <script th:inline="javascript">
 	/*<![CDATA[*/
 	// 사이트목록
@@ -181,7 +200,19 @@
 		if (!validation) {
 			return;
 		}
-		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
+		//gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
+		gagaPaging.init('searchForm', fnSearchCallBack, 'custListPagination', $('#pageSize').val());
+		gagaPaging.load($('#pageNo').val());
+	};
+
+	var fnSearchCallBack = function (result) {
+		$('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		$('#pageNo').val(result.pageing.pageable.pageNo.addComma());
+		$('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+		$('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+
+		gridOptions.api.setRowData(result.custList);
+		gagaPaging.createPagination(result.pageing.pageable);
 	};
 
 	$(document).ready(function() {

+ 32 - 1
src/main/webapp/WEB-INF/views/customer/CustomerSecedeListForm.html

@@ -91,7 +91,25 @@
 
 	<!-- 리스트 영역 -->
 	<div class="panelStyle">
+		<ul class="panelBar">
+			<li class="right">
+				검색결과 : <strong><span id="gridRowTotalCount">0</span> 건</strong>&nbsp;
+				쪽번호 <span id="pgNo">0</span>/ <strong id="endPgNo">0</strong>&nbsp;&nbsp;
+				<select id="pageSize" name="pageSize">
+					<option value="50" selected="selected">50개씩 보기</option>
+					<option value="100">100개씩 보기</option>
+					<option value="500">500개씩 보기</option>
+					<option value="1000">1000개씩 보기</option>
+				</select>
+				<input type="hidden" name="pageNo" id="pageNo" value ="1"/>
+			</li>
+		</ul>
 		<div id="gridList" style="width: 100%; height: 570px" class="ag-theme-balham"></div>
+		<ul class="panelBar">
+			<li class="center">
+				<div class="tablePaging" id="custListPagination"></div>
+			</li>
+		</ul>
 	</div>
 	<!-- //리스트 영역 -->
 </div>
@@ -190,7 +208,20 @@
 		if (!validation) {
 			return;
 		}
-		gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
+		//gagaAgGrid.fetch($('#searchForm').prop('action'), gridOptions, '#searchForm');
+
+		gagaPaging.init('searchForm', fnSearchCallBack, 'custListPagination', $('#pageSize').val());
+		gagaPaging.load($('#pageNo').val());
+	};
+
+	var fnSearchCallBack = function (result) {
+		$('#gridRowTotalCount').html(result.pageing.pageable.totalCount.addComma());
+		$('#pageNo').val(result.pageing.pageable.pageNo.addComma());
+		$('#pgNo').html(result.pageing.pageable.pageNo.addComma());
+		$('#endPgNo').html(result.pageing.pageable.totalPage.addComma());
+
+		gridOptions.api.setRowData(result.custList);
+		gagaPaging.createPagination(result.pageing.pageable);
 	};
 
 	$(document).ready(function() {