Prechádzať zdrojové kódy

Merge branch 'develop' into order

card007 5 rokov pred
rodič
commit
3fc7a8ac90

+ 0 - 365
src/main/java/com/style24/admin/biz/dao/TsaCouponDao.java

@@ -1,365 +0,0 @@
-package com.style24.admin.biz.dao;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import com.style24.persistence.domain.*;
-import org.springframework.stereotype.Component;
-
-import com.style24.core.support.annotation.ShopDs;
-import org.springframework.stereotype.Component;
-
-/**
- * 쿠폰 DAO
- * @author xyzp1539
- * @since  2021-01-11
- */
-@ShopDs
-@Component
-public interface TsaCouponDao {
-
-	/**
-	 * 쿠폰 리스트 조회
-	 * @param  param
-	 * @return ArrayList<Coupon>
-	 * @author xyzp1539
-	 * @since 2020-12-22
-	 */
-	ArrayList<Coupon> getCouponList(Coupon param);
-
-	/**
-	 * 쿠폰 리스트 카운트 조회
-	 * @param  param
-	 * @return int
-	 * @author xyzp1539
-	 * @since 2020-12-22
-	 */
-	int getCouponListCnt(Coupon param);
-
-	/**
-	 * 쿠폰 등록
-	 * @param params
-	 * @author xyzp1539
-	 * @since  2021-01-12
-	 */
-	void couponInsert(Coupon params);
-
-	/**
-	 * 쿠폰조회 목록
-	 * @param coupon - 쿠폰 정보
-	 * @return
-	 * @author gagamel
-	 * @since 2021. 1. 8
-	 */
-	Collection<Coupon> getCouponRetrieveList(Coupon coupon);
-
-	/**
-	 * 쿠폰 적용대상 등록
-	 * @param supplyComp
-	 * @author xyzp1539
-	 * @since  2021-01-14
-	 */
-	void saveCouponRefVal(CouponRefval supplyComp);
-
-	/**
-	 * 쿠폰 입점업체 분담 등록
-	 * @param burden
-	 * @author xyzp1539
-	 * @since  2021-01-14
-	 */
-	void saveCouponBurden(CouponBurden burden);
-
-	/**
-	 * 자사브랜드 조회
-	 * @param
-	 * @author xyzp1539
-	 * @since  2021-01-14
-	 */
-    Collection<CommonCode> getSelfBrandList();
-
-	/**
-	 * 쿠폰 상세 조회
-	 * @param  cpnId
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-15
-	 */
-    Coupon getCouponDetail(int cpnId);
-
-	/**
-	 * 쿠폰 발급개수 조회
-	 * @param  cpnId
-	 * @return int
-	 * @author xyzp1539
-	 * @since 2021-01-15
-	 */
-	int getCouponIssueCnt(int cpnId);
-
-	/**
-	 * 쿠폰 적용 대상 - 제외상품
-	 * @param  cpnRefval
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	ArrayList<CouponRefval> getCouponRefvalExceptGoodsList(CouponRefval cpnRefval);
-
-	/**
-	 * 쿠폰 적용 대상 - 브랜드
-	 * @param cpnRefval
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	ArrayList<CouponRefval> getCouponRefvalBrandList(CouponRefval cpnRefval);
-
-	/**
-	 * 쿠폰 적용 대상 - 카테고리
-	 * @param cpnRefval
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	ArrayList<CouponRefval> getCouponRefvalCategoryList(CouponRefval cpnRefval);
-
-	/**
-	 * 쿠폰 적용 대상 - 적용/제외상품
-	 * @param  cpnRefval
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	ArrayList<CouponRefval> getCouponRefvalGoodsList(CouponRefval cpnRefval);
-
-	/**
-	 * 쿠폰 적용 대상 - 공급처
-	 * @param cpnRefval
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	ArrayList<CouponRefval> getCouponRefvalSupplyCompList(CouponRefval cpnRefval);
-
-	/**
-	 * 쿠폰 입점업쳅 분담율 조회
-	 * @param cpnId
-	 * @return  Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	ArrayList<Coupon> getCouponBurdenList(int cpnId);
-
-	/**
-	 * 쿠폰 적용대상 삭제
-	 * @param  couponRefval
-	 * @return
-	 * @author xyzp1539
-	 * @since 2021-01-19
-	 */
-    void updateCouponRefval(CouponRefval couponRefval);
-
-    /**
-     * 고객 쿠폰 발행
-     * @param  custPub
-     * @return
-     * @author xyzp1539
-     * @since 2021-01-21
-     */
-	void saveCouponCustPub(CustCoupon custPub);
-
-	/**
-	 * 특정 쿠폰 발급받은 고객 조회
-	 * @param  custCoupon
-	 * @return
-	 * @author xyzp1539
-	 * @since 2021-01-21
-	 */
-	ArrayList<CustCoupon> getCouponIssueCustList(CustCoupon custCoupon);
-
-	/**
-	 * 발급받은 쿠폰 유효기간 변경
-	 * @param
-	 * @return
-	 * @author xyzp1539
-	 * @since 2021-01-21
-	 */
-	void updateCustCouponAvailEddt(CustCoupon issueCust);
-
-	/**
-	 * 난수, 시리얼 쿠폰 등록
-	 * @param param
-	 * @author xodud1202
-	 * @since 2021. 01. 26
-	 */
-	void createRandomCouponInfo(Coupon param);
-
-	/**
-	 * 동일 쿠폰명이 같은 기간에 존재하는지 확인
-	 * @param param
-	 * @author xodud1202
-	 * @since 2021. 01. 26
-	 */
-	int getSerialOverlapCheck(Coupon param);
-
-	/**
-	 * 동일 쿠폰명이 존재하는지 확인
-	 * @param param
-	 * @author xodud1202
-	 * @since 2021. 01. 27
-	 */
-	int getRandomCouponNmCnt(String param);
-
-	/**
-	 * 동일 쿠폰명이 존재하는지 확인
-	 * @param cpnId
-	 * @author xodud1202
-	 * @since 2021. 01. 26
-	 */
-	ArrayList<CustCoupon> getRandomCouponInfo(int cpnId);
-
-	/**
-	 * 쿠폰사용가능고객등급
-	 * @param params
-	 * @author bin2107
-	 * @since 2021. 02. 02
-	 */
-	void createCouponCustGubun(Coupon params);
-
-	/**
-	 * 쿠폰사용가능고객등급
-	 * @param params
-	 * @author bin2107
-	 * @since 2021. 02. 02
-	 */
-	void createCouponCustGrade(Coupon params);
-
-	/**
-	 * 쿠폰사용가능결제수단
-	 * @param params
-	 * @author bin2107
-	 * @since 2021. 02. 02
-	 */
-	void createCouponPayType(Coupon params);
-
-	/**
-	 * 쿠폰사용가능고객구분 조회
-	 * @param cpnId
-	 * @author bin2107
-	 * @since 2021. 02. 02
-	 */
-	ArrayList<Coupon> getCouponCustGbList(int cpnId);
-
-	/**
-	 * 쿠폰사용가능고객등급 조회
-	 * @param cpnId
-	 * @author bin2107
-	 * @since 2021. 02. 02
-	 */
-	ArrayList<Coupon> getCouponCustGradeList(int cpnId);
-
-	/**
-	 * 쿠폰사용가능결제수단 조회
-	 * @param cpnId
-	 * @author bin2107
-	 * @since 2021. 02. 02
-	 */
-	ArrayList<Coupon> getCouponPayTypeList(int cpnId);
-
-	/**
-	 * 쿠폰발급받은 회원리스트 팝업
-	 * @param
-	 * @return
-	 * @author bin2107
-	 * @since 2021-02-03
-	 */
-	Collection<Coupon> getCpnPubCustList(int cpnId);
-
-	/**
-	 * 선착순 쿠폰 저장
-	 * @param couponLimitedTime
-	 * @author bin2107
-	 * @since 2021. 02. 04
-	 */
-	void createLimitedTimeCoupon(CouponLimitedTime couponLimitedTime);
-
-	/**
-	 * 선착순쿠폰 조회
-	 * @param cpnId
-	 * @author bin2107
-	 * @since 2021. 02. 05
-	 */
-	ArrayList<Coupon> getLimitedTimeCouponList(int cpnId);
-
-	/**
-	 * 선착순 쿠폰 삭제
-	 * @param couponLimitedTime
-	 * @author bin2107
-	 * @since 2021. 02. 05
-	 */
-	void updateLimitedTimeCouponList(CouponLimitedTime couponLimitedTime);
-
-	/**
-	 * 쿠폰 상태 변경
-	 * @param
-	 * @author bin2107
-	 * @since 2021. 2. 5
-	 */
-	void updateCouponStat(Coupon coupon);
-
-	/**
-	 * 쿠폰 마스터 수정
-	 * @param
-	 * @author bin2107
-	 * @since 2021. 2. 5
-	 */
-	void updateCouponMstInfo(Coupon coupon);
-
-	/**
-	 * 쿠폰 회원 구분 수정
-	 * @param
-	 * @author bin2107
-	 * @since 2021. 2. 5
-	 */
-	void deleteCouponCustGubun(Coupon coupon);
-
-	/**
-	 * 쿠폰 회원 등급 수정
-	 * @param
-	 * @author bin2107
-	 * @since 2021. 2. 5
-	 */
-	void deleteCouponCustGrade(Coupon coupon);
-
-	/**
-	 * 쿠폰 회원 결제 수정
-	 * @param
-	 * @author bin2107
-	 * @since 2021. 2. 5
-	 */
-	void deleteCouponPayType(Coupon coupon);
-
-	/**
-	 * 쿠폰 공급업체,브랜드,상품값 수정
-	 * @param
-	 * @author bin2107
-	 * @since 2021. 2. 5
-	 */
-	void deleteCouponRefVal(Coupon coupon);
-
-	/**
-	 * 쿠폰  입점업체 분담율 수정
-	 * @param
-	 * @author bin2107
-	 * @since 2021. 2. 5
-	 */
-	void deleteCouponBurden(Coupon coupon);
-
-	/**
-	 * 선착순 쿠폰 삭제
-	 * @param
-	 * @author bin2107
-	 * @since 2021. 2. 5
-	 */
-	void deleteLimitedTimeCoupon(Coupon coupon);
-
-}

+ 8 - 0
src/main/java/com/style24/admin/biz/dao/TsaRendererDao.java

@@ -241,4 +241,12 @@ public interface TsaRendererDao {
 	 */
 	Collection<CommonCode> getAflinkList(String afChannel);
 
+	/**
+	 * 자사브랜드 조회
+	 * @param
+	 * @author xyzp1539
+	 * @since  2021-01-14
+	 */
+	Collection<CommonCode> getSelfBrandList();
+
 }

+ 0 - 514
src/main/java/com/style24/admin/biz/service/TsaCouponService.java

@@ -1,514 +0,0 @@
-package com.style24.admin.biz.service;
-
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
-import com.style24.admin.biz.dao.TsaCouponDao;
-import com.style24.admin.support.env.TsaConstants;
-import com.style24.admin.support.security.session.TsaSession;
-import com.style24.core.support.env.TscConstants;
-import com.style24.core.support.message.TscMessageByLocale;
-import com.style24.persistence.domain.*;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Random;
-
-/**
- * 쿠폰 Service
- *
- * @author xyzp1539
- * @since 2021. 01. 11
- */
-@Service
-@Slf4j
-public class TsaCouponService {
-
-	@Autowired
-	private TsaCouponDao couponDao;
-
-	@Autowired
-	private TsaCommonService commonService;
-
-	@Autowired
-	private TscMessageByLocale message;
-
-	/**
-	 * 쿠폰 저장
-	 * @param params
-	 * @author xyzp1539
-	 * @since  2021-01-11
-	 */
-	@Transactional("shopTxnManager")
-	public String saveCoupon(Coupon params){
-		int cpnId = params.getCpnId();		// 쿠폰ID (신규생성인지 수정인지 구분하기 위해 params의 cpnId를 먼저 가져옴 > 쿠폰 생성시 cpnId를 저장하기때문임)
-		params.setRegNo(TsaSession.getInfo().getUserNo());
-		params.setUpdNo(TsaSession.getInfo().getUserNo());
-
-		if(cpnId != 0) {    //수정모드일때
-			couponDao.updateCouponMstInfo(params);	// 쿠폰 마스터 수정
-			couponDao.deleteCouponCustGubun(params);	// 쿠폰 회원 구분 수정
-			couponDao.deleteCouponCustGrade(params);	// 쿠폰 회원 등급 수정
-			couponDao.deleteCouponPayType(params);	// 쿠폰 결제 수단 수정
-			couponDao.deleteCouponRefVal(params);	// 공급업체,브랜드,카테고리,상품 삭제
-			couponDao.deleteCouponBurden(params);	// 입점업체 분담율 삭제
-			couponDao.deleteLimitedTimeCoupon(params);	// 선착순 쿠폰 삭제
-		}else{	//등록모드일때
-			params.setCpnStat("G232_10");
-			couponDao.couponInsert(params);
-		}
-
-		for(int i=0; i<params.getUsableCustGbArr().length; i++){
-			params.setUsableCustGb(params.getUsableCustGbArr()[i]);
-			couponDao.createCouponCustGubun(params);
-		}
-
-		for(int i=0; i<params.getUsableCustGradeArr().length; i++){
-			params.setUsableCustGrade(params.getUsableCustGradeArr()[i]);
-			couponDao.createCouponCustGrade(params);
-		}
-
-		for(int i=0; i<params.getPayTypeArr().length; i++){
-			params.setPayType(params.getPayTypeArr()[i]);
-			couponDao.createCouponPayType(params);
-		}
-
-		// 공급업체 등록
-		for(CouponRefval compRefval : params.getSupplyCompList()){
-			compRefval.setCpnId(params.getCpnId());
-			compRefval.setCpnTarget("G260_13");
-			compRefval.setRefVal(compRefval.getSupplyCompCd());
-			compRefval.setCpnType(params.getCpnType());
-			compRefval.setRegNo(params.getRegNo());
-			compRefval.setUpdNo(params.getUpdNo());
-			couponDao.saveCouponRefVal(compRefval);
-		}
-
-		// 브랜드 등록
-		for(CouponRefval brandRefval : params.getBrandList()){
-			brandRefval.setCpnId(params.getCpnId());
-			brandRefval.setCpnTarget("G260_12");
-			brandRefval.setRefVal(brandRefval.getBrandCd());
-			brandRefval.setCpnType(params.getCpnType());
-			brandRefval.setRegNo(params.getRegNo());
-			brandRefval.setUpdNo(params.getUpdNo());
-			couponDao.saveCouponRefVal(brandRefval);
-		}
-
-		// 적용상품
-		for(CouponRefval applyGoodsRefval : params.getApplyGoodsList()){
-			applyGoodsRefval.setCpnId(params.getCpnId());
-			applyGoodsRefval.setCpnTarget("G260_10");
-			applyGoodsRefval.setRefVal(applyGoodsRefval.getGoodsCd());
-			applyGoodsRefval.setCpnType(params.getCpnType());
-			applyGoodsRefval.setRegNo(params.getRegNo());
-			applyGoodsRefval.setUpdNo(params.getUpdNo());
-			couponDao.saveCouponRefVal(applyGoodsRefval);
-		}
-
-		// 카테고리
-		for(CouponRefval cateRefval : params.getCateList()){
-			cateRefval.setCpnId(params.getCpnId());
-			cateRefval.setCpnTarget("G260_11");
-			cateRefval.setRefVal(cateRefval.getCateNo());
-			cateRefval.setFormalGb(cateRefval.getFormalGb());
-			cateRefval.setBrandCd(cateRefval.getBrandCd());
-			cateRefval.setCpnType(params.getCpnType());
-			cateRefval.setRegNo(params.getRegNo());
-			cateRefval.setUpdNo(params.getUpdNo());
-			couponDao.saveCouponRefVal(cateRefval);
-		}
-
-		// 제외상품
-		for(CouponRefval exceptGoodsRefval : params.getExceptGoodsList()){
-			exceptGoodsRefval.setCpnId(params.getCpnId());
-			exceptGoodsRefval.setCpnTarget("G260_14");
-			exceptGoodsRefval.setRefVal(exceptGoodsRefval.getGoodsCd());
-			exceptGoodsRefval.setCpnType(params.getCpnType());
-			exceptGoodsRefval.setRegNo(params.getRegNo());
-			exceptGoodsRefval.setUpdNo(params.getUpdNo());
-			couponDao.saveCouponRefVal(exceptGoodsRefval);
-		}
-
-		// 입점업체분담율
-		for(CouponBurden couponBurden : params.getBurdenList()){
-			couponBurden.setCpnId(params.getCpnId());
-			couponBurden.setRegNo(params.getRegNo());
-			couponBurden.setUpdNo(params.getUpdNo());
-			couponDao.saveCouponBurden(couponBurden);
-		}
-
-		// 선착순쿠폰
-		for(CouponLimitedTime couponLimitedTime : params.getLimitedTimeCpnList()){
-			couponLimitedTime.setCpnId(params.getCpnId());
-			couponLimitedTime.setRegNo(params.getRegNo());
-			couponLimitedTime.setUpdNo(params.getUpdNo());
-			couponDao.createLimitedTimeCoupon(couponLimitedTime);
-		}
-
-		// 수정모드이고 변경된 쿠폰상태가 대기 , 중지 인경우 고객이 발급받은 내용도 변경
-		if(cpnId != 0 &&
-				(params.getCpnStat().equals("G232_10") || params.getCpnStat().equals("G232_12")) ) {
-
-			CustCoupon custCoupon = new CustCoupon();
-			custCoupon.setCpnId(params.getCpnId());
-			custCoupon.setUseYn("Y");
-			ArrayList<CustCoupon> custList = couponDao.getCouponIssueCustList(custCoupon);
-
-			if(custList != null && custList.size() > 0 ) {
-				for(CustCoupon issueCust : custList) {
-					issueCust.setAvailEddt(params.getAvailEddt());
-					issueCust.setUpdNo(TsaSession.getInfo().getUserNo());
-
-					couponDao.updateCustCouponAvailEddt(issueCust);
-				}
-			}
-		}
-
-		// 시리얼 쿠폰 생성(최초 쿠폰 생성일 경우에만)
-		if(cpnId == 0 && params.getCpnType().equals(TscConstants.CpnType.PAY_CPN.value()) && params.getDcCdGb().equals(TscConstants.DcCdGb.SERIAL.value())) {
-			// 시리얼 쿠폰명이 동일한 쿠폰이 일정 겹치는 부분이 있는지 확인
-			int overlapCheck = couponDao.getSerialOverlapCheck(params);
-			if(overlapCheck < 1) {
-				for(int i = 0 ; i < params.getTotPubLimitQty() ; i++) {
-					couponDao.createRandomCouponInfo(params);
-				}
-			} else {
-				throw new IllegalStateException("같은 시리얼명이 사용되는 쿠폰이 중복됩니다. 기간을 확인해주세요.");
-			}
-		} else if(cpnId == 0 && params.getCpnType().equals(TscConstants.CpnType.PAY_CPN.value()) && params.getDcCdGb().equals(TscConstants.DcCdGb.RANDOM.value())) {
-			Random random = new Random();
-			String prefixRandomCpn = "" + params.getCpnId();		// 랜덤 번호는 쿠폰번호 + 랜덤문자 = 12로 처리함
-			// 랜덤 문자 발급 수 만큼 진행
-			for(int j = 0 ; j < params.getTotPubLimitQty() ; j++) {
-				boolean chk = true;
-				while (chk) {
-					// 대문자+소문자+숫자 조합 10자리 인증번호 생성
-					StringBuilder sb = new StringBuilder();
-					// 쿠폰번호 + 랜덤글자 = 12 글자만큼 생성
-					for (int i = 0; i < 12 - prefixRandomCpn.length(); i++) {
-						int index = random.nextInt(2);
-						switch (index) {
-							case 0:
-								sb.append((char) (random.nextInt(26) + 65));
-								break;
-							case 1:
-								sb.append(random.nextInt(10));
-								break;
-						}
-					}
-
-					// 인증번호 중복 체크
-					int cnt = couponDao.getRandomCouponNmCnt(sb.toString());
-
-					if (cnt == 0) {
-						// 인증번호 설정
-						params.setRdCpnNm(sb.substring(0, 4) + params.getCpnId() + sb.substring(4));
-						couponDao.createRandomCouponInfo(params);
-						chk = false;
-					}
-				}
-			}
-		}
-
-		return "SUCCESS";
-	}
-
-	/**
-	 * 쿠폰 리스트 조회
-	 * @param  param
-	 * @return ArrayList<Coupon>
-	 * @author xyzp1539
-	 * @since 2020-12-22
-	 */
-	public ArrayList<Coupon> getCouponList(Coupon param) {
-		return couponDao.getCouponList(param);
-	}
-
-	/**
-	 * 쿠폰리스트 카운트 조회
-	 * @param  param
-	 * @return int
-	 * @author xyzp1539
-	 * @since 2020-12-22
-	 */
-	public int getCouponListCnt(Coupon param) {
-		return couponDao.getCouponListCnt(param);
-	}
-
-	/**
-	 * 쿠폰조회 목록
-	 * @param coupon - 쿠폰 정보
-	 * @return
-	 * @author gagamel
-	 * @since 2021. 1. 8
-	 */
-	public Collection<Coupon> getCouponRetrieveList(Coupon coupon) {
-		return couponDao.getCouponRetrieveList(coupon);
-	}
-
-	/**
-	 * 쿠폰조회 목록
-	 * @param
-	 * @return
-	 * @author gagamel
-	 * @since 2021. 1. 8
-	 */
-	public Collection<CommonCode> getSelfBrandList() {
-		return couponDao.getSelfBrandList();
-	}
-
-	/**
-	 * 쿠폰 상세 조회
-	 * @param  cpnId
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-15
-	 */
-    public Coupon getCouponDetail(int cpnId) { return couponDao.getCouponDetail(cpnId);}
-
-	/**
-	 * 쿠폰 발급 개수 조회
-	 * @param  cpnId
-	 * @return  cnt
-	 * @author xyzp1539
-	 * @since 2021-01-15
-	 */
-	public int getCouponIssueCnt(int cpnId) {
-		return couponDao.getCouponIssueCnt(cpnId);
-	}
-
-	/**
-	 * 쿠폰 적용 대상 - 제외상품
-	 * @param  cpnId
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	public ArrayList<CouponRefval> getCouponRefvalExceptGoodsList(int cpnId ) {
-		CouponRefval cpnRefval = new CouponRefval();
-		cpnRefval.setCpnId(cpnId);
-		cpnRefval.setCpnTarget("G260_14");
-		return couponDao.getCouponRefvalExceptGoodsList(cpnRefval);
-	}
-
-	/**
-	 * 쿠폰 적용 대상 - 브랜드
-	 * @param cpnId
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	public ArrayList<CouponRefval> getCouponRefvalBrandList(int cpnId ) {
-		CouponRefval cpnRefval = new CouponRefval();
-		cpnRefval.setCpnId(cpnId);
-		cpnRefval.setCpnTarget("G260_12");
-		return couponDao.getCouponRefvalBrandList(cpnRefval);
-	}
-
-	/**
-	 * 쿠폰 적용 대상 - 카테고리
-	 * @param cpnId
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	public ArrayList<CouponRefval> getCouponRefvalCategoryList(int cpnId) {
-		CouponRefval cpnRefval = new CouponRefval();
-		cpnRefval.setCpnId(cpnId);
-		cpnRefval.setCpnTarget("G260_11");
-		return couponDao.getCouponRefvalCategoryList(cpnRefval);
-	}
-
-	/**
-	 * 쿠폰 적용 대상 - 적용상품
-	 * @param  cpnId
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	public ArrayList<CouponRefval> getCouponRefvalGoodsList(int cpnId , String cpnTarget) {
-		CouponRefval cpnRefval = new CouponRefval();
-		cpnRefval.setCpnId(cpnId);
-		cpnRefval.setCpnTarget(cpnTarget);
-		return couponDao.getCouponRefvalGoodsList(cpnRefval);
-	}
-
-	/**
-	 * 쿠폰 적용 대상 - 공급처
-	 * @param cpnId
-	 * @return Coupon
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	public ArrayList<CouponRefval> getCouponRefvalSupplyCompList(int cpnId) {
-		CouponRefval cpnRefval = new CouponRefval();
-		cpnRefval.setCpnId(cpnId);
-		cpnRefval.setCpnTarget("G260_13");
-		return couponDao.getCouponRefvalSupplyCompList(cpnRefval);
-	}
-
-	/**
-	 * 쿠폰 입점업체 분담율 조회
-	 * @param  
-	 * @return 
-	 * @author xyzp1539
-	 * @since 2021-01-18
-	 */
-	public ArrayList<Coupon> getCouponBurdenList(int cpnId) {
-		return couponDao.getCouponBurdenList(cpnId);
-	}
-
-	/**
-	 * 쿠폰 적용대상 삭제
-	 * @param   couponRefval
-	 * @return
-	 * @author xyzp1539
-	 * @since 2021-01-19
-	 */
-	@Transactional("shopTxnManager")
-	public void updateCouponRefval(CouponRefval couponRefval) {
-		couponRefval.setUpdNo(TsaSession.getInfo().getUserNo());
-		couponDao.updateCouponRefval(couponRefval);
-	}
-
-	/**
-	 * 고객 쿠폰
-	 * @param
-	 * @return
-	 * @author xyzp1539
-	 * @since 2021-01-21
-	 */
-	@Transactional("shopTxnManager")
-	public void saveCouponCustPub(CustCoupon custCoupon) {
-		Gson gson = new Gson();
-
-		Collection<CustCoupon> custPubList = gson.fromJson(custCoupon.getCustList() , new TypeToken<Collection<CustCoupon>>(){}.getType());
-		for(CustCoupon custPub : custPubList ) {
-			custPub.setCpnId(custCoupon.getCpnId());
-			custPub.setAvailStdt(custCoupon.getAvailStdt());
-			custPub.setAvailEddt(custCoupon.getAvailEddt());
-			custPub.setPubReason(custCoupon.getPubReason());
-			custPub.setPubReasonDtl(custCoupon.getPubReasonDtl());
-			custPub.setEndAlimSendYn(custCoupon.getEndAlimSendYn());
-			custPub.setRegNo(TsaSession.getInfo().getUserNo());
-			custPub.setUpdNo(TsaSession.getInfo().getUserNo());
-
-			couponDao.saveCouponCustPub(custPub);
-		}
-	}
-
-	/**
-	 * 랜덤쿠폰 생성 리스트 조회
-	 * @param
-	 * @return
-	 * @author xodud1202
-	 * @since 2021-01-26
-	 */
-	public ArrayList<CustCoupon> getRandomCouponInfo(int cpnId) {
-		return couponDao.getRandomCouponInfo(cpnId);
-	}
-
-	/**
-	 * 회원상세 - 쿠폰발급
-	 * @param coupon - 쿠폰정보
-	 * @author jsshin
-	 * @since 2021. 1. 29
-	 */
-	@Transactional("shopTxnManager")
-	public void saveCouponIssue(CustCoupon coupon) {
-		couponDao.saveCouponCustPub(coupon);
-	}
-
-	/**
-	 * 쿠폰사용가능고객구분 조회
-	 * @param
-	 * @return
-	 * @author bin2107
-	 * @since 2021-02-02
-	 */
-	public ArrayList<Coupon> getCouponCustGbList(int cpnId) {
-		return couponDao.getCouponCustGbList(cpnId);
-	}
-
-	/**
-	 * 쿠폰사용가능고객등급 조회
-	 * @param
-	 * @return
-	 * @author bin2107
-	 * @since 2021-02-02
-	 */
-	public ArrayList<Coupon> getCouponCustGradeList(int cpnId) {
-		return couponDao.getCouponCustGradeList(cpnId);
-	}
-
-	/**
-	 * 쿠폰사용가능결제수단 조회
-	 * @param
-	 * @return
-	 * @author bin2107
-	 * @since 2021-02-02
-	 */
-	public ArrayList<Coupon> getCouponPayTypeList(int cpnId) {
-		return couponDao.getCouponPayTypeList(cpnId);
-	}
-
-	/**
-	 * 쿠폰발급받은 회원리스트 팝업
-	 * @param
-	 * @return
-	 * @author bin2107
-	 * @since 2021-02-03
-	 */
-	public Collection<Coupon> getCpnPubCustList(int cpnId) {
-		return couponDao.getCpnPubCustList(cpnId);
-	}
-
-	/**
-	 * 선착순쿠폰 조회
-	 * @param
-	 * @return
-	 * @author bin2107
-	 * @since 2021-02-05
-	 */
-	public ArrayList<Coupon> getLimitedTimeCouponList(int cpnId) {
-		return couponDao.getLimitedTimeCouponList(cpnId);
-	}
-
-	/**
-	 * 선착순쿠폰 삭제
-	 *
-	 * @param
-	 * @return
-	 * @author bin2107
-	 * @since 2021. 2. 5
-	 */
-	@Transactional("shopTxnManager")
-	public void updateLimitedTimeCouponList(CouponLimitedTime couponLimitedTime) {
-		if (couponLimitedTime == null || (couponLimitedTime.getArrLimitCpnId() == null && couponLimitedTime.getArrLimitCpnId().length <= 0)) {
-			throw new IllegalStateException(message.getMessage("FAIL_1001"));
-		}
-
-		couponLimitedTime.setRegNo(TsaSession.getInfo().getUserNo());
-		couponLimitedTime.setUpdNo(TsaSession.getInfo().getUserNo());
-
-		if (couponLimitedTime.getArrLimitCpnId().length > 0) {
-			couponDao.updateLimitedTimeCouponList(couponLimitedTime);
-		}
-	}
-
-	/**
-	 * 쿠폰 상태 변경
-	 * @param
-	 * @author bin2107
-	 * @since 2021. 2. 5
-	 */
-	@Transactional("shopTxnManager")
-	public void updateCouponStat(Coupon coupon) {
-		coupon.setUpdNo(TsaSession.getInfo().getUserNo());
-		couponDao.updateCouponStat(coupon);
-	}
-}

+ 10 - 0
src/main/java/com/style24/admin/biz/service/TsaRendererService.java

@@ -555,4 +555,14 @@ public class TsaRendererService {
 		return rendererDao.getAflinkList(afChannel);
 	}
 
+	/**
+	 * 자사브랜드 조회
+	 * @param
+	 * @return
+	 * @author gagamel
+	 * @since 2021. 1. 8
+	 */
+	public Collection<CommonCode> getSelfBrandList() {
+		return rendererDao.getSelfBrandList();
+	}
 }

+ 1 - 0
src/main/java/com/style24/admin/biz/web/TsaDisplayController.java

@@ -333,6 +333,7 @@ public class TsaDisplayController extends TsaBaseController {
 	public GagaMap getCategoryGoodsList(@RequestBody CategoryGoods categoryGoods) {
 		GagaMap result = new GagaMap();
 
+		log.info("getCategoryGoodsList categoryGoods::{}",categoryGoods);
 		categoryGoods.setRegNo(TsaSession.getInfo().getUserNo());	//엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 		categoryGoods.setPageable(new TscPageRequest(categoryGoods.getPageNo() - 1, categoryGoods.getPageSize()));
 		categoryGoods.getPageable().setTotalCount(displayService.getCategoryGoodsListCount(categoryGoods));

+ 4 - 0
src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -985,10 +985,14 @@ public class TsaGoodsController extends TsaBaseController {
 				if (goodsImgInfo.getDefaultImgYn().equals("Y")) {
 					mav.addObject("defaultImgOrd", goodsImgInfo.getDispOrd());
 				}
+				if (goodsImgInfo.getMouseoverImgYn() .equals("Y")) {
+					mav.addObject("mouseoverImgOrd", goodsImgInfo.getDispOrd());
+				}
 			}
 		} else { // 대표이미지와 마우스오버이미지가 없으면
 			mav.addObject("goodsImgList", new ArrayList<GoodsImg>());
 			mav.addObject("defaultImgOrd", "1");
+			mav.addObject("mouseoverImgOrd", "1");
 		}
 
 		mav.addObject("goodsImg", goodsImg);

+ 35 - 31
src/main/java/com/style24/admin/biz/web/TsaMarketingController.java

@@ -6,6 +6,7 @@ import java.util.Calendar;
 import java.util.Collection;
 import java.util.Date;
 
+import com.style24.core.biz.service.TscCouponService;
 import com.style24.persistence.domain.*;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,7 +23,6 @@ import org.springframework.web.servlet.ModelAndView;
 
 import com.style24.admin.biz.service.TsaCardPromotionService;
 import com.style24.admin.biz.service.TsaCommonService;
-import com.style24.admin.biz.service.TsaCouponService;
 import com.style24.admin.biz.service.TsaFreegiftPromotionService;
 import com.style24.admin.biz.service.TsaMorebetterService;
 import com.style24.admin.biz.service.TsaPlanService;
@@ -70,9 +70,6 @@ public class TsaMarketingController extends TsaBaseController {
 	@Autowired
 	private TsaMorebetterService morebetterService;
 
-	@Autowired
-	private TsaCouponService couponService;
-
 	@Autowired
 	private TsaReviewService reviewService;
 
@@ -88,6 +85,8 @@ public class TsaMarketingController extends TsaBaseController {
 	@Autowired
 	private TsaPlanService planService;
 
+	@Autowired
+	private TscCouponService coreCouponService;
 
 	/**
 	 * 상품평관리 화면
@@ -338,8 +337,8 @@ public class TsaMarketingController extends TsaBaseController {
 	public GagaMap getCouponList(@RequestBody Coupon param) {
 		GagaMap result = new GagaMap();
 
-		ArrayList<Coupon> cpnList = couponService.getCouponList(param);
-		int cpnTotCnt = couponService.getCouponListCnt(param);
+		ArrayList<Coupon> cpnList = coreCouponService.getCouponList(param);
+		int cpnTotCnt = coreCouponService.getCouponListCnt(param);
 
 		param.setRegNo(TsaSession.getInfo().getUserNo()); // 엑셀조회시 로그인 사용자의 엑셀 상품조회시 사용
 		param.setPageable(new TscPageRequest(param.getPageNo() - 1, param.getPageSize()));
@@ -413,7 +412,7 @@ public class TsaMarketingController extends TsaBaseController {
 		// 카테고리 구분 조회
 		mav.addObject("cateGbList", rendererService.getCommonCodeList("G032"));
 		// 자사 브랜드 조회
-		mav.addObject("selfBrandList", couponService.getSelfBrandList());
+		mav.addObject("selfBrandList", rendererService.getSelfBrandList());
 		// 사이트코드 조회
 		mav.addObject("siteCdList", rendererService.getCommonCodeList("G000"));
 		// 쿠폰상태 조회
@@ -440,31 +439,31 @@ public class TsaMarketingController extends TsaBaseController {
 		// 이미 쿠폰 아이디가 있으면 적용대상 조회
 		if (cpnId != 0) {
 			mode = "U";
-			issueCnt = couponService.getCouponIssueCnt(cpnId);
+			issueCnt = coreCouponService.getCouponIssueCnt(cpnId);
 			// 쿠폰상세조회
-			mav.addObject("cpnDetail", couponService.getCouponDetail(cpnId));
+			mav.addObject("cpnDetail", coreCouponService.getCouponDetail(cpnId));
 			// 쿠폰적용대상 - 공급업체 조회
-			mav.addObject("cpnDtlRefvalSupplyCompList", couponService.getCouponRefvalSupplyCompList(cpnId));
+			mav.addObject("cpnDtlRefvalSupplyCompList", coreCouponService.getCouponRefvalSupplyCompList(cpnId));
 			// 쿠폰적용대상 - 적용상품 조회
-			mav.addObject("cpnDtlRefvalApplyGoodsList", couponService.getCouponRefvalGoodsList(cpnId, "G260_10"));
+			mav.addObject("cpnDtlRefvalApplyGoodsList", coreCouponService.getCouponRefvalGoodsList(cpnId, "G260_10"));
 			// 쿠폰적용대상 - 카테고리 조회
-			mav.addObject("cpnDtlRefvalCateList", couponService.getCouponRefvalCategoryList(cpnId));
+			mav.addObject("cpnDtlRefvalCateList", coreCouponService.getCouponRefvalCategoryList(cpnId));
 			// 쿠폰적용대상 - 브랜드 조회
-			mav.addObject("cpnDtlRefvalBrandList", couponService.getCouponRefvalBrandList(cpnId));
+			mav.addObject("cpnDtlRefvalBrandList", coreCouponService.getCouponRefvalBrandList(cpnId));
 			// 쿠폰적용대상 - 제외상품 조회
-			mav.addObject("cpnDtlRefvalExceptGoodsList", couponService.getCouponRefvalGoodsList(cpnId, "G260_14"));
+			mav.addObject("cpnDtlRefvalExceptGoodsList", coreCouponService.getCouponRefvalGoodsList(cpnId, "G260_14"));
 			// 쿠폰 입점업체분담율 조회
-			mav.addObject("cpnDtlBurdenList", couponService.getCouponBurdenList(cpnId));
+			mav.addObject("cpnDtlBurdenList", coreCouponService.getCouponBurdenList(cpnId));
 			// 시리얼 및 난수 쿠폰 조회
-			mav.addObject("randomCpnList", couponService.getRandomCouponInfo(cpnId));
+			mav.addObject("randomCpnList", coreCouponService.getRandomCouponInfo(cpnId));
 			// 쿠폰사용가능고객구분 조회
-			mav.addObject("cpnCustGbList", couponService.getCouponCustGbList(cpnId));
+			mav.addObject("cpnCustGbList", coreCouponService.getCouponCustGbList(cpnId));
 			// 쿠폰사용가능고객등급 조회
-			mav.addObject("cpnCustGradeList", couponService.getCouponCustGradeList(cpnId));
+			mav.addObject("cpnCustGradeList", coreCouponService.getCouponCustGradeList(cpnId));
 			// 쿠폰사용가능결제수단 조회
-			mav.addObject("cpnPayTypeList", couponService.getCouponPayTypeList(cpnId));
+			mav.addObject("cpnPayTypeList", coreCouponService.getCouponPayTypeList(cpnId));
 			// 선착순쿠폰 조회
-			mav.addObject("limitedTimeCpnList", couponService.getLimitedTimeCouponList(cpnId));
+			mav.addObject("limitedTimeCpnList", coreCouponService.getLimitedTimeCouponList(cpnId));
 		}
 
 		//issueCnt = 3;
@@ -487,8 +486,9 @@ public class TsaMarketingController extends TsaBaseController {
 	@ResponseBody
 	public GagaResponse saveCoupon(@RequestBody Coupon coupon) {
 		log.info("couponSave : {}", coupon);
-
-		String result = couponService.saveCoupon(coupon);
+		coupon.setRegNo(TsaSession.getInfo().getUserNo());
+		coupon.setUpdNo(TsaSession.getInfo().getUserNo());
+		String result = coreCouponService.saveCoupon(coupon);
 		if(!"SUCCESS".equals(result)) {
 			return super.error(message.getMessage(result));
 		}
@@ -507,8 +507,8 @@ public class TsaMarketingController extends TsaBaseController {
 	@ResponseBody
 	public GagaResponse updateCouponRefval(@RequestBody CouponRefval CouponRefval) {
 		log.info("couponSave : {}", CouponRefval);
-
-		couponService.updateCouponRefval(CouponRefval);
+		CouponRefval.setUpdNo(TsaSession.getInfo().getUserNo());
+		coreCouponService.updateCouponRefval(CouponRefval);
 
 		return super.ok(message.getMessage("SUCC_0001"));
 	}
@@ -589,8 +589,9 @@ public class TsaMarketingController extends TsaBaseController {
 	@PostMapping("/coupon/insertCustPub")
 	@ResponseBody
 	public GagaResponse saveCouponCustPub(@RequestBody CustCoupon custCoupon) {
-		couponService.saveCouponCustPub(custCoupon);
-
+		custCoupon.setRegNo(TsaSession.getInfo().getUserNo());
+		custCoupon.setUpdNo(TsaSession.getInfo().getUserNo());
+		coreCouponService.saveCouponCustPub(custCoupon);
 		return super.ok(message.getMessage("SUCC_0006"));
 
 	}
@@ -908,7 +909,7 @@ public class TsaMarketingController extends TsaBaseController {
 	public ModelAndView couponPubCustListPopup(@RequestParam(value = "cpnId", required = true)int cpnId) {
 		ModelAndView mav = new ModelAndView();
 
-		mav.addObject("cpnPubCustList", couponService.getCpnPubCustList(cpnId));
+		mav.addObject("cpnPubCustList", coreCouponService.getCpnPubCustList(cpnId));
 
 		mav.setViewName("marketing/CouponPubCustListPopupForm");
 		return mav;
@@ -925,7 +926,9 @@ public class TsaMarketingController extends TsaBaseController {
 	@PostMapping("/coupon/limitedtime/coupon/update")
 	@ResponseBody
 	public GagaResponse updateLimitedTimeCouponList(@RequestBody CouponLimitedTime couponLimitedTime) {
-		couponService.updateLimitedTimeCouponList(couponLimitedTime);
+		couponLimitedTime.setRegNo(TsaSession.getInfo().getUserNo());
+		couponLimitedTime.setUpdNo(TsaSession.getInfo().getUserNo());
+		coreCouponService.updateLimitedTimeCouponList(couponLimitedTime);
 		return super.ok(message.getMessage("SUCC_0003"));
 	}
 
@@ -940,7 +943,8 @@ public class TsaMarketingController extends TsaBaseController {
 	@PostMapping("/marketing/coupon/changeStat")
 	public GagaResponse updateCouponStat(@RequestBody Coupon coupon) {
 		try {
-			couponService.updateCouponStat(coupon);
+			coupon.setUpdNo(TsaSession.getInfo().getUserNo());
+			coreCouponService.updateCouponStat(coupon);
 		} catch (Exception e) {
 			e.printStackTrace();
 			return super.error(message.getMessage("FAIL_0001"));
@@ -996,7 +1000,7 @@ public class TsaMarketingController extends TsaBaseController {
 	@PostMapping("/coupon/retrieve/list")
 	@ResponseBody
 	public Collection<Coupon> getCouponRetrieveList(@RequestBody Coupon coupon) {
-		return couponService.getCouponRetrieveList(coupon);
+		return coreCouponService.getCouponRetrieveList(coupon);
 	}
 
 	/**
@@ -1097,7 +1101,7 @@ public class TsaMarketingController extends TsaBaseController {
 		Integer userNo = TsaSession.getInfo().getUserNo();
 		custCoupon.setRegNo(userNo);
 		custCoupon.setUpdNo(userNo);
-		couponService.saveCouponIssue(custCoupon);
+		coreCouponService.saveCouponIssue(custCoupon);
 		return super.ok(message.getMessage("SUCC_0006"));
 	}
 

+ 2 - 0
src/main/java/com/style24/persistence/domain/GoodsImg.java

@@ -19,9 +19,11 @@ public class GoodsImg extends TscBaseDomain {
 	private String orgImgNm;
 	private String sysImgNm;
 	private String defaultImgYn;
+	private String mouseoverImgYn;
 	private String colorNm;
 	private String mode;
 	private int defaultImgOrd;
+	private int mouseoverImgOrd;
 	private String sysImgUrl;
 	private int brandNo;
 

+ 0 - 964
src/main/java/com/style24/persistence/mybatis/shop/TsaCoupon.xml

@@ -1,964 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!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.TsaCouponDao">
-	<!-- 쿠폰리스트 조회 -->
-	<select id="getCouponList" parameterType="Coupon" resultType="Coupon">
-		/* TsaCoupon.getCouponList */
-		SELECT T.*
-			 , COUNT(CUST_CPN_SQ) AS ISSUE_CNT
-			 , COUNT(USED_DT) AS USE_CNT
-		 FROM (
-				SELECT SITE_CD
-					 , CPN_ID
-					 , CPN_NM
-					 , CPN_TYPE
-					 , DC_WAY
-					 , DC_PVAL
-					 , DC_MVAL
-					 , MAX_DC_AMT
-					 , PD_GB
-					 , AVAIL_STDT
-					 , AVAIL_EDDT
-				     , AVAIL_DAYS
-					 , FN_GET_USER_NM(REG_NO) AS REG_NM
-					 , REG_DT
-				  FROM TB_COUPON
-				 WHERE 1=1
-				<if test="siteCd != null and siteCd != ''">
-				   AND SITE_CD = #{siteCd}
-				</if>
-				<if test="cpnId != null and cpnId != ''">
-				   AND CPN_ID = #{cpnId}
-				</if>
-				<if test="cpnType != null and cpnType != ''">
-				   AND CPN_TYPE = #{cpnType}
-				</if>
-				<if test="regNo != null and regNo != ''">
-				   AND REG_NO = #{regNo}
-				</if>
-				<if test="dcWay != null and dcWay != ''">
-				   AND DC_WAY = #{dcWay}
-				</if>
-				<if test="cpnNm != null and cpnNm != ''">
-				   AND CPN_NM LIKE LOWER('%' || #{cpnNm} || '%')
-				</if>
-				<if test="pdGb != null and pdGb != ''">
-				   AND PD_GB = #{pdGb}
-				</if>
-				<if test="availStdt != null and availStdt != '' and availEddt != null and availEddt != ''">
-				   AND AVAIL_STDT >= DATE_FORMAT(#{availStdt} , '%Y-%m-%d')
-				   AND AVAIL_EDDT <![CDATA[ <= ]]> DATE_FORMAT(#{availEddt} , '%Y-%m-%d')
-				</if>
-			) T
-		LEFT OUTER JOIN TB_CUST_COUPON CC
-		             ON T.CPN_ID = CC.CPN_ID
-		GROUP BY  T.SITE_CD
-				, T.CPN_ID
-				, T.CPN_NM
-				, T.CPN_TYPE
-				, T.DC_WAY
-				, T.DC_PVAL
-				, T.DC_MVAL
-				, T.MAX_DC_AMT
-				, T.PD_GB
-				, T.AVAIL_STDT
-				, T.AVAIL_EDDT
-				, T.REG_NM
-				, T.REG_DT
-		ORDER BY  T.REG_DT DESC
-	</select>
-
-	<!-- 쿠폰 리스트 카운트 조회-->
-	<select id="getCouponListCnt" parameterType="Coupon" resultType="int">
-		/* TsaCoupon.getCouponListCnt */
-		SELECT COUNT(1)
-		  FROM TB_COUPON
-		 WHERE 1=1
-		<if test="siteCd != null and siteCd != ''">
-		   AND SITE_CD = #{siteCd}
-		</if>
-		<if test="cpnId != null and cpnId != ''">
-		   AND CPN_ID = #{cpnId}
-		</if>
-		<if test="cpnType != null and cpnType != ''">
-		   AND CPN_TYPE = #{cpnType}
-		</if>
-		<if test="regNo != null and regNo != ''">
-		   AND REG_NO = #{regNo}
-		</if>
-		<if test="dcWay != null and dcWay != ''">
-		   AND DC_WAY = #{dcWay}
-		</if>
-		<if test="cpnNm != null and cpnNm != ''">
-		   AND CPN_NM LIKE LOWER('%' || #{cpnNm} || '%')
-		</if>
-		<if test="pdGb != null and pdGb != ''">
-		   AND PD_GB = #{pdGb}
-		</if>
-		<if test="availStdt != null and availStdt != '' and availEddt != null and availEddt != ''">
-		   AND AVAIL_STDT >= DATE_FORMAT(#{availStdt} , '%Y-%m-%d')
-		   AND AVAIL_EDDT <![CDATA[ <= ]]> DATE_FORMAT(#{availEddt} , '%Y-%m-%d')
-		</if>
-	</select>
-
-	<!-- 쿠폰 등록 -->
-	<insert id="couponInsert" parameterType="Coupon" keyProperty="cpnId">
-		/* TsaCoupon.couponInsert*/
-		INSERT INTO TB_COUPON (
-		    CPN_ID
-		  , CPN_NM
-		  , SITE_CD
-		  , AF_LINK_CD
-		  , CPN_TYPE
-		  , APPLY_SCOPE
-		  , DC_WAY
-		  , DC_PVAL
-		  , DC_MVAL
-		  , DC_AVAL
-		  , MAX_DC_AMT
-		  , PD_GB
-		  , AVAIL_STDT
-		  , AVAIL_EDDT
-		  , AVAIL_DAYS
-		  , CUST_PUB_LIMIT_QTY
-		  , TOT_PUB_LIMIT_QTY
-		  , ONE_PUB_QTY
-		  , DN_GB
-		  , DC_CD_GB
-		  , DOWN_STDT
-		  , DOWN_EDDT
-		  , BUY_LIMIT_AMT
-		  , PLAN_SQ
-		  , REISSUANCE
-		  , CPN_STAT
-		  , END_ALIM_YN
-		  , REG_NO
-		  , REG_DT
-		  , UPD_NO
-		  , UPD_DT
-		  , FIRST_ORD_YN
-		  , DOWN_ABL_YN
-		  , CUST_JOIN_STDT
-		  , CUST_JOIN_EDDT
-		  , BUY_STDT
-		  , BUY_EDDT
-		  , NEW_CUST_YN
-		) VALUES (
-		   #{cpnId}
-		  , #{cpnNm}
-		  , #{siteCd}
-		  , #{afLinkCd}
-		  , #{cpnType}
-		  , #{applyScope}
-		  , #{dcWay}
-		  , #{dcPval}
-		  , #{dcMval}
-		  , #{dcAval}
-		  , #{maxDcAmt}
-		  , #{pdGb}
-		  <choose>
-			  <when test='pdGb != null and pdGb == "P"'>
-		  , DATE_FORMAT(#{availStdt} , '%Y-%m-%d %H:%i:%s')
-		  , DATE_FORMAT(#{availEddt} , '%Y-%m-%d %H:%i:%s')
-		  , null
-			  </when>
-			  <when test='pdGb != null and pdGb == "D"' >
-		  , null
-		  , null
-		  , #{availDays}
-			  </when>
-		  </choose>
-		  , #{custPubLimitQty}
-		  , #{totPubLimitQty}
-		  , #{onePubQty}
-		  , #{dnGb}
-		  , #{dcCdGb}
-		  , DATE_FORMAT(#{downStdt} , '%Y-%m-%d %H:%i:%s')
-		  , DATE_FORMAT(#{downEddt} , '%Y-%m-%d %H:%i:%s')
-		  , #{buyLimitAmt}
-		  , #{planSq}
-		  , #{reissuance}
-		  , #{cpnStat}
-		  , #{endAlimYn}
-		  , #{regNo}
-		  , CURRENT_TIMESTAMP()
-		  , #{updNo}
-		  , CURRENT_TIMESTAMP()
-		  , #{firstOrdYn}
-		  , #{downAblYn}
-		  <choose>
-			  <when test='newCustYn != null and newCustYn == "Y"'>
-		  , DATE_FORMAT(#{custJoinStdt} , '%Y-%m-%d %H:%i:%s')
-		  , DATE_FORMAT(#{custJoinEddt} , '%Y-%m-%d %H:%i:%s')
-			  </when>
-			  <when test='newCustYn != null and newCustYn == "N"'>
-		  , null
-		  , null
-			  </when>
-		  </choose>
-		  <choose>
-			  <when test='firstOrdYn != null and firstOrdYn == "Y"'>
-		  , DATE_FORMAT(#{buyStdt} , '%Y-%m-%d %H:%i:%s')
-		  , DATE_FORMAT(#{buyEddt} , '%Y-%m-%d %H:%i:%s')
-			  </when>
-			  <when test='firstOrdYn != null and firstOrdYn == "N"'>
-		  , DATE_FORMAT(#{buyStdt} , '%Y-%m-%d %H:%i:%s')
-		  , DATE_FORMAT(#{buyEddt} , '%Y-%m-%d %H:%i:%s')
-			  </when>
-		  </choose>
-		  , #{newCustYn}
-		) ON DUPLICATE KEY UPDATE
-		CPN_NM = #{cpnNm}
-		, SITE_CD = #{siteCd}
-		, AF_LINK_CD = #{afLinkCd}
-		, CPN_TYPE = #{cpnType}
-		, APPLY_SCOPE = #{applyScope}
-		, DC_WAY = #{dcWay}
-		, DC_PVAL = #{dcPval}
-		, DC_MVAL = #{dcMval}
-		, DC_AVAL = #{dcAval}
-		, MAX_DC_AMT = #{maxDcAmt}
-		, PD_GB = #{pdGb}
-		<choose>
-			<when test='pdGb != null and pdGb == "P"'>
-				, AVAIL_STDT = DATE_FORMAT(#{availStdt} , '%Y-%m-%d %H:%i:%s')
-				, AVAIL_EDDT = DATE_FORMAT(#{availEddt} , '%Y-%m-%d %H:%i:%s')
-				, AVAIL_DAYS = null
-			</when>
-			<when test='pdGb != null and pdGb == "D"' >
-				, AVAIL_STDT = null
-				, AVAIL_EDDT = null
-				, AVAIL_DAYS = #{availDays}
-			</when>
-		</choose>
-		, CUST_PUB_LIMIT_QTY = #{custPubLimitQty}
-		, TOT_PUB_LIMIT_QTY = #{totPubLimitQty}
-		, ONE_PUB_QTY = #{onePubQty}
-		, DOWN_STDT = DATE_FORMAT(#{downStdt} , '%Y-%m-%d %H:%i:%s')
-		, DOWN_EDDT = DATE_FORMAT(#{downEddt} , '%Y-%m-%d %H:%i:%s')
-		, BUY_LIMIT_AMT = #{buyLimitAmt}
-		, PLAN_SQ = #{planSq}
-		, REISSUANCE = #{reissuance}
-		, CPN_STAT = #{cpnStat}
-		, END_ALIM_YN = #{endAlimYn}
-		, UPD_NO = #{updNo}
-		, UPD_DT = now()
-		, FIRST_ORD_YN = #{firstOrdYn}
-		, DOWN_ABL_YN = #{downAblYn}
-		<choose>
-			<when test='newCustYn != null and newCustYn == "Y"'>
-				, CUST_JOIN_STDT = DATE_FORMAT(#{custJoinStdt} , '%Y-%m-%d %H:%i:%s')
-				, CUST_JOIN_EDDT = DATE_FORMAT(#{custJoinEddt} , '%Y-%m-%d %H:%i:%s')
-			</when>
-			<when test='newCustYn != null and newCustYn == "N"'>
-				, CUST_JOIN_STDT = null
-				, CUST_JOIN_EDDT = null
-			</when>
-		</choose>
-		<choose>
-			<when test='firstOrdYn != null and firstOrdYn == "Y"'>
-				, BUY_STDT = DATE_FORMAT(#{buyStdt} , '%Y-%m-%d %H:%i:%s')
-				, BUY_EDDT = DATE_FORMAT(#{buyEddt} , '%Y-%m-%d %H:%i:%s')
-			</when>
-			<when test='firstOrdYn != null and firstOrdYn == "N"'>
-				, BUY_STDT = null
-				, BUY_EDDT = null
-			</when>
-		</choose>
-		, NEW_CUST_YN = #{newCustYn}
-	</insert>
-
-	<!-- 쿠폰조회 목록 -->
-	<select id="getCouponRetrieveList" parameterType="Coupon" resultType="Coupon">
-		/* TsaCoupon.getCouponRetrieveList */
-		SELECT A.CPN_ID                                               /*쿠폰ID*/
-		     , A.CPN_NM                                               /*쿠폰명*/
-		     , A.SITE_CD                                              /*사이트코드(공통코드G000)*/
-		     , A.CPN_TYPE                                             /*쿠폰유형(공통코드G230)*/
-		     , A.DC_WAY                                               /*할인방식(공통코드G240)*/
-		     , A.DC_PVAL                                              /*할인값(PC). 할인방식이 금액이면 할인금액, 율이면 할인율*/
-		     , A.DC_MVAL                                              /*할인값(모바일). 할인방식이 금액이면 할인금액, 율이면 할인율*/
-		     , A.MAX_DC_AMT                                           /*최고할인값. 할인방식이 금액이면 최고할인금액, 율이면 최고할인율*/
-		     , A.PD_GB                                                /*기간/일수구분(P 기간, D 일수)*/
-		     , DATE_FORMAT(A.AVAIL_STDT,'%Y%m%d%H%i%S') AS AVAIL_STDT /*유효시작일시(기간/일수구분 "P 기간"일 때 사용됨)*/
-		     , DATE_FORMAT(A.AVAIL_EDDT,'%Y%m%d%H%i%S') AS AVAIL_EDDT /*유효종료일시(기간/일수구분 "P 기간"일 때 사용됨)*/
-		     , A.AVAIL_DAYS                                           /*유효일수(기간/일수구분 "D 일수"일 때 사용됨)*/
-		     , A.CUST_PUB_LIMIT_QTY                                   /*고객당발행제한수량(0은 무제한)*/
-		     , A.TOT_PUB_LIMIT_QTY                                    /*총발행제한수량(0은 무제한)*/
-		     , A.ONE_PUB_QTY                                          /*1회발행수량*/
-		     , A.DN_GB                                                /*다운로드구분(A:자동다운로드, D:직접다운로드). 다운로드가능여부가 "Y 다운로드가능"일 때만 사용됨*/
-		     , A.BUY_LIMIT_AMT                                        /*구매제한금액(0은 제한없음)*/
-		FROM   TB_COUPON A
-		WHERE  A.SITE_CD = #{siteCd}
-		<if test="cpnId !=null and cpnId !=''">
-			AND	   A.CPN_ID = #{cpnId}
-		</if>
-		<if test="cpnNm !=null and cpnNm !=''">
-			AND	   A.CPN_NM LIKE CONCAT('%',#{cpnNm},'%')
-		</if>
-		<if test="cpnType !=null and cpnType !=''">
-			AND	   A.CPN_TYPE = #{cpnType}
-		</if>
-	</select>
-
-	<!-- 쿠폰 적용대상 등록 -->
-	<insert id="saveCouponRefVal" parameterType="CouponRefval" keyProperty="cpnRefvalSq">
-		/* TsaCoupon.saveCouponRefVal */
-		INSERT INTO TB_COUPON_REFVAL (
-		    CPN_ID
-		  , CPN_REFVAL_SQ
-		  , CPN_TYPE
-		  , CPN_TARGET
-		  , REF_VAL
-		  <if test='refFormalGb != null and refFormalGb != ""'>
-		  , REF_FORMAL_GB
-		  </if>
-		  <if test='refBrandCd != null and refBrandCd != ""'>
-		  , REF_BRAND_CD
-		  </if>
-		, REG_NO
-		, REG_DT
-		, UPD_NO
-		, UPD_DT
-		) VALUES (
-			#{cpnId}
-			, #{cpnRefvalSq}
-			, #{cpnType}
-			, #{cpnTarget}
-			, #{refVal}
-			<if test='refFormalGb != null and refFormalGb != ""'>
-			, #{refFormalGb}
-			</if>
-			 <if test='refBrandCd != null and refBrandCd != ""'>
-			 , #{refBrandCd}
-			 </if>
-			 , #{regNo}
-			 , CURRENT_TIMESTAMP()
-			 , #{updNo}
-			 , CURRENT_TIMESTAMP()
-		) ON DUPLICATE KEY UPDATE
-		REF_VAL = #{refVal}
-		, CPN_TYPE = #{cpnType}
-		, CPN_TARGET = #{cpnTarget}
-		, REF_FORMAL_GB = #{refFormalGb}
-		, REF_BRAND_CD = #{refBrandCd}
-		, DEL_YN = #{delYn}
-		, UPD_NO = #{updNo}
-		, UPD_DT = now()
-	</insert>
-
-	<!-- 쿠폰 입점업체 분담율 등록 -->
-	<insert id="saveCouponBurden" parameterType="CouponBurden">
-		/* TsaCoupon.saveCouponBurden */
-		INSERT INTO TB_COUPON_BURDEN( CPN_ID
-									, SUPPLY_COMP_CD
-									, BURDEN_RATE
-									, REG_NO
-									, REG_DT
-									, UPD_NO
-									, UPD_DT)
-		VALUES ( #{cpnId}
-			   , #{supplyCompCd}
-			   , #{burdenRate}
-			   , #{regNo}
-			   , CURRENT_TIMESTAMP()
-			   , #{updNo}
-			   , CURRENT_TIMESTAMP()
-		) ON DUPLICATE KEY UPDATE
-			BURDEN_RATE = #{burdenRate}
-			, UPD_NO = #{updNo}
-			, UPD_DT = now()
-	</insert>
-
-	<!-- 자사브랜드 조회-->
-	<select id="getSelfBrandList" resultType="CommonCode">
-		/* TsaCoupon.getSelfBrandList */
-		SELECT BRAND_CD  AS CD
-		     , BRAND_ENM AS CD_NM
-		  FROM TB_BRAND
-		 WHERE 1 = 1
-		   AND USE_YN = 'Y'
-		   AND SELF_YN = 'Y'
-		ORDER  BY SUPPLY_COMP_CD, DISP_ORD
-	</select>
-
-	<!-- 쿠폰 상세 조회-->
-	<select id="getCouponDetail" parameterType="int" resultType="Coupon">
-		/* TsaCoupon.getCouponDetail */
-		SELECT B.CPN_ID
-			 , B.CPN_NM
-			 , B.SITE_CD
-			 , B.AF_LINK_CD
-			 , B.CPN_TYPE
-			 , B.APPLY_SCOPE
-			 , B.DC_WAY
-			 , B.DC_PVAL
-			 , B.DC_MVAL
-			 , B.DC_AVAL
-			 , B.MAX_DC_AMT
-			 , B.PD_GB
-			 , B.AVAIL_STDT
-			 , B.AVAIL_EDDT
-			 , B.AVAIL_DAYS
-			 , B.CUST_PUB_LIMIT_QTY
-			 , B.TOT_PUB_LIMIT_QTY
-			 , B.ONE_PUB_QTY
-			 , B.DN_GB
-			 , B.DOWN_STDT
-			 , B.DOWN_EDDT
-			 , B.BUY_LIMIT_AMT
-			 , B.PLAN_SQ
-			 , B.REISSUANCE
-			 , B.CPN_STAT
-			 , B.END_ALIM_YN
-			 , B.FIRST_ORD_YN
-			 , B.DOWN_ABL_YN
-		     , B.DC_CD_GB
-			 , B.CUST_JOIN_STDT
-			 , B.CUST_JOIN_EDDT
-			 , B.BUY_STDT
-			 , B.BUY_EDDT
-			 , B.NEW_CUST_YN
-			 , (SELECT AF_CHANNEL
-			      FROM TB_AF_LINK A
-			     WHERE A.AF_LINK_CD = B.AF_LINK_CD) AS AF_CHANNEL
-			 , RC.RD_CPN_NM AS RD_CPN_NM
-  		  FROM TB_COUPON B
-		  LEFT OUTER JOIN (SELECT CPN_ID
-		  						, RD_CPN_NM
-							 FROM TB_RANDOM_COUPON
-		    				GROUP BY CPN_ID, RD_CPN_NM) RC
-		    ON B.CPN_ID = RC.CPN_ID
-		   AND B.DC_CD_GB = 'G233_10'		<!-- 시리얼 유형일 경우에만 랜덤쿠폰 검색 검색 -->
-    	 WHERE B.CPN_ID = #{value}
-	</select>
-
-	<!-- 쿠폰 발급 개수 조회 -->
-	<select id="getCouponIssueCnt" parameterType="int" resultType="int">
-		/* TsaCoupon.getCouponIssueCnt*/
-		SELECT COUNT(1)
-		  FROM TB_CUST_COUPON
-		 WHERE CPN_ID = #{cpnId}
-	</select>
-
-	<!-- 쿠폰 적용대상 조회 - 제외/적용 상품 -->
-	<select id="getCouponRefvalGoodsList" parameterType="CouponRefval" resultType="CouponRefval">
-		/* TsaCoupon.getCouponRefvalGoodsList */
-		SELECT FN_GET_CODE_NM('G073',B.GOODS_GB) AS GOODS_GB
-			 , B.GOODS_CD
-			 , B.GOODS_NM
-			 , C.BRAND_ENM
-			 , A.CPN_REFVAL_SQ
-		     , A.DEL_YN
-		  FROM TB_COUPON_REFVAL A
-		 INNER JOIN TB_GOODS B ON A.REF_VAL = B.GOODS_CD
-		 INNER JOIN TB_BRAND C ON B.BRAND_CD = C.BRAND_CD
-		 WHERE A.CPN_ID = #{cpnId}
-		   AND A.CPN_TARGET = #{cpnTarget}
-		   AND A.DEL_YN = 'N'
-		 ORDER BY A.CPN_REFVAL_SQ DESC
-	</select>
-
-	<!-- 쿠폰 적용대상 조회 - 브랜드 -->
-	<select id="getCouponRefvalBrandList" parameterType="CouponRefval" resultType="CouponRefval">
-		/* TsaCoupon.getCouponRefvalExceptGoodsList */
-		SELECT B.BRAND_CD
-			 , B.BRAND_ENM
-			 , A.CPN_REFVAL_SQ
-		     , A.DEL_YN
-		  FROM TB_COUPON_REFVAL A
-		 INNER JOIN TB_BRAND B ON A.REF_VAL = B.BRAND_CD
-		 WHERE A.CPN_ID = #{cpnId}
-		   AND A.CPN_TARGET = #{cpnTarget}
-		   AND A.DEL_YN = 'N'
-		 ORDER BY A.CPN_REFVAL_SQ DESC
-	</select>
-
-	<!-- 쿠폰적용대상 - 카테고리 조회 -->
-	<select id="getCouponRefvalCategoryList" parameterType="CouponRefval" resultType="CouponRefval">
-		/* TsaCoupon.getCouponRefvalCategoryList */
-		SELECT B.CATE_GB
-			 , A.REF_VAL AS CATE_NO
-			 , B.FULL_CATE_NM 					AS CATE_NM
-			 , B.SITE_CD
-			 , A.REF_FORMAL_GB					AS FORMAL_GB
-		     , A.REF_BRAND_CD					AS BRAND_CD
-			 , A.CPN_REFVAL_SQ
-		     , A.DEL_YN
-		  FROM TB_COUPON_REFVAL A
-		 INNER JOIN TB_CATE_4SRCH B ON A.REF_VAL = B.LEAF_CATE_NO
-		 WHERE A.CPN_ID = #{cpnId}
-		   AND A.CPN_TARGET = #{cpnTarget}
-		   AND A.DEL_YN = 'N'
-		 ORDER BY A.CPN_REFVAL_SQ DESC
-	</select>
-
-	<!-- 쿠폰 적용대상 - 공급처 조회 -->
-	<select id="getCouponRefvalSupplyCompList" parameterType="CouponRefval" resultType="CouponRefval">
-		/* TsaCoupon.getCouponRefvalSupplyCompList */
-		SELECT B.SUPPLY_COMP_CD
-			 , B.SUPPLY_COMP_NM
-			 , A.CPN_REFVAL_SQ
-		     , A.DEL_YN
-		  FROM TB_COUPON_REFVAL A
-		 INNER JOIN TB_SUPPLY_COMPANY B ON A.REF_VAL = B.SUPPLY_COMP_CD
-		 WHERE A.CPN_ID = #{cpnId}
-		   AND A.CPN_TARGET = #{cpnTarget}
-		   AND A.DEL_YN = 'N'
-		 ORDER BY A.CPN_REFVAL_SQ DESC
-	</select>
-
-	<!-- 쿠폰 입점업체 분담율 조회-->
-	<select id="getCouponBurdenList" parameterType="int" resultType="CouponBurden">
-		/* TsaCoupon.getCouponBurdenList */
-		SELECT SUPPLY_COMP_CD
-			 , BURDEN_RATE
-			 , DEL_YN
-			 , CPN_ID
-		  FROM TB_COUPON_BURDEN
-		 WHERE CPN_ID = #{value}
-		   AND DEL_YN = 'N'
-	</select>
-
-	<!-- 쿠폰 적용대상 수정-->
-	<update id="updateCouponRefval" parameterType="CouponRefval" >
-		/* TsaCoupon.updateCouponRefval */
-		UPDATE TB_COUPON_REFVAL
-		   SET DEL_YN = 'Y'
-			 , UPD_NO = #{updNo}
-			 , UPD_DT = CURRENT_TIMESTAMP()
-		 WHERE CPN_ID = #{cpnId}
-		   AND CPN_REFVAL_SQ IN
-		  <foreach collection="cpnRefvalSqArr" item="item" open="(" separator="," close=")">
-			#{item}
-		  </foreach>
-	</update>
-
-	<!-- 고객 쿠폰 발행 -->
-	<insert id="saveCouponCustPub" parameterType="CustCoupon">
-		/* TsaCoupon.saveCouponCustPub */
-		INSERT INTO TB_CUST_COUPON (
-		       CUST_NO
-		     , CPN_ID
-		     , AVAIL_STDT
-		     , AVAIL_EDDT
-		     , PUB_REASON
-		     , PUB_REASON_DTL
-		     , END_ALIM_SEND_YN
-		     , REG_NO
-		     , REG_DT
-		     , UPD_NO
-		     , UPD_DT
-		) VALUES (
-		       #{custNo}
-		     , #{cpnId}
-		     , DATE_FORMAT(#{availStdt} , '%Y%m%d%H%i%S')
-		     , DATE_FORMAT(#{availEddt} , '%Y%m%d%H%i%S')
-		     , #{pubReason}
-		     , #{pubReasonDtl}
-		     , #{endAlimSendYn}
-		     , #{regNo}
-		     , CURRENT_TIMESTAMP()
-		     , #{updNo}
-		     , CURRENT_TIMESTAMP()
-		)
-	</insert>
-
-	<!-- 특정 쿠폰 발급받은 회원 조회-->
-	<select id="getCouponIssueCustList" parameterType="CustCoupon" resultType="CustCoupon">
-		/* TsaCoupon.getCouponIssueCustList */
-		SELECT CUST_CPN_SQ
-			 , CUST_NO
-			 , CPN_ID
-			 , AVAIL_STDT
-			 , AVAIL_EDDT
-		  FROM TB_CUST_COUPON
-		 WHERE CPN_ID = #{cpnId}
-		   AND USED_DT IS NOT NULL
-	</select>
-
-	<!-- 특정 쿠폰 발급받은 고객 유효기간 수정-->
-	<update id="updateCustCouponAvailEddt" parameterType="CustCoupon">
-		/* TsaCoupon.updateCustCouponAvailEddt */
-		UPDATE TB_CUST_COUPON
-		   SET AVAIL_EDDT = DATE_FORMAT(#{availEddt} , '%Y-%m-%d')
-			 , UPD_NO = #{updNo}
-			 , UPD_DT = CURRENT_TIMESTAMP()
-		 WHERE CPN_ID = #{cpnId}
-		   AND USED_DT IS NOT NULL
-		   AND CUST_NO = #{custNo}
-		   AND CUST_CPN_SQ = #{custCpnSq}
-	</update>
-
-	<!-- 특정 쿠폰 발급받은 회원 조회-->
-	<select id="getSerialOverlapCheck" parameterType="Coupon" resultType="int">
-		/* TsaCoupon.getSerialOverlapCheck : 기간 내 중복 시리얼넘버 체크 */
-		WITH CHECK_DATA AS (
-		    SELECT C.CPN_ID
-				 , C.DOWN_STDT
-		    	 , C.DOWN_EDDT
-		    	 , C.AVAIL_STDT
-		    	 , C.AVAIL_EDDT
-		    	 , C.AVAIL_DAYS
-		    FROM TB_COUPON C
-			INNER JOIN (SELECT CPN_ID
-							 , RD_CPN_NM
-						FROM TB_RANDOM_COUPON
-						WHERE RD_CPN_NM = #{rdCpnNm}
-						GROUP BY CPN_ID, RD_CPN_NM ) RC
-		    ON C.CPN_ID = RC.CPN_ID
-		)
-		SELECT SUM(A.CNT) AS CNT
-		FROM ( SELECT COUNT(1) AS CNT		<!-- 다운 시작일이 겹치는 쿠폰번호 찾기 -->
-				FROM CHECK_DATA C
-				WHERE 1=1
-				AND C.DOWN_STDT >= STR_TO_DATE(#{downStdt}, '%Y-%m-%d %H:%i:%s')
-				AND C.DOWN_STDT <![CDATA[ <= ]]> STR_TO_DATE(#{downEddt}, '%Y-%m-%d %H:%i:%s')
-				UNION
-				SELECT COUNT(1) AS CNT		<!-- 다운 종료일이 겹치는 쿠폰번호 찾기 -->
-				FROM CHECK_DATA C
-				WHERE 1=1
-				AND C.DOWN_EDDT >= STR_TO_DATE(#{downStdt}, '%Y-%m-%d %H:%i:%s')
-				AND C.DOWN_EDDT <![CDATA[ <= ]]> STR_TO_DATE(#{downEddt}, '%Y-%m-%d %H:%i:%s')
-		      ) A
-	</select>
-
-	<!-- 특정 쿠폰 발급받은 회원 조회-->
-	<select id="getRandomCouponNmCnt" parameterType="String" resultType="int">
-		/* TsaCoupon.getRandomCouponNmCnt : 중복 시리얼넘버 체크 */
-		SELECT COUNT(1) AS CNT
-		FROM TB_RANDOM_COUPON
-		WHERE RD_CPN_NM = #{value}
-	</select>
-
-	<!-- 고객 쿠폰 발행 -->
-	<insert id="createRandomCouponInfo" parameterType="Coupon">
-		/* TsaCoupon.createRandomCouponInfo */
-		INSERT INTO TB_RANDOM_COUPON (
-			  RD_CPN_NM
-			, CPN_ID
-			, REG_NO
-			, REG_DT
-			, UPD_NO
-			, UPD_DT
-		) VALUES (
-			  #{rdCpnNm}
-			, #{cpnId}
-			, #{regNo}
-			, CURRENT_TIMESTAMP()
-			, #{updNo}
-			, CURRENT_TIMESTAMP()
-		)
-	</insert>
-
-	<!-- 특정 쿠폰 발급받은 회원 조회-->
-	<select id="getRandomCouponInfo" parameterType="int" resultType="CustCoupon">
-		/* TsaCoupon.getRandomCouponInfo */
-		SELECT RC.CPN_ID
-			 , RC.RD_CPN_NM
-		     , C.CUST_NO
-			 , C.CUST_ID
-			 , C.CUST_NM
-			 , DATE_FORMAT(CC.REG_DT, '%Y-%m-%d %H:%i:%s') AS REG_DT
-			 , DATE_FORMAT(CC.USED_DT, '%Y-%m-%d %H:%i:%s') AS USED_DT
-		FROM TB_RANDOM_COUPON RC
-		LEFT OUTER JOIN TB_CUSTOMER C
-		ON RC.CUST_NO = C.CUST_NO
-		LEFT OUTER JOIN TB_CUST_COUPON CC
-		ON RC.CPN_ID = CC.CPN_ID
-		AND C.CUST_NO = CC.CUST_NO
-		WHERE RC.CPN_ID = #{cpnId}
-	</select>
-
-	<insert id="createCouponCustGubun" parameterType="Coupon">
-		/* TsaCoupon.createCouponCustGubun */
-		INSERT INTO TB_COUPON_CUST_GBN (
-				 CPN_ID
-				, USABLE_CUST_GB
-				, REG_NO
-				, REG_DT
-		) VALUES (
-				#{cpnId}
-				, #{usableCustGb}
-				, #{regNo}
-				, CURRENT_TIMESTAMP()
-		)
-	</insert>
-
-	<insert id="createCouponCustGrade" parameterType="Coupon">
-		/* TsaCoupon.createCouponCustGrade */
-		INSERT INTO TB_COUPON_CUST_GRADE (
-			CPN_ID
-			, USABLE_CUST_GRADE
-			, REG_NO
-			, REG_DT
-		) VALUES (
-			#{cpnId}
-			, #{usableCustGrade}
-			, #{regNo}
-			, CURRENT_TIMESTAMP()
-		)
-	</insert>
-
-	<insert id="createCouponPayType" parameterType="Coupon">
-		/* TsaCoupon.createCouponPayType */
-		INSERT INTO TB_COUPON_PAYTYPE (
-			CPN_ID
-			, PAY_TYPE
-			, REG_NO
-			, REG_DT
-		) VALUES (
-			 #{cpnId}
-			 , #{payType}
-			 , #{regNo}
-			 , CURRENT_TIMESTAMP()
-		)
-	</insert>
-
-	<!-- 쿠폰사용가능고객구분 조회-->
-	<select id="getCouponCustGbList" parameterType="int" resultType="Coupon">
-		/* TsaCoupon.getCouponCustGbList */
-		SELECT CPN_ID
-			 , USABLE_CUST_GB
-		FROM TB_COUPON_CUST_GBN
-		WHERE CPN_ID = #{cpnId}
-	</select>
-
-	<!-- 쿠폰사용가능고객등급 조회-->
-	<select id="getCouponCustGradeList" parameterType="int" resultType="Coupon">
-		/* TsaCoupon.getCouponCustGradeList */
-		SELECT CPN_ID
-			 , USABLE_CUST_GRADE
-		FROM TB_COUPON_CUST_GRADE
-		WHERE CPN_ID = #{cpnId}
-	</select>
-
-	<!-- 쿠폰사용가능결제수단 조회-->
-	<select id="getCouponPayTypeList" parameterType="int" resultType="Coupon">
-		/* TsaCoupon.getCouponPayTypeList */
-		SELECT CPN_ID
-			 , PAY_TYPE
-		FROM TB_COUPON_PAYTYPE
-		WHERE CPN_ID = #{cpnId}
-	</select>
-
-	<!-- 쿠폰발급받은회원 조회-->
-	<select id="getCpnPubCustList" parameterType="int" resultType="Coupon">
-		/* TsaCoupon.getCpnPubCustList */
-		SELECT	A.CUST_NO
-			 ,B.CUST_NM
-			 ,B.CUST_GB
-			 ,FN_GET_CODE_NM('G100',B.CUST_GB) AS CUST_GB_NM
-			 ,B.CUST_GRADE
-			 ,FN_GET_CODE_NM('G110',B.CUST_GRADE) AS CUST_GRADE_NM
-			 ,A.AVAIL_STDT
-			 ,A.AVAIL_EDDT
-			 ,CASE WHEN A.USED_DT IS NOT NULL THEN 'Y'
-				   ELSE 'N' END USE_YN
-			 ,A.USED_DT
-			 ,A.PUB_REASON
-			 ,FN_GET_CODE_NM('G068',A.PUB_REASON) AS PUB_REASON_NM
-			 ,A.PUB_REASON_DTL
-			 ,A.REG_NO
-			 ,A.REG_DT
-		FROM 	TB_CUST_COUPON A
-		LEFT OUTER JOIN TB_CUSTOMER B
-		ON		A.CUST_NO = B.CUST_NO
-		WHERE 1=1
-		AND A.CPN_ID = #{cpnId}
-	</select>
-
-	<insert id="createLimitedTimeCoupon" parameterType="CouponLimitedTime" keyProperty="limitCpnId">
-		/* TsaCoupon.createLimitedTimeCoupon */
-		INSERT INTO TB_LIMITED_TIME_COUPON (
-				  LIMIT_CPN_ID
-				, LIMIT_CPN_NM
-				, CPN_ID
-				, DOWN_LIMIT_QTY
-				, DOWN_STDT
-				, DOWN_EDDT
-				, DEL_YN
-				, REG_NO
-				, REG_DT
-				, UPD_NO
-				, UPD_DT
-		) VALUES (
-				#{limitCpnId}
-				 ,#{limitCpnNm}
-				 ,#{cpnId}
-				 ,#{downLimitQty}
-				 ,DATE_FORMAT(#{downStdt},'%Y-%m-%d %H:%i:%s')
-				 ,DATE_FORMAT(#{downEddt},'%Y-%m-%d %H:%i:%s')
-				 ,'N'
-				 ,#{regNo}
-				 ,CURRENT_TIMESTAMP()
-				 ,#{updNo}
-				 ,CURRENT_TIMESTAMP()
-		) ON DUPLICATE KEY UPDATE
-			LIMIT_CPN_NM = #{limitCpnNm}
-			, DOWN_LIMIT_QTY = #{downLimitQty}
-			, DOWN_STDT = DATE_FORMAT(#{downStdt},'%Y-%m-%d %H:%i:%s')
-			, DOWN_EDDT = DATE_FORMAT(#{downEddt},'%Y-%m-%d %H:%i:%s')
-			, DEL_YN = 'N'
-			, UPD_NO = #{updNo}
-			, UPD_DT = CURRENT_TIMESTAMP()
-	</insert>
-
-	<select id="getLimitedTimeCouponList" parameterType="int" resultType="CouponLimitedTime">
-		/* TsaCoupon.getLimitedTimeCouponList */
-		SELECT	LIMIT_CPN_ID
-				,LIMIT_CPN_NM
-				,CPN_ID
-				,DOWN_LIMIT_QTY
-				,DOWN_STDT
-				,DOWN_EDDT
-		     	,DEL_YN
-				,REG_NO
-				,REG_DT
-				,UPD_NO
-				,UPD_DT
-		  FROM	TB_LIMITED_TIME_COUPON
-		 WHERE	1=1
-		   AND  CPN_ID = #{cpnId}
-		   AND  DEL_YN = 'N'
-	</select>
-
-	<!-- 선착순쿠폰 삭제 -->
-	<update id="updateLimitedTimeCouponList" parameterType="CouponLimitedTime" >
-		/* TsaCoupon.updateLimitedTimeCouponList */
-		UPDATE TB_LIMITED_TIME_COUPON
-		SET DEL_YN = 'Y'
-		, UPD_NO = #{updNo}
-		, UPD_DT = CURRENT_TIMESTAMP()
-		WHERE CPN_ID = #{cpnId}
-		AND LIMIT_CPN_ID IN
-		<foreach collection="arrLimitCpnId" item="item" index="index"  open="(" close=")" separator=",">
-			#{item}
-		</foreach>
-	</update>
-
-	<update id="updateCouponStat" parameterType="Coupon">
-		/* TsaCoupon.updateCouponStat */
-		UPDATE TB_COUPON SET
-		CPN_STAT = #{cpnStat}
-		<if test="cpnStat == 'G232_14'">
-			, DEL_YN = 'Y'
-		</if>
-		, UPD_NO = #{updNo}
-		, UPD_DT = CURRENT_TIMESTAMP()
-		WHERE CPN_ID = #{cpnId}
-	</update>
-	
-	<update id="updateCouponMstInfo" parameterType="Coupon">
-		/* TsaCoupon.updateCouponMstInfo */
-		UPDATE	TB_COUPON	SET
-		CPN_NM = #{cpnNm}
-		, SITE_CD = #{siteCd}
-		, AF_LINK_CD = #{afLinkCd}
-		, CPN_TYPE = #{cpnType}
-		, APPLY_SCOPE = #{applyScope}
-		, DC_WAY = #{dcWay}
-		, DC_PVAL = #{dcPval}
-		, DC_MVAL = #{dcMval}
-		, DC_AVAL = #{dcAval}
-		, MAX_DC_AMT = #{maxDcAmt}
-		, PD_GB = #{pdGb}
-		<choose>
-			<when test='pdGb != null and pdGb == "P"'>
-				, AVAIL_STDT = DATE_FORMAT(#{availStdt} , '%Y-%m-%d %H:%i:%s')
-				, AVAIL_EDDT = DATE_FORMAT(#{availEddt} , '%Y-%m-%d %H:%i:%s')
-				, AVAIL_DAYS = null
-			</when>
-			<when test='pdGb != null and pdGb == "D"' >
-				, AVAIL_STDT = null
-				, AVAIL_EDDT = null
-				, AVAIL_DAYS = #{availDays}
-			</when>
-		</choose>
-		, CUST_PUB_LIMIT_QTY = #{custPubLimitQty}
-		, TOT_PUB_LIMIT_QTY = #{totPubLimitQty}
-		, ONE_PUB_QTY = #{onePubQty}
-		, DOWN_STDT = DATE_FORMAT(#{downStdt} , '%Y-%m-%d %H:%i:%s')
-		, DOWN_EDDT = DATE_FORMAT(#{downEddt} , '%Y-%m-%d %H:%i:%s')
-		, BUY_LIMIT_AMT = #{buyLimitAmt}
-		, PLAN_SQ = #{planSq}
-		, REISSUANCE = #{reissuance}
-		, CPN_STAT = #{cpnStat}
-		, END_ALIM_YN = #{endAlimYn}
-		, UPD_NO = #{updNo}
-		, UPD_DT = CURRENT_TIMESTAMP()
-		, FIRST_ORD_YN = #{firstOrdYn}
-		, DOWN_ABL_YN = #{downAblYn}
-		<choose>
-			<when test='newCustYn != null and newCustYn == "Y"'>
-				, CUST_JOIN_STDT = DATE_FORMAT(#{custJoinStdt} , '%Y-%m-%d %H:%i:%s')
-				, CUST_JOIN_EDDT = DATE_FORMAT(#{custJoinEddt} , '%Y-%m-%d %H:%i:%s')
-			</when>
-			<when test='newCustYn != null and newCustYn == "N"'>
-				, CUST_JOIN_STDT = null
-				, CUST_JOIN_EDDT = null
-			</when>
-		</choose>
-		<choose>
-			<when test='firstOrdYn != null and firstOrdYn == "Y"'>
-				, BUY_STDT = DATE_FORMAT(#{buyStdt} , '%Y-%m-%d %H:%i:%s')
-				, BUY_EDDT = DATE_FORMAT(#{buyEddt} , '%Y-%m-%d %H:%i:%s')
-			</when>
-			<when test='firstOrdYn != null and firstOrdYn == "N"'>
-				, BUY_STDT = null
-				, BUY_EDDT = null
-			</when>
-		</choose>
-		, NEW_CUST_YN = #{newCustYn}
-		WHERE CPN_ID = #{cpnId}
-	</update>
-	
-	<delete id="deleteCouponCustGubun" parameterType="Coupon">
-		/* TsaCoupon.deleteCouponCustGubun */
-		DELETE FROM	TB_COUPON_CUST_GBN
-		WHERE	CPN_ID = #{cpnId}
-	</delete>
-
-	<delete id="deleteCouponCustGrade" parameterType="Coupon">
-		/* TsaCoupon.deleteCouponCustGrade */
-		DELETE FROM	TB_COUPON_CUST_GRADE
-		WHERE	CPN_ID = #{cpnId}
-	</delete>
-
-	<delete id="deleteCouponPayType" parameterType="Coupon">
-		/* TsaCoupon.deleteCouponPayType */
-		DELETE FROM	TB_COUPON_PAYTYPE
-		WHERE	CPN_ID = #{cpnId}
-	</delete>
-	
-	<update id="deleteCouponRefVal" parameterType="Coupon">
-		/* TsaCoupon.deleteCouponRefVal */
-		UPDATE TB_COUPON_REFVAL SET
-			DEL_YN = 'Y'
-			, UPD_NO = #{updNo}
-			, UPD_DT = CURRENT_TIMESTAMP
-		WHERE CPN_ID = #{cpnId}
-		  AND DEL_YN = 'N'
-	</update>
-
-	<update id="deleteCouponBurden" parameterType="Coupon">
-		/* TsaCoupon.deleteCouponBurden */
-		UPDATE TB_COUPON_BURDEN SET
-			DEL_YN = 'Y'
-			, UPD_NO = #{updNo}
-			, UPD_DT = CURRENT_TIMESTAMP
-		WHERE CPN_ID = #{cpnId}
-		  AND DEL_YN = 'N'
-	</update>
-
-	<update id="deleteLimitedTimeCoupon" parameterType="Coupon">
-		/* TsaCoupon.deleteLimitedTimeCoupon */
-		UPDATE TB_LIMITED_TIME_COUPON SET
-			DEL_YN = 'Y'
-			, UPD_NO = #{updNo}
-			, UPD_DT = CURRENT_TIMESTAMP
-		WHERE CPN_ID = #{cpnId}
-		  AND DEL_YN = 'N'
-	</update>
-
-</mapper>

+ 117 - 2
src/main/java/com/style24/persistence/mybatis/shop/TsaDsiplay.xml

@@ -940,6 +940,121 @@
 	<select id="getCategoryGoodsListCount" parameterType="CategoryGoods" resultType="int">
 		/* TsaDisplay.getCategoryGoodsListCount */
 		SELECT COUNT(*)
+		FROM ( SELECT A.GOODS_CD
+					, A.CATE_NO
+					, A.DISP_ORD
+					, A.REG_NO
+					, A.REG_DT
+				FROM TB_CATE_GOODS A
+				WHERE 1=1
+				  AND A.CATE_NO IN (
+				      			SELECT LEAF_CATE_NO
+								  FROM TB_CATE_4SRCH
+								 WHERE 1=1
+								<if test='selLvl == "3"'>
+									AND CATE1_NO  = #{cate1No}
+								</if>
+								<if test='selLvl == "4"'>
+									AND CATE2_NO  = #{cate2No}
+								</if>
+								<if test='selLvl == "5"'>
+									AND CATE3_NO  = #{cate3No}
+								</if>
+								<if test='selLvl == "6"'>
+									AND CATE4_NO  = #{cate4No}
+								</if>
+				)
+		) A
+		<if test="searchGb == null or searchGb =='BASIC'">
+			, TB_GOODS G
+		</if>
+		<if test="searchGb != null and searchGb =='EXCEL'">
+			, (SELECT G.*
+			, TMP_DISP_ORD
+			FROM TB_GOODS G
+			, (SELECT SEARCH_CD, MIN(DISP_ORD) AS TMP_DISP_ORD
+			FROM TB_SEARCH_DATA
+			WHERE REG_NO = #{regNo}
+			GROUP BY SEARCH_CD
+			) D
+			WHERE G.GOODS_CD LIKE D.SEARCH_CD||'%'
+			OR G.SUPPLY_GOODS_CD LIKE D.SEARCH_CD||'%'
+			) G
+		</if>
+		WHERE A.GOODS_CD = G.GOODS_CD
+	</select>
+
+	<select id="getCategoryGoodsList" parameterType="CategoryGoods" resultType="CategoryGoods">
+		/* TsaDisplay.getCategoryGoodsList */
+		SELECT Z.*
+		FROM ( SELECT @rownum := @rownum + 1 AS RNUM
+				, A.*
+				FROM ( SELECT G.GOODS_CD
+							, G.GOODS_TNM
+							, G.GOODS_NM
+							, A.CATE_NO
+							, A.DISP_ORD
+							, G.GOODS_TYPE
+							, G.TAG_PRICE
+							, G.LIST_PRICE
+							, G.CURR_PRICE
+							, G.DC_RATE
+							, G.GOODS_STAT
+							, G.BRAND_CD
+							, A.REG_NO
+							, A.REG_DT
+							, G.SUPPLY_GOODS_CD
+							, G.STYLE_YEAR
+							, IFNULL(G.FORMAL_GB,'10') AS FORMAL_GB
+						FROM ( SELECT A.GOODS_CD
+									, A.CATE_NO
+									, A.DISP_ORD
+									, A.REG_NO
+									, A.REG_DT
+								FROM TB_CATE_GOODS A
+								WHERE 1=1
+								AND A.CATE_NO IN ( SELECT LEAF_CATE_NO
+													FROM TB_CATE_4SRCH
+													WHERE 1=1
+												<if test='selLvl == "3"'>
+													AND CATE1_NO  = #{cate1No}
+												</if>
+												<if test='selLvl == "4"'>
+													AND CATE2_NO  = #{cate2No}
+												</if>
+												<if test='selLvl == "5"'>
+													AND CATE3_NO  = #{cate3No}
+												</if>
+												<if test='selLvl == "6"'>
+													AND CATE4_NO  = #{cate4No}
+												</if>
+								)
+					) A
+				<if test="searchGb == null or searchGb =='BASIC'">
+					, TB_GOODS G
+				</if>
+				<if test="searchGb != null and searchGb =='EXCEL'">
+					, (SELECT G.*
+					, TMP_DISP_ORD
+					FROM TB_GOODS G
+					, (SELECT SEARCH_CD, MIN(DISP_ORD) AS TMP_DISP_ORD
+					FROM TB_SEARCH_DATA
+					WHERE REG_NO = #{regNo}
+					GROUP BY SEARCH_CD
+					) D
+					WHERE G.GOODS_CD LIKE D.SEARCH_CD||'%'
+					OR G.SUPPLY_GOODS_CD LIKE D.SEARCH_CD||'%'
+					) G
+				</if>
+				JOIN ( SELECT @rownum := 0) R
+				WHERE A.GOODS_CD = G.GOODS_CD
+				ORDER BY A.DISP_ORD ASC, G.UPD_DT DESC, G.CURR_PRICE DESC, G.GOODS_CD ASC
+		<include refid="getListPagingCondition_sql"/>
+	</select>
+
+	<select id="getCategoryGoodsListCount_old" parameterType="CategoryGoods" resultType="int">
+		/* TsaDisplay.getCategoryGoodsListCount_old */
+		SELECT COUNT(*)
 		FROM ( SELECT A.GOODS_CD
 					, A.CATE_NO
 					, A.DISP_ORD
@@ -990,8 +1105,8 @@
 		WHERE A.GOODS_CD = G.GOODS_CD
 	</select>
 
-	<select id="getCategoryGoodsList" parameterType="CategoryGoods" resultType="CategoryGoods">
-		/* TsaDisplay.getCategoryGoodsList */
+	<select id="getCategoryGoodsList_old" parameterType="CategoryGoods" resultType="CategoryGoods">
+		/* TsaDisplay.getCategoryGoodsList_old */
 		SELECT Z.*
 		FROM ( SELECT @rownum := @rownum + 1 AS RNUM
 					, A.*

+ 5 - 2
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -1422,7 +1422,7 @@
 		     , A.DISP_ORD
 		     , A.DISP_YN
 		     , COUNT(*) OVER(PARTITION BY A.GOODS_CD ) AS RCOUNT
-		     , ROW_NUMBER() OVER(PARTITION BY A.GOODS_CD ORDER BY A.DISP_ORD) AS RNUM
+		     , ROW_NUMBER() OVER(PARTITION BY A.GOODS_CD ORDER BY A.DISP_ORD, A.OPT_CD1, A.OPT_CD2) AS RNUM
 		FROM  TMP_GOODS C 
 		INNER JOIN TB_OPTION A ON C.COMPS_GOODS_CD = A.GOODS_CD 
 		LEFT OUTER JOIN (
@@ -1439,7 +1439,7 @@
 		             AND A.OPT_CD = B.OPT_CD)
 		WHERE 1 = 1
 		AND C.GOODS_CD = #{goodsCd}
-		ORDER BY C.DISP_ORD, A.DISP_ORD
+		ORDER BY C.DISP_ORD, A.DISP_ORD, A.OPT_CD1, A.OPT_CD2
 	</select>
 	
 	<!-- 상품 색상목록 조회 -->
@@ -3567,6 +3567,7 @@
 		     , SUBSTRING_INDEX(SYS_IMG_NM , '/', -1) AS SYS_IMG_NM  /* S0001/20201221/14505664_L.jpg */
 		     , SUBSTRING_INDEX(SYS_IMG_NM , '/', 2) AS SYS_IMG_URL
 		     , DEFAULT_IMG_YN
+		     , MOUSEOVER_IMG_YN
 		FROM   TB_GOODS_IMG
 		WHERE  GOODS_CD = #{goodsCd}
 		AND    COLOR_CD = #{colorCd}
@@ -3601,6 +3602,7 @@
 		     , DISP_ORD
 		     , SYS_IMG_NM
 		     , DEFAULT_IMG_YN
+		     , MOUSEOVER_IMG_YN
 		     , REG_NO
 		     , REG_DT
 		)
@@ -3610,6 +3612,7 @@
 		     , #{dispOrd}
 		     , #{sysImgNm}
 		     , #{defaultImgYn}
+		     , #{mouseoverImgYn}
 		     , #{regNo}
 		     , NOW()
 		)

+ 12 - 0
src/main/java/com/style24/persistence/mybatis/shop/TsaRenderer.xml

@@ -394,4 +394,16 @@
 		AND    USE_YN = 'Y'
 	</select>
 
+	<!-- 자사브랜드 조회-->
+	<select id="getSelfBrandList" resultType="CommonCode">
+		/* TsaRenderer.getSelfBrandList */
+		SELECT BRAND_CD  AS CD
+			 , BRAND_ENM AS CD_NM
+		FROM TB_BRAND
+		WHERE 1 = 1
+		  AND USE_YN = 'Y'
+		  AND SELF_YN = 'Y'
+		ORDER  BY SUPPLY_COMP_CD, DISP_ORD
+	</select>
+
 </mapper>

+ 9 - 7
src/main/webapp/WEB-INF/views/goods/GoodsImageForm.html

@@ -14,7 +14,7 @@
  * 1.0  2020.11.27   eskim       최초 작성
  *******************************************************************************
  -->
-	<div class="modalPopup" data-width="1280">
+	<div class="modalPopup" data-width="1400" data-height="800">
 		<!-- PANELSTYLE -->
 			<div class="panelStyle">
 				<!-- TITLE -->
@@ -39,13 +39,13 @@
 					<table class="frmStyle">
 						<colgroup>
 							<col width="7%"/>
-							<col width="25%"/>
-							<col width="8%"/>
+							<col/>
+							<col width="10%"/>
+							<col width="10%"/>
+							<col width="10%"/>
+							<col width="10%"/>
 							<col width="10%"/>
-							<col width="8%"/>
 							<col width="10%"/>
-							<col width="8%"/>
-							<col/>
 						</colgroup>
 						<tr>
 							<th>상품코드</th>
@@ -54,7 +54,8 @@
 							<td th:text="${goodsImg.colorNm}">PINK</td>
 							<th>대표 이미지순번</th>
 							<td><input type="text" class="text-right" name="defaultImgOrd" maxlength="3" th:value="${defaultImgOrd}" required="required" data-valid-type="number" data-valid-name="대표이미지순번"/></td>
-							<td colspan="2"></td>
+							<th>마우스오버 이미지순번</th>
+							<td><input type="text" class="text-right" name="mouseoverImgOrd" maxlength="3" th:value="${mouseoverImgOrd}" required="required" data-valid-type="number" data-valid-name="마우스오버 이미지순번"/></td>
 						</tr>
 						<tr>
 							<th>이미지등록</th>
@@ -189,6 +190,7 @@
 				params.sysImgNm = item.name;
 				params.sysImgUrl = item.url;
 				params.defaultImgYn = ($('#goodsImgForm input[name=defaultImgOrd]').val() == (i + 1)) ? 'Y' : 'N';
+				params.mouseoverImgYn = ($('#goodsImgForm input[name=mouseoverImgOrd]').val() == (i + 1)) ? 'Y' : 'N';
 				updatedData.push(params);
 			}
 		}

+ 5 - 5
src/main/webapp/dx5/dextuploadx5-configuration.js

@@ -8,15 +8,15 @@
 
     var gAuthkey = '';
     if (location.host.indexOf("ld") > -1) {
-    	gAuthkey = "wv0tVbqwjB3lq1Z7QxSK/RiA31WcFNDd45asJ8rF3Gnl28E5ZkW+9D+/zcDVVXq8yy1fkRjUK9EG41tLceWrPsCbmCOZqVGdr4/JOj11b2g4/DdhnPp7uaDtdL6lH/OLZmRi4aAhdBXhCRmCIsyAZ9qs6P0dpV3EoGFwTaFQqGA=";
+    	gAuthkey = "gx9EHEhXzTpbdxWjty/oHh9cfVi5WA5X4BV71AHaC/ORN/1fcs8nTTd4oUUvC5WhHqEa6Wt8cfmCBJ9w/pJpRhDd+tVu6kPDt9bxZL9n0bvaUn2rrbmJMA+HC9gzahwdEOcjr6ZOmNSEd6N0xN2BDBk55hvfPw02R77XjVuZrQU=";
     } else if (location.host.indexOf("lp") > -1) {
-    	gAuthkey = "wv0tVbqwjB3lq1Z7QxSK/RiA31WcFNDd45asJ8rF3Gnl28E5ZkW+9D+/zcDVVXq8yy1fkRjUK9EG41tLceWrPsCbmCOZqVGdr4/JOj11b2g4/DdhnPp7uaDtdL6lH/OLZmRi4aAhdBXhCRmCIsyAZ9qs6P0dpV3EoGFwTaFQqGA=";
+    	gAuthkey = "gx9EHEhXzTpbdxWjty/oHh9cfVi5WA5X4BV71AHaC/ORN/1fcs8nTTd4oUUvC5WhHqEa6Wt8cfmCBJ9w/pJpRhDd+tVu6kPDt9bxZL9n0bvaUn2rrbmJMA+HC9gzahwdEOcjr6ZOmNSEd6N0xN2BDBk55hvfPw02R77XjVuZrQU=";
     } else if (location.host.indexOf("dev") > -1) {
-    	gAuthkey = "wv0tVbqwjB3lq1Z7QxSK/RiA31WcFNDd45asJ8rF3Gnl28E5ZkW+9D+/zcDVVXq8yy1fkRjUK9EG41tLceWrPsCbmCOZqVGdr4/JOj11b2g4/DdhnPp7uaDtdL6lH/OLZmRi4aAhdBXhCRmCIsyAZ9qs6P0dpV3EoGFwTaFQqGA=";
+    	gAuthkey = "gx9EHEhXzTpbdxWjty/oHh9cfVi5WA5X4BV71AHaC/ORN/1fcs8nTTd4oUUvC5WhHqEa6Wt8cfmCBJ9w/pJpRhDd+tVu6kPDt9bxZL9n0bvaUn2rrbmJMA+HC9gzahwdEOcjr6ZOmNSEd6N0xN2BDBk55hvfPw02R77XjVuZrQU=";
     } else if (location.host.indexOf("qas") > -1) {
-    	gAuthkey = "wv0tVbqwjB3lq1Z7QxSK/RiA31WcFNDd45asJ8rF3Gnl28E5ZkW+9D+/zcDVVXq8yy1fkRjUK9EG41tLceWrPsCbmCOZqVGdr4/JOj11b2g4/DdhnPp7uaDtdL6lH/OLZmRi4aAhdBXhCRmCIsyAZ9qs6P0dpV3EoGFwTaFQqGA=";
+    	gAuthkey = "gx9EHEhXzTpbdxWjty/oHh9cfVi5WA5X4BV71AHaC/ORN/1fcs8nTTd4oUUvC5WhHqEa6Wt8cfmCBJ9w/pJpRhDd+tVu6kPDt9bxZL9n0bvaUn2rrbmJMA+HC9gzahwdEOcjr6ZOmNSEd6N0xN2BDBk55hvfPw02R77XjVuZrQU=";
     } else {
-    	gAuthkey = "wv0tVbqwjB3lq1Z7QxSK/RiA31WcFNDd45asJ8rF3Gnl28E5ZkW+9D+/zcDVVXq8yy1fkRjUK9EG41tLceWrPsCbmCOZqVGdr4/JOj11b2g4/DdhnPp7uaDtdL6lH/OLZmRi4aAhdBXhCRmCIsyAZ9qs6P0dpV3EoGFwTaFQqGA=";
+    	gAuthkey = "gx9EHEhXzTpbdxWjty/oHh9cfVi5WA5X4BV71AHaC/ORN/1fcs8nTTd4oUUvC5WhHqEa6Wt8cfmCBJ9w/pJpRhDd+tVu6kPDt9bxZL9n0bvaUn2rrbmJMA+HC9gzahwdEOcjr6ZOmNSEd6N0xN2BDBk55hvfPw02R77XjVuZrQU=";
     }
 
     win.dextuploadx5Configuration = {