|
|
@@ -3,6 +3,7 @@ package com.style24.admin.biz.service;
|
|
|
import java.io.IOException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Collection;
|
|
|
+import java.util.Iterator;
|
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -16,10 +17,7 @@ import com.gagaframework.web.util.GagaFileUtil;
|
|
|
import com.gagaframework.web.util.GagaStringUtil;
|
|
|
import com.style24.admin.biz.dao.TsaPlanDao;
|
|
|
import com.style24.admin.support.security.session.TsaSession;
|
|
|
-import com.style24.persistence.domain.Goods;
|
|
|
-import com.style24.persistence.domain.MktmailManagement;
|
|
|
-import com.style24.persistence.domain.MktmailManagementGoods;
|
|
|
-import com.style24.persistence.domain.MktmailManagementTc;
|
|
|
+import com.style24.persistence.domain.Notice;
|
|
|
import com.style24.persistence.domain.Plan;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -706,136 +704,548 @@ public class TsaPlanService {
|
|
|
|
|
|
param.setRegNo(regNo);
|
|
|
|
|
|
- if (param.getMode().equals("C")) {
|
|
|
- // 리뷰 등록
|
|
|
- Plan rePlan = new Plan();
|
|
|
- //리뷰 등록 - tb_plan_contents
|
|
|
- if(param.getReTitle() != "" || param.getMultiPlanReview().length>0) {
|
|
|
- rePlan.setRegNo(regNo);
|
|
|
- rePlan.setUpdNo(regNo);
|
|
|
- rePlan.setTmplType("G082_10");
|
|
|
- rePlan.setPlanSq(param.getPlanSq());
|
|
|
- rePlan.setTitle(param.getReTitle());
|
|
|
- rePlan.setDispYn(param.getReDispYn());
|
|
|
- rePlan.setDispOrd(param.getReDispOrd());
|
|
|
- planDao.createPlanContents(rePlan);
|
|
|
-
|
|
|
- //리뷰 아이템 등록
|
|
|
- if(param.getMultiPlanReview().length>0) {
|
|
|
- String[] reItemVal = param.getMultiPlanReview();
|
|
|
- String[] startDate = param.getMultiPlanReviewStartD();
|
|
|
- String[] startTime = param.getMultiPlanReviewStartT();
|
|
|
- String[] endDate = param.getMultiPlanReviewEndD();
|
|
|
- String[] endTime = param.getMultiPlanReviewEndT();
|
|
|
- // 기획전 브랜드 insert
|
|
|
- for (int j = 0; j < reItemVal.length; j++) {
|
|
|
- rePlan.setItemVal(reItemVal[j]);
|
|
|
- rePlan.setReviewDispStdt(startDate[j] + ' ' +startTime[j]);
|
|
|
- rePlan.setReviewDispEddt(endDate[j] + ' ' +endTime[j]);
|
|
|
- planDao.createPlanContentsItem(rePlan);
|
|
|
- }
|
|
|
+ // 리뷰 등록
|
|
|
+ Plan rePlan = new Plan();
|
|
|
+ //리뷰 등록 - tb_plan_contents
|
|
|
+ if(param.getReTitle() != "" || param.getMultiPlanReview().length>0) {
|
|
|
+ rePlan.setRegNo(regNo);
|
|
|
+ rePlan.setUpdNo(regNo);
|
|
|
+ rePlan.setTmplType("G082_10");
|
|
|
+ rePlan.setPlanSq(param.getPlanSq());
|
|
|
+ rePlan.setTitle(param.getReTitle());
|
|
|
+ rePlan.setDispYn(param.getReDispYn());
|
|
|
+ rePlan.setDispOrd(param.getReDispOrd());
|
|
|
+ rePlan.setPlanContSq(param.getRePlanContSq());
|
|
|
+ planDao.createPlanContents(rePlan);
|
|
|
+
|
|
|
+ // 기존 리뷰아이템 삭제
|
|
|
+ planDao.deletePlanContentItem(param.getRePlanContSq());
|
|
|
+ //리뷰 아이템 등록
|
|
|
+ if(param.getMultiPlanReview().length>0) {
|
|
|
+ String[] reItemVal = param.getMultiPlanReview();
|
|
|
+ String[] startDate = param.getMultiPlanReviewStartD();
|
|
|
+ String[] startTime = param.getMultiPlanReviewStartT();
|
|
|
+ String[] endDate = param.getMultiPlanReviewEndD();
|
|
|
+ String[] endTime = param.getMultiPlanReviewEndT();
|
|
|
+ // 기획전 브랜드 insert
|
|
|
+ for (int j = 0; j < reItemVal.length; j++) {
|
|
|
+ rePlan.setItemVal(reItemVal[j]);
|
|
|
+ rePlan.setReviewDispStdt(startDate[j] + ' ' +startTime[j]);
|
|
|
+ rePlan.setReviewDispEddt(endDate[j] + ' ' +endTime[j]);
|
|
|
+ planDao.createPlanContentsItem(rePlan);
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ // 쿠폰등록
|
|
|
+ Plan cuPlan = new Plan();
|
|
|
+ //쿠폰 등록 - tb_plan_contents
|
|
|
+ if(param.getCuTitle() != "" || param.getMultiPlanCoupon().length>0) {
|
|
|
+ cuPlan.setRegNo(regNo);
|
|
|
+ cuPlan.setUpdNo(regNo);
|
|
|
+ cuPlan.setTmplType("G082_20");
|
|
|
+ cuPlan.setPlanSq(param.getPlanSq());
|
|
|
+ cuPlan.setTitle(param.getCuTitle());
|
|
|
+ cuPlan.setDispYn(param.getCuDispYn());
|
|
|
+ cuPlan.setDispOrd(param.getCuDispOrd());
|
|
|
+ cuPlan.setPlanContSq(param.getCuPlanContSq());
|
|
|
+ planDao.createPlanContents(cuPlan);
|
|
|
|
|
|
- // 쿠폰등록
|
|
|
- Plan cuPlan = new Plan();
|
|
|
- //쿠폰 등록 - tb_plan_contents
|
|
|
- if(param.getCuTitle() != "" || param.getMultiPlanCoupon().length>0) {
|
|
|
- cuPlan.setRegNo(regNo);
|
|
|
- cuPlan.setUpdNo(regNo);
|
|
|
- cuPlan.setTmplType("G082_20");
|
|
|
- cuPlan.setPlanSq(param.getPlanSq());
|
|
|
- cuPlan.setTitle(param.getCuTitle());
|
|
|
- cuPlan.setDispYn(param.getCuDispYn());
|
|
|
- cuPlan.setDispOrd(param.getCuDispOrd());
|
|
|
- planDao.createPlanContents(cuPlan);
|
|
|
+ // 기존 쿠폰아이템 삭제
|
|
|
+ planDao.deletePlanContentItem(param.getCuPlanContSq());
|
|
|
+
|
|
|
+ //쿠폰아이템 등록
|
|
|
+ if(param.getMultiPlanCoupon().length>0) {
|
|
|
+ String[] cuItemVal = param.getMultiPlanCoupon();
|
|
|
|
|
|
- //쿠폰아이템 등록
|
|
|
- if(param.getMultiPlanCoupon().length>0) {
|
|
|
- String[] cuItemVal = param.getMultiPlanCoupon();
|
|
|
+ // 기획전 브랜드 insert
|
|
|
+ for (int j = 0; j < cuItemVal.length; j++) {
|
|
|
+ cuPlan.setItemVal(cuItemVal[j]);
|
|
|
+ planDao.createPlanContentsItem(cuPlan);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //이미지등록
|
|
|
+ Plan filePlan = new Plan();
|
|
|
+ if(param.getMultiPlanFile().length>=0) {
|
|
|
+ filePlan.setRegNo(regNo);
|
|
|
+ filePlan.setUpdNo(regNo);
|
|
|
+ filePlan.setTmplType("G082_30");
|
|
|
+ filePlan.setPlanSq(param.getPlanSq());
|
|
|
+ filePlan.setDispYn(param.getFileDispYn());
|
|
|
+ filePlan.setDispOrd(param.getFileDispOrd());
|
|
|
+ filePlan.setPlanContSq(param.getFilePlanContSq());
|
|
|
+
|
|
|
+ planDao.createPlanContents(filePlan);
|
|
|
+
|
|
|
+ // 기존 파일 삭제
|
|
|
+ /* planDao.deletePlanContentItem(param.getFilePlanContSq()); */
|
|
|
+
|
|
|
+ //파일아이템 등록
|
|
|
+ if(param.getMultiPlanFile().length>0) {
|
|
|
+ String[] fileItemVal = param.getMultiPlanFile();
|
|
|
+
|
|
|
+ // 기획전 브랜드 insert
|
|
|
+ for (int j = 0; j < fileItemVal.length; j++) {
|
|
|
+ filePlan.setItemVal(fileItemVal[j]);
|
|
|
+ planDao.createPlanContentsItem(filePlan);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //HTML[상단] 등록
|
|
|
+ Plan fsrcTop = new Plan();
|
|
|
+ if(param.getFsrcMobileTop() != "" || param.getFsrcPcTop() != "") {
|
|
|
+ //tb_plan_contents 등록
|
|
|
+ fsrcTop.setRegNo(regNo);
|
|
|
+ fsrcTop.setUpdNo(regNo);
|
|
|
+ fsrcTop.setTmplType("G082_40");
|
|
|
+ fsrcTop.setPlanSq(param.getPlanSq());
|
|
|
+ fsrcTop.setDispYn(param.getTopFsrcDispYn());
|
|
|
+ fsrcTop.setDispOrd(param.getTopFsrcDispOrd());
|
|
|
+
|
|
|
+ planDao.createPlanContents(fsrcTop);
|
|
|
+
|
|
|
+ // 웹용 상단PC 등록
|
|
|
+ if (StringUtils.isNotBlank(param.getFsrcPcTop())) {
|
|
|
+ createPlanFsrcPcTop(param);
|
|
|
+ }
|
|
|
+ // 웹용 상단MOBILE 등록
|
|
|
+ if (StringUtils.isNotBlank(param.getFsrcMobileTop())) {
|
|
|
+ createPlanFsrcMobileTop(param);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //HTML[하단] 등록
|
|
|
+ Plan fsrcBtm = new Plan();
|
|
|
+ if(param.getFsrcMobileBtm() != "" || param.getFsrcPcBtm() != "") {
|
|
|
+ //tb_plan_contents 등록
|
|
|
+ fsrcBtm.setRegNo(regNo);
|
|
|
+ fsrcBtm.setUpdNo(regNo);
|
|
|
+ fsrcBtm.setTmplType("G082_41");
|
|
|
+ fsrcBtm.setPlanSq(param.getPlanSq());
|
|
|
+ fsrcBtm.setDispYn(param.getBtmFsrcDispYn());
|
|
|
+ fsrcBtm.setDispOrd(param.getBtmFsrcDispOrd());
|
|
|
+
|
|
|
+ planDao.createPlanContents(fsrcBtm);
|
|
|
+
|
|
|
+ // 웹용 상단PC 등록
|
|
|
+ if (StringUtils.isNotBlank(param.getFsrcPcBtm())) {
|
|
|
+ createPlanFsrcPcBtm(param);
|
|
|
+ }
|
|
|
+ // 웹용 상단MOBILE 등록
|
|
|
+ if (StringUtils.isNotBlank(param.getFsrcMobileBtm())) {
|
|
|
+ createPlanFsrcMobileBtm(param);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품 등록 -- 1
|
|
|
+ for (Plan multiPlanGoodsContent1 : param.getMultiPlanGoodsContent1()) {
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(multiPlanGoodsContent1.getGoodsType())) {
|
|
|
+ String goodsTitle = multiPlanGoodsContent1.getGoodsTitle();
|
|
|
+ String goodsUrl = multiPlanGoodsContent1.getGoodsUrl();
|
|
|
+ String goodsType = multiPlanGoodsContent1.getGoodsType();
|
|
|
+ long goodsDispOrd = multiPlanGoodsContent1.getGoodsDispOrd();
|
|
|
+ String goodsDispYn = multiPlanGoodsContent1.getGoodsDispYn();
|
|
|
+
|
|
|
+ Plan goods1 = new Plan();
|
|
|
+ goods1.setRegNo(regNo);
|
|
|
+ goods1.setUpdNo(regNo);
|
|
|
+ goods1.setTitle(goodsTitle);
|
|
|
+ goods1.setDispOrd(goodsDispOrd);
|
|
|
+ goods1.setPlanSq(param.getPlanSq());
|
|
|
+ goods1.setDispYn(goodsDispYn);
|
|
|
+ goods1.setTmplType(goodsType);
|
|
|
+ goods1.setLinkUrl(goodsUrl);
|
|
|
+
|
|
|
+ planDao.createPlanContents(goods1);
|
|
|
+
|
|
|
+ for (Plan multiPlanGoodsContentVal1 : param.getMultiPlanGoodsContentVal1()) {
|
|
|
+ if(param.getMultiPlanGoodsContentVal1().size()>0) {
|
|
|
+ goods1.setItemVal(multiPlanGoodsContentVal1.getGoodsItemVal());
|
|
|
+ planDao.createPlanContentsItem(goods1);
|
|
|
+ }
|
|
|
|
|
|
- // 기획전 브랜드 insert
|
|
|
- for (int j = 0; j < cuItemVal.length; j++) {
|
|
|
- cuPlan.setItemVal(cuItemVal[j]);
|
|
|
- planDao.createPlanContentsItem(cuPlan);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품 등록 -- 2
|
|
|
+ for (Plan multiPlanGoodsContent2 : param.getMultiPlanGoodsContent2()) {
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(multiPlanGoodsContent2.getGoodsType())) {
|
|
|
+ String goodsTitle = multiPlanGoodsContent2.getGoodsTitle();
|
|
|
+ String goodsUrl = multiPlanGoodsContent2.getGoodsUrl();
|
|
|
+ String goodsType = multiPlanGoodsContent2.getGoodsType();
|
|
|
+ long goodsDispOrd = multiPlanGoodsContent2.getGoodsDispOrd();
|
|
|
+ String goodsDispYn = multiPlanGoodsContent2.getGoodsDispYn();
|
|
|
+
|
|
|
+ Plan goods2 = new Plan();
|
|
|
+ goods2.setRegNo(regNo);
|
|
|
+ goods2.setUpdNo(regNo);
|
|
|
+ goods2.setTitle(goodsTitle);
|
|
|
+ goods2.setDispOrd(goodsDispOrd);
|
|
|
+ goods2.setPlanSq(param.getPlanSq());
|
|
|
+ goods2.setDispYn(goodsDispYn);
|
|
|
+ goods2.setTmplType(goodsType);
|
|
|
+ goods2.setLinkUrl(goodsUrl);
|
|
|
+
|
|
|
+ planDao.createPlanContents(goods2);
|
|
|
+
|
|
|
+ for (Plan multiPlanGoodsContentVal2 : param.getMultiPlanGoodsContentVal2()) {
|
|
|
+ if(param.getMultiPlanGoodsContentVal2().size()>0) {
|
|
|
+ goods2.setItemVal(multiPlanGoodsContentVal2.getGoodsItemVal());
|
|
|
+ planDao.createPlanContentsItem(goods2);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품 등록 -- 3
|
|
|
+ for (Plan multiPlanGoodsContent3 : param.getMultiPlanGoodsContent3()) {
|
|
|
|
|
|
- //이미지등록
|
|
|
- Plan filePlan = new Plan();
|
|
|
- if(param.getMultiPlanFile().length>0) {
|
|
|
- filePlan.setRegNo(regNo);
|
|
|
- filePlan.setUpdNo(regNo);
|
|
|
- filePlan.setTmplType("G082_30");
|
|
|
- filePlan.setPlanSq(param.getPlanSq());
|
|
|
- filePlan.setDispYn(param.getFileDispYn());
|
|
|
- filePlan.setDispOrd(param.getFileDispOrd());
|
|
|
- planDao.createPlanContents(filePlan);
|
|
|
+ if (!StringUtils.isEmpty(multiPlanGoodsContent3.getGoodsType())) {
|
|
|
+ String goodsTitle = multiPlanGoodsContent3.getGoodsTitle();
|
|
|
+ String goodsUrl = multiPlanGoodsContent3.getGoodsUrl();
|
|
|
+ String goodsType = multiPlanGoodsContent3.getGoodsType();
|
|
|
+ long goodsDispOrd = multiPlanGoodsContent3.getGoodsDispOrd();
|
|
|
+ String goodsDispYn = multiPlanGoodsContent3.getGoodsDispYn();
|
|
|
+
|
|
|
+ Plan goods3 = new Plan();
|
|
|
+ goods3.setRegNo(regNo);
|
|
|
+ goods3.setUpdNo(regNo);
|
|
|
+ goods3.setTitle(goodsTitle);
|
|
|
+ goods3.setDispOrd(goodsDispOrd);
|
|
|
+ goods3.setPlanSq(param.getPlanSq());
|
|
|
+ goods3.setDispYn(goodsDispYn);
|
|
|
+ goods3.setTmplType(goodsType);
|
|
|
+ goods3.setLinkUrl(goodsUrl);
|
|
|
+
|
|
|
+ planDao.createPlanContents(goods3);
|
|
|
|
|
|
- //파일아이템 등록
|
|
|
- if(param.getMultiPlanFile().length>0) {
|
|
|
- String[] fileItemVal = param.getMultiPlanFile();
|
|
|
+ for (Plan multiPlanGoodsContentVal3 : param.getMultiPlanGoodsContentVal3()) {
|
|
|
+ if(param.getMultiPlanGoodsContentVal3().size()>0) {
|
|
|
+ goods3.setItemVal(multiPlanGoodsContentVal3.getGoodsItemVal());
|
|
|
+ planDao.createPlanContentsItem(goods3);
|
|
|
+ }
|
|
|
|
|
|
- // 기획전 브랜드 insert
|
|
|
- for (int j = 0; j < fileItemVal.length; j++) {
|
|
|
- filePlan.setItemVal(fileItemVal[j]);
|
|
|
- planDao.createPlanContentsItem(filePlan);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품 등록 -- 4
|
|
|
+ for (Plan multiPlanGoodsContent4 : param.getMultiPlanGoodsContent4()) {
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(multiPlanGoodsContent4.getGoodsType())) {
|
|
|
+ String goodsTitle = multiPlanGoodsContent4.getGoodsTitle();
|
|
|
+ String goodsUrl = multiPlanGoodsContent4.getGoodsUrl();
|
|
|
+ String goodsType = multiPlanGoodsContent4.getGoodsType();
|
|
|
+ long goodsDispOrd = multiPlanGoodsContent4.getGoodsDispOrd();
|
|
|
+ String goodsDispYn = multiPlanGoodsContent4.getGoodsDispYn();
|
|
|
+
|
|
|
+ Plan goods4 = new Plan();
|
|
|
+ goods4.setRegNo(regNo);
|
|
|
+ goods4.setUpdNo(regNo);
|
|
|
+ goods4.setTitle(goodsTitle);
|
|
|
+ goods4.setDispOrd(goodsDispOrd);
|
|
|
+ goods4.setPlanSq(param.getPlanSq());
|
|
|
+ goods4.setDispYn(goodsDispYn);
|
|
|
+ goods4.setTmplType(goodsType);
|
|
|
+ goods4.setLinkUrl(goodsUrl);
|
|
|
+
|
|
|
+ planDao.createPlanContents(goods4);
|
|
|
+
|
|
|
+ for (Plan multiPlanGoodsContentVal4 : param.getMultiPlanGoodsContentVal4()) {
|
|
|
+ if(param.getMultiPlanGoodsContentVal4().size()>0) {
|
|
|
+ goods4.setItemVal(multiPlanGoodsContentVal4.getGoodsItemVal());
|
|
|
+ planDao.createPlanContentsItem(goods4);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품 등록 -- 5
|
|
|
+ for (Plan multiPlanGoodsContent5 : param.getMultiPlanGoodsContent5()) {
|
|
|
|
|
|
- //HTML[상단] 등록
|
|
|
- Plan fsrcTop = new Plan();
|
|
|
- if(param.getFsrcMobileTop() != "" || param.getFsrcPcTop() != "") {
|
|
|
- //tb_plan_contents 등록
|
|
|
- fsrcTop.setRegNo(regNo);
|
|
|
- fsrcTop.setUpdNo(regNo);
|
|
|
- fsrcTop.setTmplType("G082_40");
|
|
|
- fsrcTop.setPlanSq(param.getPlanSq());
|
|
|
- fsrcTop.setDispYn(param.getTopFsrcDispYn());
|
|
|
- fsrcTop.setDispOrd(param.getTopFsrcDispOrd());
|
|
|
+ if (!StringUtils.isEmpty(multiPlanGoodsContent5.getGoodsType())) {
|
|
|
+ String goodsTitle = multiPlanGoodsContent5.getGoodsTitle();
|
|
|
+ String goodsUrl = multiPlanGoodsContent5.getGoodsUrl();
|
|
|
+ String goodsType = multiPlanGoodsContent5.getGoodsType();
|
|
|
+ long goodsDispOrd = multiPlanGoodsContent5.getGoodsDispOrd();
|
|
|
+ String goodsDispYn = multiPlanGoodsContent5.getGoodsDispYn();
|
|
|
|
|
|
- planDao.createPlanContents(fsrcTop);
|
|
|
+ Plan goods5 = new Plan();
|
|
|
+ goods5.setRegNo(regNo);
|
|
|
+ goods5.setUpdNo(regNo);
|
|
|
+ goods5.setTitle(goodsTitle);
|
|
|
+ goods5.setDispOrd(goodsDispOrd);
|
|
|
+ goods5.setPlanSq(param.getPlanSq());
|
|
|
+ goods5.setDispYn(goodsDispYn);
|
|
|
+ goods5.setTmplType(goodsType);
|
|
|
+ goods5.setLinkUrl(goodsUrl);
|
|
|
|
|
|
- // 웹용 상단PC 등록
|
|
|
- if (StringUtils.isNotBlank(param.getFsrcPcTop())) {
|
|
|
- createPlanFsrcPcTop(param);
|
|
|
+ planDao.createPlanContents(goods5);
|
|
|
+
|
|
|
+ for (Plan multiPlanGoodsContentVal5 : param.getMultiPlanGoodsContentVal5()) {
|
|
|
+ if(param.getMultiPlanGoodsContentVal5().size()>0) {
|
|
|
+ goods5.setItemVal(multiPlanGoodsContentVal5.getGoodsItemVal());
|
|
|
+ planDao.createPlanContentsItem(goods5);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
- // 웹용 상단MOBILE 등록
|
|
|
- if (StringUtils.isNotBlank(param.getFsrcMobileTop())) {
|
|
|
- createPlanFsrcMobileTop(param);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품 등록 -- 6
|
|
|
+ for (Plan multiPlanGoodsContent6 : param.getMultiPlanGoodsContent6()) {
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(multiPlanGoodsContent6.getGoodsType())) {
|
|
|
+ String goodsTitle = multiPlanGoodsContent6.getGoodsTitle();
|
|
|
+ String goodsUrl = multiPlanGoodsContent6.getGoodsUrl();
|
|
|
+ String goodsType = multiPlanGoodsContent6.getGoodsType();
|
|
|
+ long goodsDispOrd = multiPlanGoodsContent6.getGoodsDispOrd();
|
|
|
+ String goodsDispYn = multiPlanGoodsContent6.getGoodsDispYn();
|
|
|
+
|
|
|
+ Plan goods6 = new Plan();
|
|
|
+ goods6.setRegNo(regNo);
|
|
|
+ goods6.setUpdNo(regNo);
|
|
|
+ goods6.setTitle(goodsTitle);
|
|
|
+ goods6.setDispOrd(goodsDispOrd);
|
|
|
+ goods6.setPlanSq(param.getPlanSq());
|
|
|
+ goods6.setDispYn(goodsDispYn);
|
|
|
+ goods6.setTmplType(goodsType);
|
|
|
+ goods6.setLinkUrl(goodsUrl);
|
|
|
+
|
|
|
+ planDao.createPlanContents(goods6);
|
|
|
+
|
|
|
+ for (Plan multiPlanGoodsContentVal6 : param.getMultiPlanGoodsContentVal6()) {
|
|
|
+ if(param.getMultiPlanGoodsContentVal6().size()>0) {
|
|
|
+ goods6.setItemVal(multiPlanGoodsContentVal6.getGoodsItemVal());
|
|
|
+ planDao.createPlanContentsItem(goods6);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품 등록 -- 7
|
|
|
+ for (Plan multiPlanGoodsContent7 : param.getMultiPlanGoodsContent7()) {
|
|
|
|
|
|
- //HTML[하단] 등록
|
|
|
- Plan fsrcBtm = new Plan();
|
|
|
- if(param.getFsrcMobileBtm() != "" || param.getFsrcPcBtm() != "") {
|
|
|
- //tb_plan_contents 등록
|
|
|
- fsrcBtm.setRegNo(regNo);
|
|
|
- fsrcBtm.setUpdNo(regNo);
|
|
|
- fsrcBtm.setTmplType("G082_41");
|
|
|
- fsrcBtm.setPlanSq(param.getPlanSq());
|
|
|
- fsrcBtm.setDispYn(param.getBtmFsrcDispYn());
|
|
|
- fsrcBtm.setDispOrd(param.getBtmFsrcDispOrd());
|
|
|
+ if (!StringUtils.isEmpty(multiPlanGoodsContent7.getGoodsType())) {
|
|
|
+ String goodsTitle = multiPlanGoodsContent7.getGoodsTitle();
|
|
|
+ String goodsUrl = multiPlanGoodsContent7.getGoodsUrl();
|
|
|
+ String goodsType = multiPlanGoodsContent7.getGoodsType();
|
|
|
+ long goodsDispOrd = multiPlanGoodsContent7.getGoodsDispOrd();
|
|
|
+ String goodsDispYn = multiPlanGoodsContent7.getGoodsDispYn();
|
|
|
+
|
|
|
+ Plan goods7 = new Plan();
|
|
|
+ goods7.setRegNo(regNo);
|
|
|
+ goods7.setUpdNo(regNo);
|
|
|
+ goods7.setTitle(goodsTitle);
|
|
|
+ goods7.setDispOrd(goodsDispOrd);
|
|
|
+ goods7.setPlanSq(param.getPlanSq());
|
|
|
+ goods7.setDispYn(goodsDispYn);
|
|
|
+ goods7.setTmplType(goodsType);
|
|
|
+ goods7.setLinkUrl(goodsUrl);
|
|
|
|
|
|
- planDao.createPlanContents(fsrcBtm);
|
|
|
+ planDao.createPlanContents(goods7);
|
|
|
|
|
|
- // 웹용 상단PC 등록
|
|
|
- if (StringUtils.isNotBlank(param.getFsrcPcBtm())) {
|
|
|
- createPlanFsrcPcBtm(param);
|
|
|
+ for (Plan multiPlanGoodsContentVal7 : param.getMultiPlanGoodsContentVal7()) {
|
|
|
+ if(param.getMultiPlanGoodsContentVal7().size()>0) {
|
|
|
+ goods7.setItemVal(multiPlanGoodsContentVal7.getGoodsItemVal());
|
|
|
+ planDao.createPlanContentsItem(goods7);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
- // 웹용 상단MOBILE 등록
|
|
|
- if (StringUtils.isNotBlank(param.getFsrcMobileBtm())) {
|
|
|
- createPlanFsrcMobileBtm(param);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품 등록 -- 8
|
|
|
+ for (Plan multiPlanGoodsContent8 : param.getMultiPlanGoodsContent8()) {
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(multiPlanGoodsContent8.getGoodsType())) {
|
|
|
+ String goodsTitle = multiPlanGoodsContent8.getGoodsTitle();
|
|
|
+ String goodsUrl = multiPlanGoodsContent8.getGoodsUrl();
|
|
|
+ String goodsType = multiPlanGoodsContent8.getGoodsType();
|
|
|
+ long goodsDispOrd = multiPlanGoodsContent8.getGoodsDispOrd();
|
|
|
+ String goodsDispYn = multiPlanGoodsContent8.getGoodsDispYn();
|
|
|
+
|
|
|
+ Plan goods8 = new Plan();
|
|
|
+ goods8.setRegNo(regNo);
|
|
|
+ goods8.setUpdNo(regNo);
|
|
|
+ goods8.setTitle(goodsTitle);
|
|
|
+ goods8.setDispOrd(goodsDispOrd);
|
|
|
+ goods8.setPlanSq(param.getPlanSq());
|
|
|
+ goods8.setDispYn(goodsDispYn);
|
|
|
+ goods8.setTmplType(goodsType);
|
|
|
+ goods8.setLinkUrl(goodsUrl);
|
|
|
+
|
|
|
+ planDao.createPlanContents(goods8);
|
|
|
+
|
|
|
+ for (Plan multiPlanGoodsContentVal8 : param.getMultiPlanGoodsContentVal8()) {
|
|
|
+ if(param.getMultiPlanGoodsContentVal8().size()>0) {
|
|
|
+ goods8.setItemVal(multiPlanGoodsContentVal8.getGoodsItemVal());
|
|
|
+ planDao.createPlanContentsItem(goods8);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ //상품 등록 -- 9
|
|
|
+ for (Plan multiPlanGoodsContent9 : param.getMultiPlanGoodsContent9()) {
|
|
|
|
|
|
- //상품 등록
|
|
|
+ if (!StringUtils.isEmpty(multiPlanGoodsContent9.getGoodsType())) {
|
|
|
+ String goodsTitle = multiPlanGoodsContent9.getGoodsTitle();
|
|
|
+ String goodsUrl = multiPlanGoodsContent9.getGoodsUrl();
|
|
|
+ String goodsType = multiPlanGoodsContent9.getGoodsType();
|
|
|
+ long goodsDispOrd = multiPlanGoodsContent9.getGoodsDispOrd();
|
|
|
+ String goodsDispYn = multiPlanGoodsContent9.getGoodsDispYn();
|
|
|
+
|
|
|
+ Plan goods9 = new Plan();
|
|
|
+ goods9.setRegNo(regNo);
|
|
|
+ goods9.setUpdNo(regNo);
|
|
|
+ goods9.setTitle(goodsTitle);
|
|
|
+ goods9.setDispOrd(goodsDispOrd);
|
|
|
+ goods9.setPlanSq(param.getPlanSq());
|
|
|
+ goods9.setDispYn(goodsDispYn);
|
|
|
+ goods9.setTmplType(goodsType);
|
|
|
+ goods9.setLinkUrl(goodsUrl);
|
|
|
+
|
|
|
+ planDao.createPlanContents(goods9);
|
|
|
+
|
|
|
+ for (Plan multiPlanGoodsContentVal9 : param.getMultiPlanGoodsContentVal9()) {
|
|
|
+ if(param.getMultiPlanGoodsContentVal9().size()>0) {
|
|
|
+ goods9.setItemVal(multiPlanGoodsContentVal9.getGoodsItemVal());
|
|
|
+ planDao.createPlanContentsItem(goods9);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ //상품 등록 -- 10
|
|
|
+ for (Plan multiPlanGoodsContent10 : param.getMultiPlanGoodsContent10()) {
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(multiPlanGoodsContent10.getGoodsType())) {
|
|
|
+ String goodsTitle = multiPlanGoodsContent10.getGoodsTitle();
|
|
|
+ String goodsUrl = multiPlanGoodsContent10.getGoodsUrl();
|
|
|
+ String goodsType = multiPlanGoodsContent10.getGoodsType();
|
|
|
+ long goodsDispOrd = multiPlanGoodsContent10.getGoodsDispOrd();
|
|
|
+ String goodsDispYn = multiPlanGoodsContent10.getGoodsDispYn();
|
|
|
+
|
|
|
+ Plan goods10 = new Plan();
|
|
|
+ goods10.setRegNo(regNo);
|
|
|
+ goods10.setUpdNo(regNo);
|
|
|
+ goods10.setTitle(goodsTitle);
|
|
|
+ goods10.setDispOrd(goodsDispOrd);
|
|
|
+ goods10.setPlanSq(param.getPlanSq());
|
|
|
+ goods10.setDispYn(goodsDispYn);
|
|
|
+ goods10.setTmplType(goodsType);
|
|
|
+ goods10.setLinkUrl(goodsUrl);
|
|
|
+
|
|
|
+ planDao.createPlanContents(goods10);
|
|
|
+
|
|
|
+ for (Plan multiPlanGoodsContentVal10 : param.getMultiPlanGoodsContentVal10()) {
|
|
|
+ if(param.getMultiPlanGoodsContentVal10().size()>0) {
|
|
|
+ goods10.setItemVal(multiPlanGoodsContentVal10.getGoodsItemVal());
|
|
|
+ planDao.createPlanContentsItem(goods10);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 기획전 템플릿 상세조회 - 리뷰
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 3 .2
|
|
|
+ */
|
|
|
+ public Collection<Plan> getPlanContentReviewList(Plan param){
|
|
|
+ return planDao.getPlanContentReviewList(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 기획전 템플릿 상세조회 - 쿠폰
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 3 .2
|
|
|
+ */
|
|
|
+ public Collection<Plan> getPlanContentCouponList(Plan param){
|
|
|
+ return planDao.getPlanContentCouponList(param);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 기획전 템플릿 상세조회 - 파일
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 3 .2
|
|
|
+ */
|
|
|
+ public Collection<Plan> getPlanContentFileList(Plan param){
|
|
|
+ return planDao.getPlanContentFileList(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 기획전 템플릿 상세조회 - html
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 3 .2
|
|
|
+ */
|
|
|
+ public Collection<Plan> getPlanContentFsrcList(Plan param){
|
|
|
+ return planDao.getPlanContentFsrcList(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 기획전 템플릿 상세조회 - goods
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 3 .2
|
|
|
+ */
|
|
|
+ public Collection<Plan> getPlanContentGoodsList(Plan param){
|
|
|
+ return planDao.getPlanContentGoodsList(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 기획전 템플릿 상세조회 - goods 목록조회
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 3 .2
|
|
|
+ */
|
|
|
+ public Collection<Plan> getPlanContentGoodsDetailList(Plan param){
|
|
|
+ return planDao.getPlanContentGoodsDetailList(param);
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 기획전 템플릿 이미지 첨부파일 삭제
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 3. 2
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void deletePlanTemplateFile(Plan plan) {
|
|
|
+ planDao.deletePlanTemplateFile(plan);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
/*
|
|
|
* 기획전 템플릿 HTML[상단] PC 소스 등록
|