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

Merge remote-tracking branch '112.172.147.34/style' into ST24PRJ-4(회수상품정보,금액정보노출)

jsh77b пре 4 година
родитељ
комит
6c1240db64

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

@@ -220,5 +220,29 @@ public interface TsaCustomerDao {
 	 * @since 2021. 11. 22
 	 */
 	void deleteCellPhnno(Customer customer);
+	
+	/**
+	 * 활동회원 목록 엑셀
+	 * @param customer - 고객 정보
+	 * @author jmh
+	 * @since 2021. 12. 08
+	 */
+	Collection<Customer> getCustomerActiveExcelList(CustomerSearch customerSearch);
+	
+	/**
+	 * 탈퇴회원 목록 엑셀
+	 * @param customer - 고객 정보
+	 * @author jmh
+	 * @since 2021. 12. 08
+	 */
+	Collection<Customer> getCustomerSecedeExcelList(CustomerSearch customerSearch);
+	
+	/**
+	 * 휴면회원 목록 엑셀
+	 * @param customer - 고객 정보
+	 * @author jmh
+	 * @since 2021. 12. 08
+	 */
+	Collection<Customer> getCustomerDormantExcelList(CustomerSearch customerSearch);
 
 }

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

@@ -7,7 +7,11 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import com.gagaframework.excel.GagaExcelUtil;
+import com.gagaframework.excel.env.GagaExcelConstants;
+import com.gagaframework.web.util.GagaDateUtil;
 import com.style24.admin.biz.dao.TsaCustomerDao;
+import com.style24.admin.support.env.TsaConstants;
 import com.style24.admin.support.security.session.TsaSession;
 import com.style24.core.biz.service.TscCustomerService;
 import com.style24.core.biz.service.TscKakaotalkService;
@@ -510,4 +514,166 @@ public class TsaCustomerService {
 		customerDao.deleteCellPhnno(customer);
 	}
 
+	/**
+	 * 활동회원 목록 엑셀
+	 *
+	 * @param customerSearch
+	 * @param excelFilenameWithPath - 경로를 포함한 엑셀파일명
+	 * @return
+	 * @author jmh
+	 * @since 2021. 12. 08
+	 */
+	public void getCustomerActiveExcelList(CustomerSearch customerSearch, String excelFilenameWithPath) {
+
+		// 헤더 title 설정
+		String[] listTitles = {"사이트", "회원ID", "회원NO", "회원명", "회원구분", "등급", "관리대상", "생년월일", "가입일자", "로그인일자", "핸드폰", "이메일", "성별", "수신동의(SMS)", "수신동의(Email)"};
+		
+
+		// DB 처리 시 사용되는 파라미터명(셀명) 설정
+		String[] cellNames = {"siteCd", "custId", "custNo", "custNm", "custGb", "custGrade", "managedRsn", "birthYmd", "joinDt"
+				, "loginLdt", "cellPhnno", "email", "sexGb", "smsAgreeYn", "emailAgreeYn"};
+
+		String[] cellTypes = {
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(), 
+			GagaExcelConstants.CellType.CHAR_CENTER.name()};
+		
+		Collection<Customer> custList = customerDao.getCustomerActiveExcelList(customerSearch);
+		for( Customer cust : custList ) { 
+			cust.setCustId(cust.getMaskingCustId());
+			cust.setCustNm(cust.getMaskingCustNm());
+			cust.setCellPhnno(cust.getMaskingCellPhnno());
+			cust.setEmail(cust.getMaskingEmail());
+			cust.setBirthYmd(GagaDateUtil.getDate(GagaDateUtil.getDate(cust.getBirthYmd(), "yyyyMMdd"), "yyyy-MM-dd"));
+			
+			if(cust.getSexGb().equals(TscConstants.Gender.FEMALE.value())) {
+				cust.setSexGb("여성");
+			}else if(cust.getSexGb().equals(TscConstants.Gender.MALE.value())) {
+				cust.setSexGb("남성");
+			}else if(cust.getSexGb().equals(TscConstants.Gender.COMMON.value())) {
+				cust.setSexGb("공통");
+			}else {
+				cust.setSexGb("알수없음");
+			}
+		}
+		
+		try {
+
+			GagaExcelUtil.createExcel(excelFilenameWithPath, custList, "활동회원", listTitles, cellNames, cellTypes, TsaConstants.EXCEL_FOOTER_TITLE);
+
+		} catch (Exception e) {
+			throw new IllegalStateException(e);
+		}
+	}
+	
+	/**
+	 * 탈퇴회원 목록 엑셀
+	 *
+	 * @param customerSearch
+	 * @param excelFilenameWithPath - 경로를 포함한 엑셀파일명
+	 * @return
+	 * @author jmh
+	 * @since 2021. 12. 08
+	 */
+	public void getCustomerSecedeExcelList(CustomerSearch customerSearch, String excelFilenameWithPath) {
+
+		// 헤더 title 설정
+		String[] listTitles = {"사이트", "회원ID", "회원NO", "회원명",  "핸드폰", "이메일", "성별", "생년월일", "탈퇴일자"};
+		
+
+		// DB 처리 시 사용되는 파라미터명(셀명) 설정
+		String[] cellNames = {"siteCd", "custId", "custNo", "custNm", "cellPhnno", "email", "sexGb", "birthYmd", "secedeDt"};
+
+		String[] cellTypes = {
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name()};
+		
+		Collection<Customer> custList = customerDao.getCustomerSecedeExcelList(customerSearch);
+		for( Customer cust : custList ) { 
+			cust.setCustId(cust.getMaskingCustId());
+			cust.setCustNm(cust.getMaskingCustNm());
+			cust.setCellPhnno(cust.getMaskingCellPhnno());
+			cust.setEmail(cust.getMaskingEmail());
+			cust.setBirthYmd(GagaDateUtil.getDate(GagaDateUtil.getDate(cust.getBirthYmd(), "yyyyMMdd"), "yyyy-MM-dd"));
+			
+			if(cust.getSexGb().equals(TscConstants.Gender.FEMALE.value())) {
+				cust.setSexGb("여성");
+			}else if(cust.getSexGb().equals(TscConstants.Gender.MALE.value())) {
+				cust.setSexGb("남성");
+			}else if(cust.getSexGb().equals(TscConstants.Gender.COMMON.value())) {
+				cust.setSexGb("공통");
+			}else {
+				cust.setSexGb("알수없음");
+			}
+		}
+		
+		try {
+
+			GagaExcelUtil.createExcel(excelFilenameWithPath, custList, "탈퇴회원", listTitles, cellNames, cellTypes, TsaConstants.EXCEL_FOOTER_TITLE);
+
+		} catch (Exception e) {
+			throw new IllegalStateException(e);
+		}
+	}
+	
+	/**
+	 * 휴면회원 목록 엑셀
+	 *
+	 * @param customerSearch
+	 * @param excelFilenameWithPath - 경로를 포함한 엑셀파일명
+	 * @return
+	 * @author jmh
+	 * @since 2021. 12. 08
+	 */
+	public void getCustomerDormantExcelList(CustomerSearch customerSearch, String excelFilenameWithPath) {
+
+		// 헤더 title 설정
+		String[] listTitles = {"사이트", "회원ID", "회원NO", "회원명",  "핸드폰", "이메일", "성별", "생년월일", "휴면일자"};
+		
+
+		// DB 처리 시 사용되는 파라미터명(셀명) 설정
+		String[] cellNames = {"siteCd", "custId", "custNo", "custNm", "cellPhnno", "email", "sexGb", "birthYmd", "dormantDt"};
+
+		String[] cellTypes = {
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name(), GagaExcelConstants.CellType.CHAR_CENTER.name(),
+			GagaExcelConstants.CellType.CHAR_CENTER.name()};
+		
+		Collection<Customer> custList = customerDao.getCustomerDormantExcelList(customerSearch);
+		for( Customer cust : custList ) { 
+			cust.setCustId(cust.getMaskingCustId());
+			cust.setCustNm(cust.getMaskingCustNm());
+			cust.setCellPhnno(cust.getMaskingCellPhnno());
+			cust.setEmail(cust.getMaskingEmail());
+			cust.setBirthYmd(GagaDateUtil.getDate(GagaDateUtil.getDate(cust.getBirthYmd(), "yyyyMMdd"), "yyyy-MM-dd"));
+			
+			if(cust.getSexGb().equals(TscConstants.Gender.FEMALE.value())) {
+				cust.setSexGb("여성");
+			}else if(cust.getSexGb().equals(TscConstants.Gender.MALE.value())) {
+				cust.setSexGb("남성");
+			}else if(cust.getSexGb().equals(TscConstants.Gender.COMMON.value())) {
+				cust.setSexGb("공통");
+			}else {
+				cust.setSexGb("알수없음");
+			}
+		}
+		
+		try {
+
+			GagaExcelUtil.createExcel(excelFilenameWithPath, custList, "휴면회원", listTitles, cellNames, cellTypes, TsaConstants.EXCEL_FOOTER_TITLE);
+
+		} catch (Exception e) {
+			throw new IllegalStateException(e);
+		}
+	}
 }

+ 104 - 4
src/main/java/com/style24/admin/biz/web/TsaCustomerController.java

@@ -2,8 +2,13 @@ package com.style24.admin.biz.web;
 
 import java.util.Collection;
 
+import javax.servlet.http.HttpServletRequest;
+
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.env.Environment;
+import org.springframework.core.io.InputStreamResource;
+import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -14,6 +19,11 @@ 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.util.GagaDateUtil;
+import com.gagaframework.web.util.GagaFileUtil;
+import com.gagaframework.web.util.GagaStringUtil;
 import com.style24.admin.biz.service.TsaCounselService;
 import com.style24.admin.biz.service.TsaCustomerService;
 import com.style24.admin.biz.service.TsaRendererService;
@@ -46,10 +56,6 @@ import com.style24.persistence.domain.Review;
 
 import lombok.extern.slf4j.Slf4j;
 
-import com.gagaframework.web.parameter.GagaMap;
-import com.gagaframework.web.rest.server.GagaResponse;
-import com.gagaframework.web.util.GagaStringUtil;
-
 /**
  * 고객 Controller
  *
@@ -63,6 +69,9 @@ public class TsaCustomerController extends TsaBaseController {
 
 	@Autowired
 	private TscMessageByLocale message;
+	
+	@Autowired
+	private Environment env;
 
 	@Autowired
 	private TsaCounselService counselService;
@@ -1467,5 +1476,96 @@ public class TsaCustomerController extends TsaBaseController {
 
 		return super.ok(message.getMessage("SUCC_0003"));
 	}
+	
+	/**
+	 * 활동회원 목록 엑셀
+	 * @param customerSearch - 검색조건
+	 * @return Collection<Customer>
+	 * @author jmh
+	 * @since 2021. 12. 08
+	 */
+	@GetMapping("/active/excel/list")
+	public ResponseEntity<InputStreamResource> downloadCustomerActiveExcelList(HttpServletRequest request, CustomerSearch customerSearch) throws Exception {
+		String excelfileName = "활동회원_" + GagaDateUtil.getTodayDateTime() + ".xlsx";
+		String excelFilenameWithPath = GagaFileUtil.getConcatenationPath(env.getProperty("download.path"), "excel", excelfileName);
 
+		// multi row 검색관련 처리
+		if (!StringUtils.isBlank(customerSearch.getCondition())) {
+			if (customerSearch.getSearch().equals("custNm") || customerSearch.getSearch().equals("email")) {
+				String[] multiParams = customerSearch.getCondition().replaceAll("\r", "").split("\n");
+				for (int i = 0; i < multiParams.length; i++) {
+					multiParams[i] = CryptoUtils.encryptAES(multiParams[i]);
+				}
+
+				customerSearch.setConditions(multiParams);
+			} else {
+				customerSearch.setConditions(customerSearch.getCondition().replaceAll("\r", "").split("\n"));
+			}
+		}
+
+		// 회원명, 이메일 암호화
+		if ("custNm".equals(customerSearch.getSearchGb()) || "email".equals(customerSearch.getSearchGb())) {
+			customerSearch.setSearchTxt(CryptoUtils.encryptAES(customerSearch.getSearchTxt()));
+		}
+		if (!"Y".equals(customerSearch.getCpnPubPopYn())) {
+			customerSearch.setCpnPubPopYn("N");
+		}
+		if ("custId".equals(customerSearch.getSearchGb())) {
+			customerSearch.setStDate(null);
+			customerSearch.setEdDate(null);
+		}
+		customerSearch.encryptData();	//데이터 암호화 필요
+			
+		customerService.getCustomerActiveExcelList(customerSearch, excelFilenameWithPath);
+
+		return GagaFileUtil.writeFile(request, excelFilenameWithPath);
+	}
+	
+	
+	/**
+	 * 탈퇴회원 목록 엑셀
+	 * @param customerSearch - 검색조건
+	 * @return Collection<Customer>
+	 * @author jmh
+	 * @since 2021. 12. 08
+	 */
+	@GetMapping("/secede/excel/list")
+	public ResponseEntity<InputStreamResource> downloadCustomerSecedeExcelList(HttpServletRequest request, CustomerSearch customerSearch) throws Exception {
+		String excelfileName = "탈퇴회원_" + GagaDateUtil.getTodayDateTime() + ".xlsx";
+		String excelFilenameWithPath = GagaFileUtil.getConcatenationPath(env.getProperty("download.path"), "excel", excelfileName);
+
+		// 회원명, 이메일 암호화
+		if ("custNm".equals(customerSearch.getSearchGb()) || "email".equals(customerSearch.getSearchGb())) {
+			customerSearch.setSearchTxt(CryptoUtils.encryptAES(customerSearch.getSearchTxt()));
+		}
+		customerSearch.encryptData();	//데이터 암호화 필요
+		
+		customerService.getCustomerSecedeExcelList(customerSearch, excelFilenameWithPath);
+
+		return GagaFileUtil.writeFile(request, excelFilenameWithPath);
+	}
+	
+	/**
+	 * 휴면회원 목록 엑셀
+	 * @param customerSearch - 검색조건
+	 * @return Collection<Customer>
+	 * @author jmh
+	 * @since 2021. 12. 08
+	 */
+	@GetMapping("/dormant/excel/list")
+	public ResponseEntity<InputStreamResource> downloadCustomerDormantExcelList(HttpServletRequest request, CustomerSearch customerSearch) throws Exception {
+		String excelfileName = "휴면회원_" + GagaDateUtil.getTodayDateTime() + ".xlsx";
+		String excelFilenameWithPath = GagaFileUtil.getConcatenationPath(env.getProperty("download.path"), "excel", excelfileName);
+
+		// 회원명, 이메일 암호화
+		if ("custNm".equals(customerSearch.getSearchGb()) || "email".equals(customerSearch.getSearchGb())) {
+			customerSearch.setSearchTxt(CryptoUtils.encryptAES(customerSearch.getSearchTxt()));
+		}
+		customerSearch.encryptData();	//데이터 암호화 필요
+		
+		customerService.getCustomerDormantExcelList(customerSearch, excelFilenameWithPath);
+
+		return GagaFileUtil.writeFile(request, excelFilenameWithPath);
+	}
+	
 }

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

@@ -920,4 +920,226 @@
 		WHERE  CUST_NO = #{custNo}
 	</update>
 
+	<!-- 활동회원목록 엑셀 -->
+	<select id="getCustomerActiveExcelList" parameterType="CustomerSearch" resultType="Customer">
+		/* TsaCustomer.getCustomerActiveExcelList */
+		SELECT CUST_NO
+		     , CUST_ID
+		     , CUST_NM
+		     , PASSWD
+		     , BIRTH_YMD
+		     , SEX_GB
+		     , CELL_PHNNO
+		     , APP_AGREE_YN
+		     , DATE_FORMAT(APP_AGREE_DT, '%Y-%m-%d') AS APP_AGREE_DT
+		     , SMS_AGREE_YN
+		     , DATE_FORMAT(SMS_AGREE_DT, '%Y-%m-%d') AS SMS_AGREE_DT
+		     , EMAIL
+		     , EMAIL_AGREE_YN
+		     , DATE_FORMAT(EMAIL_AGREE_DT, '%Y-%m-%d') AS EMAIL_AGREE_DT
+		     , MK_AGREE_YN
+		     , DATE_FORMAT(MK_AGREE_DT, '%Y-%m-%d') AS MK_AGREE_DT
+		     , HOME_ZIPCODE
+		     , HOME_BASE_ADDR
+		     , HOME_DTL_ADDR
+		     , FN_GET_CODE_NM('G000', SITE_CD) AS SITE_CD
+		     , FRONT_GB
+		     , AF_LINK_CD
+		     , FN_GET_CODE_NM('G100', CUST_GB) AS CUST_GB
+		     , FN_GET_CODE_NM('G110', CUST_GRADE) AS CUST_GRADE
+		     , DATE_FORMAT(JOIN_DT, '%Y-%m-%d') AS JOIN_DT
+		     , FOREIGNER_YN
+		     , CUST_STAT
+		     , DATE_FORMAT(PASSWD_CHG_DT, '%Y-%m-%d') AS PASSWD_CHG_DT
+		     , TEMP_PASSWD_YN
+		     , DATE_FORMAT(LOGIN_LDT, '%Y-%m-%d') AS LOGIN_LDT
+		     , CI
+		     , DATE_FORMAT(AUTH_DT, '%Y-%m-%d') AS AUTH_DT
+		     , MANAGED_RSN
+		     , MANAGED_DTL_RSN
+		     , DATE_FORMAT(MANAGED_DT, '%Y-%m-%d') AS MANAGED_DT
+		     , SECEDE_RSN
+		     , SECEDE_DTL_RSN
+		     , DATE_FORMAT(SECEDE_DT, '%Y-%m-%d') AS SECEDE_DT
+		     <if test="searchDateGb == 'joinDt'">
+		     , ROW_NUMBER() OVER(ORDER BY JOIN_DT DESC)     AS NUMB
+		     </if>
+		     <if test="searchDateGb == 'loginLdt'">
+		     , ROW_NUMBER() OVER(ORDER BY LOGIN_LDT DESC)   AS NUMB
+		     </if>
+		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="mkAgreeYn != null and mkAgreeYn != ''">
+		AND   MK_AGREE_YN = #{mkAgreeYn}
+		</if>
+		<if test="snsType != null and snsType != ''">
+		AND  SNS_TYPE = #{snsType}
+		</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(#{email}),'%')
+		</if>
+		<if test="custId != null and custId != ''">
+		AND    CUST_ID = #{custId}
+		</if>
+		<if test="condition != null and condition != ''">
+			<choose>
+				<when test="search != null and search == 'custId'">
+					AND
+					<foreach collection="conditions" item="item" index="index" separator="or">
+						UPPER(CUST_ID) LIKE CONCAT('%',UPPER(#{item}),'%')
+					</foreach>
+				</when>
+				<when test="search != null and search == 'custNm'">
+					AND
+					<foreach collection="conditions" item="item" index="index" separator="or">
+						UPPER(CUST_NM) LIKE CONCAT('%',UPPER(#{item}),'%')
+					</foreach>
+				</when>
+				<when test="search != null and search == 'email'">
+					AND
+					<foreach collection="conditions" item="item" index="index" separator="or">
+						UPPER(EMAIL) LIKE CONCAT('%',UPPER(#{item}),'%')
+					</foreach>
+				</when>
+			</choose>
+		</if>
+		
+	</select>
+	
+	<!-- 탈퇴회원목록 엑셀 -->
+	<select id="getCustomerSecedeExcelList" parameterType="CustomerSearch" resultType="Customer">
+		/* TsaCustomer.getCustomerSecedeExcelList */
+		SELECT CUST_NO
+		     , CUST_ID
+		     , CUST_NM
+		     , BIRTH_YMD
+		     , CELL_PHNNO
+		     , EMAIL
+		     , SEX_GB
+		     , FN_GET_CODE_NM('G000', SITE_CD) AS SITE_CD
+		     , SECEDE_RSN
+		     , SECEDE_DTL_RSN
+		     , DATE_FORMAT(SECEDE_DT, '%Y-%m-%d') AS SECEDE_DT
+		     , ROW_NUMBER() OVER(ORDER BY SECEDE_DT DESC)   AS NUMB
+		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 == 'custId'">
+		AND    LOWER(CUST_ID) 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="getCustomerDormantExcelList" parameterType="CustomerSearch" resultType="Customer">
+		/* TsaCustomer.getCustomerDormantExcelList */
+		SELECT CUST_NO
+		     , FN_GET_CODE_NM('G000', SITE_CD) AS SITE_CD
+		     , CUST_ID
+		     , CUST_NM
+		     , CELL_PHNNO
+		     , EMAIL
+		     , BIRTH_YMD
+		     , SEX_GB
+		     , DATE_FORMAT(DORMANT_DT, '%Y-%m-%d') AS DORMANT_DT
+		     , ROW_NUMBER() OVER(ORDER BY DORMANT_DT DESC)   AS NUMB
+		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 == 'custId'">
+		AND    LOWER(CUST_ID) 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>
+	
 </mapper>

+ 10 - 1
src/main/webapp/WEB-INF/views/customer/CustomerActiveListForm.html

@@ -156,6 +156,8 @@
 				</li>
 			</ul>
 		</div>
+		
+		<a href="javascript:void(0);" id="ExcelList" style="display: none;">엑셀다운로드</a>
 		</form>
 	</div>
 </div>
@@ -330,7 +332,14 @@
 
 	// 엑셀다운로드
 	$('#btnExcel').on('click', function() {
-		gagaAgGrid.exportToExcel('활동회원 목록', gridOptions);
+		var formId = '#custActiveForm';
+		if (gridOptions.api.getDisplayedRowCount() <= 0){
+			mcxDialog.alert("조회된 데이터가 없습니다.<br/>다시 조회 후 다운로드 받으세요.");
+			return;
+		}
+		
+		var params =  $(formId).serialize();
+		$('#ExcelList').attr({ href : '/customer/active/excel/list?' + params }).get(0).click();
 	});
 	
 	$(document).ready(function() {

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

@@ -106,6 +106,7 @@
 				</ul>
 			</div>
 			<!-- //리스트 영역 -->
+			<a href="javascript:void(0);" id="ExcelList" style="display: none;">엑셀다운로드</a>
 		</form>
 	</div>
 </div>
@@ -268,7 +269,14 @@
 
 	// 엑셀다운로드
 	$('#btnExcel').on('click', function() {
-		gagaAgGrid.exportToExcel('휴면회원 목록', gridOptions);
+		var formId = '#custDormantForm';
+		if (gridOptions.api.getDisplayedRowCount() <= 0){
+			mcxDialog.alert("조회된 데이터가 없습니다.<br/>다시 조회 후 다운로드 받으세요.");
+			return;
+		}
+		
+		var params =  $(formId).serialize();
+		$('#ExcelList').attr({ href : '/customer/dormant/excel/list?' + params }).get(0).click();
 	});
 	
 	$(document).ready(function() {

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

@@ -112,6 +112,7 @@
 			</ul>
 		</div>
 		<!-- //리스트 영역 -->
+		<a href="javascript:void(0);" id="ExcelList" style="display: none;">엑셀다운로드</a>
 	</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>
@@ -272,7 +273,14 @@
 
 	// 엑셀다운로드
 	$('#btnExcel').on('click', function() {
-		gagaAgGrid.exportToExcel('탈퇴회원 목록', gridOptions);
+		var formId = '#custSecedeForm';
+		if (gridOptions.api.getDisplayedRowCount() <= 0){
+			mcxDialog.alert("조회된 데이터가 없습니다.<br/>다시 조회 후 다운로드 받으세요.");
+			return;
+		}
+		
+		var params =  $(formId).serialize();
+		$('#ExcelList').attr({ href : '/customer/secede/excel/list?' + params }).get(0).click();
 	});
 	
 	$(document).ready(function() {

+ 4 - 0
src/main/webapp/WEB-INF/views/system/UserForm.html

@@ -204,6 +204,10 @@
 		$('#searchForm')[0].reset();
 		$('#searchForm input[name=supplyCompList]').val('');
 		$('#supplyCompTxt').html('');
+		
+		// 2021.12.08 card007 초기화 버튼 입점벤더 처리 추가
+		$('#searchForm input[name=supplyVendorCd]').val('');
+		$('#searchForm input[name=supplyVendorNm]').val('');
 	});
 	
 	// 조회