|
|
@@ -130,24 +130,24 @@ public class TsfCouponService {
|
|
|
cpn.setApplyScope(cpnInfo.getApplyScope());
|
|
|
|
|
|
// 쿠폰 적용 대상조건명 및 조건별 수량 조회
|
|
|
- if(TscConstants.ApplyScope.INDIVIDUAL.value().equals(cpn.getApplyScope())) {
|
|
|
+ if (TscConstants.ApplyScope.INDIVIDUAL.value().equals(cpn.getApplyScope())) {
|
|
|
Collection<Coupon> cpnRefInfo = couponDao.getCpnRefName(cpn);
|
|
|
|
|
|
- for(Coupon ref : cpnRefInfo) {
|
|
|
- if(TscConstants.CpnTarget.GOODS.value().equals(ref.getCpnTarget())) {
|
|
|
+ for (Coupon ref : cpnRefInfo) {
|
|
|
+ if (TscConstants.CpnTarget.GOODS.value().equals(ref.getCpnTarget())) {
|
|
|
cpn.setRefGoodsNm(ref.getRefVal());
|
|
|
cpn.setRefGoodsCnt(ref.getCnt());
|
|
|
- } else if(TscConstants.CpnTarget.BRAND.value().equals(ref.getCpnTarget())) {
|
|
|
- if(ref.getCnt() > 1) {
|
|
|
+ } else if (TscConstants.CpnTarget.BRAND.value().equals(ref.getCpnTarget())) {
|
|
|
+ if (ref.getCnt() > 1) {
|
|
|
cpn.setRefBrandNm(ref.getRefVal() + " / " + ref.getSecondRefVal());
|
|
|
} else {
|
|
|
cpn.setRefBrandNm(ref.getRefVal());
|
|
|
}
|
|
|
cpn.setRefBrandCnt(ref.getCnt());
|
|
|
- } else if(TscConstants.CpnTarget.COMP.value().equals(ref.getCpnTarget())) {
|
|
|
+ } else if (TscConstants.CpnTarget.COMP.value().equals(ref.getCpnTarget())) {
|
|
|
cpn.setRefSupplyCompNm(ref.getRefVal());
|
|
|
cpn.setRefSupplyCompCnt(ref.getCnt());
|
|
|
- } else if(TscConstants.CpnTarget.CATE.value().equals(ref.getCpnTarget())) {
|
|
|
+ } else if (TscConstants.CpnTarget.CATE.value().equals(ref.getCpnTarget())) {
|
|
|
cpn.setRefCateNm(ref.getRefVal());
|
|
|
cpn.setRefCateCnt(ref.getCnt());
|
|
|
}
|
|
|
@@ -329,7 +329,18 @@ public class TsfCouponService {
|
|
|
public Collection<Coupon> getGoodsCouponList(Goods goods) {
|
|
|
return couponDao.getGoodsCouponList(goods);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 상품 즉시할인 쿠폰 조회
|
|
|
+ * @param goods
|
|
|
+ * @return
|
|
|
+ * @author eskim
|
|
|
+ * @since 2021.05.01
|
|
|
+ */
|
|
|
+ public Collection<Coupon> getGoodsCoupon1List(Goods goods) {
|
|
|
+ return couponDao.getGoodsCoupon1List(goods);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* ep 쿠폰 조회
|
|
|
* @param goods
|
|
|
@@ -436,7 +447,7 @@ public class TsfCouponService {
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 쿠폰 조회
|
|
|
* @param coupon
|
|
|
@@ -450,7 +461,7 @@ public class TsfCouponService {
|
|
|
coupon.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
return couponDao.getMypageCouponList(coupon);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 (사용가능,만료예정)쿠폰 수 조회
|
|
|
* @param param
|
|
|
@@ -464,7 +475,7 @@ public class TsfCouponService {
|
|
|
param.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
return couponDao.getMypageCouponInfo(param);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 쿠폰 디테일 정보
|
|
|
* @param cpnId
|
|
|
@@ -478,8 +489,7 @@ public class TsfCouponService {
|
|
|
coupon.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
return couponDao.getCouponDetailInfo(coupon);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 기획전 쿠폰 다운 처리
|
|
|
*
|
|
|
@@ -497,7 +507,7 @@ public class TsfCouponService {
|
|
|
for (Coupon tmpCoupon : couponList) {
|
|
|
//int downloadCnt = tmpCoupon.getDownloadCnt();
|
|
|
for (int i = 0; i < couponList.size(); i++) {
|
|
|
- if(couponList.iterator().next().getOwnCoupon()==0) {
|
|
|
+ if (couponList.iterator().next().getOwnCoupon() == 0) {
|
|
|
CustCoupon custCoupon = new CustCoupon();
|
|
|
custCoupon.setCustNo(tmpCoupon.getCustNo());
|
|
|
custCoupon.setCpnId(tmpCoupon.getCpnId());
|
|
|
@@ -610,7 +620,7 @@ public class TsfCouponService {
|
|
|
}
|
|
|
return resultCnt;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 기획전 쿠폰 디테일 정보
|
|
|
* @param cpnId
|
|
|
@@ -623,9 +633,9 @@ public class TsfCouponService {
|
|
|
coupon.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
return couponDao.getPlanCouponDetailInfo(coupon);
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
|
|
|
+ /**
|
|
|
+
|
|
|
* EP 쿠폰 다운 처리
|
|
|
*
|
|
|
* @param coupon
|
|
|
@@ -708,19 +718,18 @@ public class TsfCouponService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
- /* 출석체크 쿠폰 정보
|
|
|
- * @param coupon - 쿠폰정보
|
|
|
- * @return Coupon
|
|
|
- * @author sowon
|
|
|
- * @since 2021. 04. 15
|
|
|
- */
|
|
|
+ /* 출석체크 쿠폰 정보
|
|
|
+ * @param coupon - 쿠폰정보
|
|
|
+ * @return Coupon
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 04. 15
|
|
|
+ */
|
|
|
public CustCoupon getAttendCouponInfo(CustCoupon coupon) {
|
|
|
coupon.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
coupon.setFrontGb(TsfSession.getFrontGb());
|
|
|
return couponDao.getAttendCouponInfo(coupon);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 퀵메뉴 다운가능 쿠폰 리스트
|
|
|
*
|
|
|
@@ -729,7 +738,7 @@ public class TsfCouponService {
|
|
|
* @author sowon
|
|
|
* @since 2021.04.23
|
|
|
*/
|
|
|
- public Collection<Coupon> getQuickCouponDownList(Coupon coupon){
|
|
|
+ public Collection<Coupon> getQuickCouponDownList(Coupon coupon) {
|
|
|
coupon.setSiteCd(TscConstants.Site.STYLE24.value());
|
|
|
coupon.setFrontGb(TsfSession.getFrontGb());
|
|
|
coupon.setCustGb(TsfSession.getCustGb());
|
|
|
@@ -737,7 +746,7 @@ public class TsfCouponService {
|
|
|
coupon.setCustGrade(TsfSession.getInfo().getCustGrade());
|
|
|
return couponDao.getQuickCouponDownList(coupon);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 퀵메뉴 쿠폰 다운
|
|
|
*
|
|
|
@@ -755,14 +764,14 @@ public class TsfCouponService {
|
|
|
coupon.setCustNo(TsfSession.getInfo().getCustNo());
|
|
|
coupon.setCustGrade(TsfSession.getInfo().getCustGrade());
|
|
|
Collection<Coupon> quickCouponList = couponDao.getQuickCouponDownList(coupon);
|
|
|
-
|
|
|
+
|
|
|
String result = "SUCESS";
|
|
|
|
|
|
if (quickCouponList == null || quickCouponList.isEmpty()) {
|
|
|
result = "ERROR_10";
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
int count = 0;
|
|
|
if (coupon.getCpnId() > 0) {
|
|
|
for (Coupon quickCoupon : quickCouponList) {
|