|
|
@@ -203,22 +203,22 @@ public class TsaPlanService {
|
|
|
* @author sowon
|
|
|
* @since 2021. 2. 8
|
|
|
*/
|
|
|
- public Plan getPlanFsrcPcList(Plan param) {
|
|
|
- param.setFrontGb("P");
|
|
|
- Collection<Plan> planFsrcList = planDao.getPlanFsrcList(param);
|
|
|
- Plan planPc = new Plan();
|
|
|
-
|
|
|
- for (Plan pcTemp : planFsrcList) {
|
|
|
- if (StringUtils.isNotBlank(planPc.getFsrc())) {
|
|
|
- planPc.setFsrc(planPc.getFsrc() + pcTemp.getFsrc());
|
|
|
- } else {
|
|
|
- planPc.setFsrc(pcTemp.getFsrc());
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- log.debug("fsrcPc = {}", planPc.getFsrcPc());
|
|
|
- return planPc;
|
|
|
- }
|
|
|
+// public Plan getPlanFsrcPcList(Plan param) {
|
|
|
+// param.setFrontGb("P");
|
|
|
+// Collection<Plan> planFsrcList = planDao.getPlanFsrcList(param);
|
|
|
+// Plan planPc = new Plan();
|
|
|
+//
|
|
|
+// for (Plan pcTemp : planFsrcList) {
|
|
|
+// if (StringUtils.isNotBlank(planPc.getFsrc())) {
|
|
|
+// planPc.setFsrc(planPc.getFsrc() + pcTemp.getFsrc());
|
|
|
+// } else {
|
|
|
+// planPc.setFsrc(pcTemp.getFsrc());
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
+// log.debug("fsrcPc = {}", planPc.getFsrcPc());
|
|
|
+// return planPc;
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 기획전 모바일용 소스 조회
|
|
|
@@ -228,22 +228,22 @@ public class TsaPlanService {
|
|
|
* @author sowon
|
|
|
* @since 2021. 2. 8
|
|
|
*/
|
|
|
- public Plan getPlanFsrcMobileList(Plan param) {
|
|
|
- param.setFrontGb("M");
|
|
|
- Collection<Plan> planFsrcList = planDao.getPlanFsrcList(param);
|
|
|
- Plan planMobile = new Plan();
|
|
|
-
|
|
|
- for (Plan mobileTemp : planFsrcList) {
|
|
|
- if (StringUtils.isNotBlank(planMobile.getFsrc())) {
|
|
|
- planMobile.setFsrc(planMobile.getFsrc() + mobileTemp.getFsrc());
|
|
|
- } else {
|
|
|
- planMobile.setFsrc(mobileTemp.getFsrc());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- return planMobile;
|
|
|
- }
|
|
|
-
|
|
|
+// public Plan getPlanFsrcMobileList(Plan param) {
|
|
|
+// param.setFrontGb("M");
|
|
|
+// Collection<Plan> planFsrcList = planDao.getPlanFsrcList(param);
|
|
|
+// Plan planMobile = new Plan();
|
|
|
+//
|
|
|
+// for (Plan mobileTemp : planFsrcList) {
|
|
|
+// if (StringUtils.isNotBlank(planMobile.getFsrc())) {
|
|
|
+// planMobile.setFsrc(planMobile.getFsrc() + mobileTemp.getFsrc());
|
|
|
+// } else {
|
|
|
+// planMobile.setFsrc(mobileTemp.getFsrc());
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// return planMobile;
|
|
|
+// }
|
|
|
+//
|
|
|
/**
|
|
|
* 기획전 웹 수정
|
|
|
*
|
|
|
@@ -283,10 +283,9 @@ public class TsaPlanService {
|
|
|
}
|
|
|
|
|
|
// 기존 기획전 카테고리 삭제
|
|
|
- planDao.deletePlanCate(param);
|
|
|
-// for (int i = 0; i < param.getMultiCate().length; i++) {
|
|
|
-// planDao.deletePlanCate(param);
|
|
|
-// }
|
|
|
+ for (int i = 0; i < param.getMultiCate().length; i++) {
|
|
|
+ planDao.deletePlanCate(param);
|
|
|
+ }
|
|
|
|
|
|
String[] cate = param.getMultiCate();
|
|
|
// 기획전 카테고리insert
|
|
|
@@ -299,10 +298,9 @@ public class TsaPlanService {
|
|
|
}
|
|
|
|
|
|
// 기존 기획전 카테고리 삭제
|
|
|
- planDao.deletePlanCate(param);
|
|
|
-// for (int i = 0; i < param.getMultiCate().length; i++) {
|
|
|
-// planDao.deletePlanCate(param);
|
|
|
-// }
|
|
|
+ for (int i = 0; i < param.getMultiBrand().length; i++) {
|
|
|
+ planDao.deletePlanBrand(param);;
|
|
|
+ }
|
|
|
|
|
|
|
|
|
String[] brand = param.getMultiBrand();
|
|
|
@@ -707,7 +705,7 @@ public class TsaPlanService {
|
|
|
// 리뷰 등록
|
|
|
Plan rePlan = new Plan();
|
|
|
//리뷰 등록 - tb_plan_contents
|
|
|
- if(param.getReTitle() != "" || param.getMultiPlanReview().length>0) {
|
|
|
+ if(param.getReTitle() != "" || !StringUtils.isAllEmpty(param.getMultiPlanReview())) {
|
|
|
rePlan.setRegNo(regNo);
|
|
|
rePlan.setUpdNo(regNo);
|
|
|
rePlan.setTmplType("G082_10");
|
|
|
@@ -768,7 +766,7 @@ public class TsaPlanService {
|
|
|
|
|
|
//이미지등록
|
|
|
Plan filePlan = new Plan();
|
|
|
- if(param.getMultiPlanFile().length>=0) {
|
|
|
+ if(!StringUtils.isAllEmpty(param.getMultiPlanFile()) || param.getFileDispOrd() >=0) {
|
|
|
filePlan.setRegNo(regNo);
|
|
|
filePlan.setUpdNo(regNo);
|
|
|
filePlan.setTmplType("G082_30");
|
|
|
@@ -783,61 +781,33 @@ public class TsaPlanService {
|
|
|
/* 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);
|
|
|
- }
|
|
|
+ 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();
|
|
|
+ //HTML[PC] 상단 하단 등록
|
|
|
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
|
|
|
@@ -849,6 +819,7 @@ public class TsaPlanService {
|
|
|
String goodsType = multiPlanGoodsContent1.getGoodsType();
|
|
|
long goodsDispOrd = multiPlanGoodsContent1.getGoodsDispOrd();
|
|
|
String goodsDispYn = multiPlanGoodsContent1.getGoodsDispYn();
|
|
|
+ Integer goodsPlanContSq = multiPlanGoodsContent1.getGoodsPlanContSq();
|
|
|
|
|
|
Plan goods1 = new Plan();
|
|
|
goods1.setRegNo(regNo);
|
|
|
@@ -859,9 +830,13 @@ public class TsaPlanService {
|
|
|
goods1.setDispYn(goodsDispYn);
|
|
|
goods1.setTmplType(goodsType);
|
|
|
goods1.setLinkUrl(goodsUrl);
|
|
|
+ goods1.setPlanContSq(goodsPlanContSq);
|
|
|
|
|
|
planDao.createPlanContents(goods1);
|
|
|
|
|
|
+ // 기존 상품1 삭제
|
|
|
+ planDao.deletePlanContentItem(goodsPlanContSq);
|
|
|
+
|
|
|
for (Plan multiPlanGoodsContentVal1 : param.getMultiPlanGoodsContentVal1()) {
|
|
|
if(param.getMultiPlanGoodsContentVal1().size()>0) {
|
|
|
goods1.setItemVal(multiPlanGoodsContentVal1.getGoodsItemVal());
|
|
|
@@ -881,6 +856,7 @@ public class TsaPlanService {
|
|
|
String goodsType = multiPlanGoodsContent2.getGoodsType();
|
|
|
long goodsDispOrd = multiPlanGoodsContent2.getGoodsDispOrd();
|
|
|
String goodsDispYn = multiPlanGoodsContent2.getGoodsDispYn();
|
|
|
+ Integer goodsPlanContSq = multiPlanGoodsContent2.getGoodsPlanContSq();
|
|
|
|
|
|
Plan goods2 = new Plan();
|
|
|
goods2.setRegNo(regNo);
|
|
|
@@ -891,9 +867,13 @@ public class TsaPlanService {
|
|
|
goods2.setDispYn(goodsDispYn);
|
|
|
goods2.setTmplType(goodsType);
|
|
|
goods2.setLinkUrl(goodsUrl);
|
|
|
+ goods2.setPlanContSq(goodsPlanContSq);
|
|
|
|
|
|
planDao.createPlanContents(goods2);
|
|
|
|
|
|
+ // 기존 상품2 삭제
|
|
|
+ planDao.deletePlanContentItem(goodsPlanContSq);
|
|
|
+
|
|
|
for (Plan multiPlanGoodsContentVal2 : param.getMultiPlanGoodsContentVal2()) {
|
|
|
if(param.getMultiPlanGoodsContentVal2().size()>0) {
|
|
|
goods2.setItemVal(multiPlanGoodsContentVal2.getGoodsItemVal());
|
|
|
@@ -913,6 +893,7 @@ public class TsaPlanService {
|
|
|
String goodsType = multiPlanGoodsContent3.getGoodsType();
|
|
|
long goodsDispOrd = multiPlanGoodsContent3.getGoodsDispOrd();
|
|
|
String goodsDispYn = multiPlanGoodsContent3.getGoodsDispYn();
|
|
|
+ Integer goodsPlanContSq = multiPlanGoodsContent3.getGoodsPlanContSq();
|
|
|
|
|
|
Plan goods3 = new Plan();
|
|
|
goods3.setRegNo(regNo);
|
|
|
@@ -923,9 +904,13 @@ public class TsaPlanService {
|
|
|
goods3.setDispYn(goodsDispYn);
|
|
|
goods3.setTmplType(goodsType);
|
|
|
goods3.setLinkUrl(goodsUrl);
|
|
|
+ goods3.setPlanContSq(goodsPlanContSq);
|
|
|
|
|
|
planDao.createPlanContents(goods3);
|
|
|
|
|
|
+ // 기존 상품3 삭제
|
|
|
+ planDao.deletePlanContentItem(goodsPlanContSq);
|
|
|
+
|
|
|
for (Plan multiPlanGoodsContentVal3 : param.getMultiPlanGoodsContentVal3()) {
|
|
|
if(param.getMultiPlanGoodsContentVal3().size()>0) {
|
|
|
goods3.setItemVal(multiPlanGoodsContentVal3.getGoodsItemVal());
|
|
|
@@ -945,6 +930,7 @@ public class TsaPlanService {
|
|
|
String goodsType = multiPlanGoodsContent4.getGoodsType();
|
|
|
long goodsDispOrd = multiPlanGoodsContent4.getGoodsDispOrd();
|
|
|
String goodsDispYn = multiPlanGoodsContent4.getGoodsDispYn();
|
|
|
+ Integer goodsPlanContSq = multiPlanGoodsContent4.getGoodsPlanContSq();
|
|
|
|
|
|
Plan goods4 = new Plan();
|
|
|
goods4.setRegNo(regNo);
|
|
|
@@ -955,9 +941,13 @@ public class TsaPlanService {
|
|
|
goods4.setDispYn(goodsDispYn);
|
|
|
goods4.setTmplType(goodsType);
|
|
|
goods4.setLinkUrl(goodsUrl);
|
|
|
+ goods4.setPlanContSq(goodsPlanContSq);
|
|
|
|
|
|
planDao.createPlanContents(goods4);
|
|
|
|
|
|
+ // 기존 상품4 삭제
|
|
|
+ planDao.deletePlanContentItem(goodsPlanContSq);
|
|
|
+
|
|
|
for (Plan multiPlanGoodsContentVal4 : param.getMultiPlanGoodsContentVal4()) {
|
|
|
if(param.getMultiPlanGoodsContentVal4().size()>0) {
|
|
|
goods4.setItemVal(multiPlanGoodsContentVal4.getGoodsItemVal());
|
|
|
@@ -977,6 +967,8 @@ public class TsaPlanService {
|
|
|
String goodsType = multiPlanGoodsContent5.getGoodsType();
|
|
|
long goodsDispOrd = multiPlanGoodsContent5.getGoodsDispOrd();
|
|
|
String goodsDispYn = multiPlanGoodsContent5.getGoodsDispYn();
|
|
|
+ Integer goodsPlanContSq = multiPlanGoodsContent5.getGoodsPlanContSq();
|
|
|
+
|
|
|
|
|
|
Plan goods5 = new Plan();
|
|
|
goods5.setRegNo(regNo);
|
|
|
@@ -987,9 +979,13 @@ public class TsaPlanService {
|
|
|
goods5.setDispYn(goodsDispYn);
|
|
|
goods5.setTmplType(goodsType);
|
|
|
goods5.setLinkUrl(goodsUrl);
|
|
|
+ goods5.setPlanContSq(goodsPlanContSq);
|
|
|
|
|
|
planDao.createPlanContents(goods5);
|
|
|
|
|
|
+ // 기존 상품5 삭제
|
|
|
+ planDao.deletePlanContentItem(goodsPlanContSq);
|
|
|
+
|
|
|
for (Plan multiPlanGoodsContentVal5 : param.getMultiPlanGoodsContentVal5()) {
|
|
|
if(param.getMultiPlanGoodsContentVal5().size()>0) {
|
|
|
goods5.setItemVal(multiPlanGoodsContentVal5.getGoodsItemVal());
|
|
|
@@ -1009,6 +1005,7 @@ public class TsaPlanService {
|
|
|
String goodsType = multiPlanGoodsContent6.getGoodsType();
|
|
|
long goodsDispOrd = multiPlanGoodsContent6.getGoodsDispOrd();
|
|
|
String goodsDispYn = multiPlanGoodsContent6.getGoodsDispYn();
|
|
|
+ Integer goodsPlanContSq = multiPlanGoodsContent6.getGoodsPlanContSq();
|
|
|
|
|
|
Plan goods6 = new Plan();
|
|
|
goods6.setRegNo(regNo);
|
|
|
@@ -1019,9 +1016,13 @@ public class TsaPlanService {
|
|
|
goods6.setDispYn(goodsDispYn);
|
|
|
goods6.setTmplType(goodsType);
|
|
|
goods6.setLinkUrl(goodsUrl);
|
|
|
+ goods6.setPlanContSq(goodsPlanContSq);
|
|
|
|
|
|
planDao.createPlanContents(goods6);
|
|
|
|
|
|
+ // 기존 상품6 삭제
|
|
|
+ planDao.deletePlanContentItem(goodsPlanContSq);
|
|
|
+
|
|
|
for (Plan multiPlanGoodsContentVal6 : param.getMultiPlanGoodsContentVal6()) {
|
|
|
if(param.getMultiPlanGoodsContentVal6().size()>0) {
|
|
|
goods6.setItemVal(multiPlanGoodsContentVal6.getGoodsItemVal());
|
|
|
@@ -1041,6 +1042,7 @@ public class TsaPlanService {
|
|
|
String goodsType = multiPlanGoodsContent7.getGoodsType();
|
|
|
long goodsDispOrd = multiPlanGoodsContent7.getGoodsDispOrd();
|
|
|
String goodsDispYn = multiPlanGoodsContent7.getGoodsDispYn();
|
|
|
+ Integer goodsPlanContSq = multiPlanGoodsContent7.getGoodsPlanContSq();
|
|
|
|
|
|
Plan goods7 = new Plan();
|
|
|
goods7.setRegNo(regNo);
|
|
|
@@ -1051,9 +1053,13 @@ public class TsaPlanService {
|
|
|
goods7.setDispYn(goodsDispYn);
|
|
|
goods7.setTmplType(goodsType);
|
|
|
goods7.setLinkUrl(goodsUrl);
|
|
|
+ goods7.setPlanContSq(goodsPlanContSq);
|
|
|
|
|
|
planDao.createPlanContents(goods7);
|
|
|
|
|
|
+ // 기존 상품7 삭제
|
|
|
+ planDao.deletePlanContentItem(goodsPlanContSq);
|
|
|
+
|
|
|
for (Plan multiPlanGoodsContentVal7 : param.getMultiPlanGoodsContentVal7()) {
|
|
|
if(param.getMultiPlanGoodsContentVal7().size()>0) {
|
|
|
goods7.setItemVal(multiPlanGoodsContentVal7.getGoodsItemVal());
|
|
|
@@ -1073,6 +1079,7 @@ public class TsaPlanService {
|
|
|
String goodsType = multiPlanGoodsContent8.getGoodsType();
|
|
|
long goodsDispOrd = multiPlanGoodsContent8.getGoodsDispOrd();
|
|
|
String goodsDispYn = multiPlanGoodsContent8.getGoodsDispYn();
|
|
|
+ Integer goodsPlanContSq = multiPlanGoodsContent8.getGoodsPlanContSq();
|
|
|
|
|
|
Plan goods8 = new Plan();
|
|
|
goods8.setRegNo(regNo);
|
|
|
@@ -1083,9 +1090,13 @@ public class TsaPlanService {
|
|
|
goods8.setDispYn(goodsDispYn);
|
|
|
goods8.setTmplType(goodsType);
|
|
|
goods8.setLinkUrl(goodsUrl);
|
|
|
+ goods8.setPlanContSq(goodsPlanContSq);
|
|
|
|
|
|
planDao.createPlanContents(goods8);
|
|
|
|
|
|
+ // 기존 상품8 삭제
|
|
|
+ planDao.deletePlanContentItem(goodsPlanContSq);
|
|
|
+
|
|
|
for (Plan multiPlanGoodsContentVal8 : param.getMultiPlanGoodsContentVal8()) {
|
|
|
if(param.getMultiPlanGoodsContentVal8().size()>0) {
|
|
|
goods8.setItemVal(multiPlanGoodsContentVal8.getGoodsItemVal());
|
|
|
@@ -1105,6 +1116,7 @@ public class TsaPlanService {
|
|
|
String goodsType = multiPlanGoodsContent9.getGoodsType();
|
|
|
long goodsDispOrd = multiPlanGoodsContent9.getGoodsDispOrd();
|
|
|
String goodsDispYn = multiPlanGoodsContent9.getGoodsDispYn();
|
|
|
+ Integer goodsPlanContSq = multiPlanGoodsContent9.getGoodsPlanContSq();
|
|
|
|
|
|
Plan goods9 = new Plan();
|
|
|
goods9.setRegNo(regNo);
|
|
|
@@ -1115,9 +1127,13 @@ public class TsaPlanService {
|
|
|
goods9.setDispYn(goodsDispYn);
|
|
|
goods9.setTmplType(goodsType);
|
|
|
goods9.setLinkUrl(goodsUrl);
|
|
|
+ goods9.setPlanContSq(goodsPlanContSq);
|
|
|
|
|
|
planDao.createPlanContents(goods9);
|
|
|
|
|
|
+ // 기존 상품9 삭제
|
|
|
+ planDao.deletePlanContentItem(goodsPlanContSq);
|
|
|
+
|
|
|
for (Plan multiPlanGoodsContentVal9 : param.getMultiPlanGoodsContentVal9()) {
|
|
|
if(param.getMultiPlanGoodsContentVal9().size()>0) {
|
|
|
goods9.setItemVal(multiPlanGoodsContentVal9.getGoodsItemVal());
|
|
|
@@ -1137,6 +1153,7 @@ public class TsaPlanService {
|
|
|
String goodsType = multiPlanGoodsContent10.getGoodsType();
|
|
|
long goodsDispOrd = multiPlanGoodsContent10.getGoodsDispOrd();
|
|
|
String goodsDispYn = multiPlanGoodsContent10.getGoodsDispYn();
|
|
|
+ Integer goodsPlanContSq = multiPlanGoodsContent10.getGoodsPlanContSq();
|
|
|
|
|
|
Plan goods10 = new Plan();
|
|
|
goods10.setRegNo(regNo);
|
|
|
@@ -1147,9 +1164,13 @@ public class TsaPlanService {
|
|
|
goods10.setDispYn(goodsDispYn);
|
|
|
goods10.setTmplType(goodsType);
|
|
|
goods10.setLinkUrl(goodsUrl);
|
|
|
+ goods10.setPlanContSq(goodsPlanContSq);
|
|
|
|
|
|
planDao.createPlanContents(goods10);
|
|
|
|
|
|
+ // 기존 상품10 삭제
|
|
|
+ planDao.deletePlanContentItem(goodsPlanContSq);
|
|
|
+
|
|
|
for (Plan multiPlanGoodsContentVal10 : param.getMultiPlanGoodsContentVal10()) {
|
|
|
if(param.getMultiPlanGoodsContentVal10().size()>0) {
|
|
|
goods10.setItemVal(multiPlanGoodsContentVal10.getGoodsItemVal());
|
|
|
@@ -1248,20 +1269,22 @@ public class TsaPlanService {
|
|
|
|
|
|
|
|
|
/*
|
|
|
- * 기획전 템플릿 HTML[상단] PC 소스 등록
|
|
|
+ * 기획전 템플릿 HTML[상단] PC 모바일 소스 등록
|
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
|
public Plan createPlanFsrcPcTop(Plan param) {
|
|
|
Plan fsrcTop = new Plan();
|
|
|
int fsrcPcTotalCnt = param.getFsrcPcTop().toCharArray().length;
|
|
|
+ int fsrcMobileTotalCnt = param.getFsrcMobileTop().toCharArray().length;
|
|
|
int byteCnt = 1500;
|
|
|
|
|
|
|
|
|
- fsrcTop.setFrontGb("P");
|
|
|
+ fsrcTop.setLocGb("T");
|
|
|
fsrcTop.setRegNo(param.getRegNo());
|
|
|
fsrcTop.setPlanSq(param.getPlanSq());
|
|
|
+ fsrcTop.setDispYn(param.getTopFsrcDispYn());
|
|
|
|
|
|
- if (fsrcPcTotalCnt > byteCnt) { // 4000 바이트 이상 일 때 파싱.
|
|
|
+ if (fsrcPcTotalCnt > byteCnt || fsrcMobileTotalCnt > byteCnt) { // 4000 바이트 이상 일 때 파싱.
|
|
|
StringBuilder sbStr = new StringBuilder(4000);
|
|
|
|
|
|
int cnt = 0;
|
|
|
@@ -1274,85 +1297,60 @@ public class TsaPlanService {
|
|
|
|
|
|
if (getCnt == tempCnt || getCnt == fsrcPcTotalCnt) {
|
|
|
fsrcTop.setSeq(cnt + 1);
|
|
|
- fsrcTop.setFsrcTop(sbStr.toString());
|
|
|
+ fsrcTop.setFsrcPc(sbStr.toString());
|
|
|
|
|
|
// 초기화
|
|
|
sbStr.delete(0, tempCnt);
|
|
|
cnt++;
|
|
|
tempCnt += byteCnt;
|
|
|
|
|
|
- planDao.savePlanFsrcInfo(fsrcTop);
|
|
|
+ //planDao.savePlanFsrcInfo(fsrcTop);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
- } else {
|
|
|
- fsrcTop.setSeq(1);
|
|
|
- fsrcTop.setFsrcTop(param.getFsrcPcTop());
|
|
|
-
|
|
|
- planDao.savePlanFsrcInfo(fsrcTop);
|
|
|
- }
|
|
|
- return param;
|
|
|
- }
|
|
|
-
|
|
|
- /*
|
|
|
- * 기획전 템플릿 HTML[상단] mobile 소스 등록
|
|
|
- */
|
|
|
- @Transactional("shopTxnManager")
|
|
|
- public Plan createPlanFsrcMobileTop(Plan param) {
|
|
|
- Plan fsrcMobile = new Plan();
|
|
|
-
|
|
|
- int fsrcMobileTotalCnt = param.getFsrcMobileTop().toCharArray().length;
|
|
|
- int byteCnt = 1500;
|
|
|
-
|
|
|
- fsrcMobile.setFrontGb("M");
|
|
|
- fsrcMobile.setRegNo(param.getRegNo());
|
|
|
- fsrcMobile.setPlanSq(param.getPlanSq());
|
|
|
|
|
|
- if (fsrcMobileTotalCnt > byteCnt) { // 4000 바이트 이상 일 때 파싱.
|
|
|
- StringBuilder sbStr = new StringBuilder(4000);
|
|
|
-
|
|
|
- int cnt = 0;
|
|
|
- int getCnt = 0;
|
|
|
- int tempCnt = 1500;
|
|
|
-
|
|
|
for (char ch : param.getFsrcMobileTop().toCharArray()) {
|
|
|
getCnt++;
|
|
|
sbStr.append(ch);
|
|
|
|
|
|
- if (getCnt == tempCnt || getCnt == fsrcMobileTotalCnt) {
|
|
|
-
|
|
|
- fsrcMobile.setSeq(cnt+1);
|
|
|
- fsrcMobile.setFsrcTop(sbStr.toString());
|
|
|
+ if (getCnt == tempCnt || getCnt == fsrcPcTotalCnt) {
|
|
|
+ fsrcTop.setSeq(cnt + 1);
|
|
|
+ fsrcTop.setFsrcMob(sbStr.toString());
|
|
|
|
|
|
// 초기화
|
|
|
sbStr.delete(0, tempCnt);
|
|
|
cnt++;
|
|
|
tempCnt += byteCnt;
|
|
|
-
|
|
|
- planDao.savePlanFsrcInfo(fsrcMobile);
|
|
|
+
|
|
|
}
|
|
|
- }
|
|
|
- } else {
|
|
|
- fsrcMobile.setSeq(1);
|
|
|
- fsrcMobile.setFsrcTop(param.getFsrcMobileTop());
|
|
|
- planDao.savePlanFsrcInfo(fsrcMobile);
|
|
|
+ }
|
|
|
+ planDao.savePlanFsrcInfo(fsrcTop);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ fsrcTop.setSeq(1);
|
|
|
+ fsrcTop.setFsrcPc(param.getFsrcPcTop());
|
|
|
+ fsrcTop.setFsrcMob(param.getFsrcMobileTop());
|
|
|
+
|
|
|
+ planDao.savePlanFsrcInfo(fsrcTop);
|
|
|
}
|
|
|
return param;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/*
|
|
|
- * 기획전 템플릿 HTML[하단] PC 소스 등록
|
|
|
+ * 기획전 템플릿 HTML[하단] PC 모바일 소스 등록
|
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
|
public Plan createPlanFsrcPcBtm(Plan param) {
|
|
|
Plan fsrcBtm = new Plan();
|
|
|
int fsrcPcTotalCnt = param.getFsrcPcBtm().toCharArray().length;
|
|
|
+ int fsrcMobileTotalCnt = param.getFsrcMobileBtm().toCharArray().length;
|
|
|
int byteCnt = 1500;
|
|
|
|
|
|
|
|
|
- fsrcBtm.setFrontGb("P");
|
|
|
+ fsrcBtm.setLocGb("B");
|
|
|
fsrcBtm.setRegNo(param.getRegNo());
|
|
|
fsrcBtm.setPlanSq(param.getPlanSq());
|
|
|
+ fsrcBtm.setDispYn(param.getBtmFsrcDispYn());
|
|
|
|
|
|
if (fsrcPcTotalCnt > byteCnt) { // 4000 바이트 이상 일 때 파싱.
|
|
|
StringBuilder sbStr = new StringBuilder(4000);
|
|
|
@@ -1367,72 +1365,44 @@ public class TsaPlanService {
|
|
|
|
|
|
if (getCnt == tempCnt || getCnt == fsrcPcTotalCnt) {
|
|
|
fsrcBtm.setSeq(cnt + 1);
|
|
|
- fsrcBtm.setFsrcBtm(sbStr.toString());
|
|
|
+ fsrcBtm.setFsrcPc(sbStr.toString());
|
|
|
|
|
|
// 초기화
|
|
|
sbStr.delete(0, tempCnt);
|
|
|
cnt++;
|
|
|
tempCnt += byteCnt;
|
|
|
|
|
|
- planDao.savePlanFsrcInfo(fsrcBtm);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- } else {
|
|
|
- fsrcBtm.setSeq(1);
|
|
|
- fsrcBtm.setFsrcBtm(param.getFsrcPcBtm());
|
|
|
-
|
|
|
- planDao.savePlanFsrcInfo(fsrcBtm);
|
|
|
- }
|
|
|
- return param;
|
|
|
- }
|
|
|
-
|
|
|
- /*
|
|
|
- * 기획전 템플릿 HTML[하단] mobile 소스 등록
|
|
|
- */
|
|
|
- @Transactional("shopTxnManager")
|
|
|
- public Plan createPlanFsrcMobileBtm(Plan param) {
|
|
|
- Plan fsrcMobile = new Plan();
|
|
|
-
|
|
|
- int fsrcMobileTotalCnt = param.getFsrcMobileBtm().toCharArray().length;
|
|
|
- int byteCnt = 1500;
|
|
|
-
|
|
|
- fsrcMobile.setFrontGb("M");
|
|
|
- fsrcMobile.setRegNo(param.getRegNo());
|
|
|
- fsrcMobile.setPlanSq(param.getPlanSq());
|
|
|
-
|
|
|
- if (fsrcMobileTotalCnt > byteCnt) { // 4000 바이트 이상 일 때 파싱.
|
|
|
- StringBuilder sbStr = new StringBuilder(4000);
|
|
|
-
|
|
|
- int cnt = 0;
|
|
|
- int getCnt = 0;
|
|
|
- int tempCnt = 1500;
|
|
|
-
|
|
|
+
|
|
|
for (char ch : param.getFsrcMobileBtm().toCharArray()) {
|
|
|
getCnt++;
|
|
|
sbStr.append(ch);
|
|
|
|
|
|
- if (getCnt == tempCnt || getCnt == fsrcMobileTotalCnt) {
|
|
|
-
|
|
|
- fsrcMobile.setSeq(cnt+1);
|
|
|
- fsrcMobile.setFsrcBtm(sbStr.toString());
|
|
|
+ if (getCnt == tempCnt || getCnt == fsrcPcTotalCnt) {
|
|
|
+ fsrcBtm.setSeq(cnt + 1);
|
|
|
+ fsrcBtm.setFsrcMob(sbStr.toString());
|
|
|
|
|
|
// 초기화
|
|
|
sbStr.delete(0, tempCnt);
|
|
|
cnt++;
|
|
|
tempCnt += byteCnt;
|
|
|
-
|
|
|
- planDao.savePlanFsrcInfo(fsrcMobile);
|
|
|
+
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
+
|
|
|
+ planDao.savePlanFsrcInfo(fsrcBtm);
|
|
|
} else {
|
|
|
- fsrcMobile.setSeq(1);
|
|
|
- fsrcMobile.setFsrcBtm(param.getFsrcMobileBtm());
|
|
|
- planDao.savePlanFsrcInfo(fsrcMobile);
|
|
|
+ fsrcBtm.setSeq(1);
|
|
|
+ fsrcBtm.setFsrcPc(param.getFsrcPcBtm());
|
|
|
+ fsrcBtm.setFsrcMob(param.getFsrcMobileBtm());
|
|
|
+
|
|
|
+ planDao.savePlanFsrcInfo(fsrcBtm);
|
|
|
}
|
|
|
return param;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 기획전 템플릿 목록 카운트 조회
|
|
|
@@ -1444,19 +1414,36 @@ public class TsaPlanService {
|
|
|
public int getPlanContentsCount(Plan param) {
|
|
|
return planDao.getPlanContentsCount(param);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 기획전 템플릿 상품목록 삭제
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ * @author sowon
|
|
|
+ * @since 2021. 3. 3
|
|
|
+ */
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void deletePlanContentItemGoods(Integer planContSq) {
|
|
|
+
|
|
|
+ planDao.deletePlanContentItemGoods(planContSq);
|
|
|
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
- * 기획전 템플릿 아이템 등록
|
|
|
- *
|
|
|
- * @param
|
|
|
- * @return
|
|
|
+ * 기획전 템플릿 컨텐츠 삭제
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
* @author sowon
|
|
|
- * @since 2021. 2. 25
|
|
|
+ * @since 2021. 3. 3
|
|
|
*/
|
|
|
- void createPlanContentsItem(Plan param) {
|
|
|
+
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
+ public void deletePlanContentItem(Integer planContSq) {
|
|
|
+ planDao.deletePlanContentItem(planContSq);
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
}
|