|
|
@@ -90,26 +90,7 @@ public class TsaPlanService {
|
|
|
param.setMainPimg("/planning/" + yearMonth + "/" + newFilename);
|
|
|
param.setMainMimg("/planning/" + yearMonth + "/" + newFilename);
|
|
|
}
|
|
|
-// if(param.getMainMimg() != null && !"".equals(param.getMainMimg())){
|
|
|
-// String imgInd = String.valueOf(ind);
|
|
|
-// if (ind < 10) {
|
|
|
-// imgInd = "0" + imgInd;
|
|
|
-// }
|
|
|
-// String planUploadPath = env.getProperty("upload.default.target.path");
|
|
|
-// String yearMonth = GagaDateUtil.getToday().substring(0, 6);
|
|
|
-// planUploadPath = GagaFileUtil.getConcatenationPath(planUploadPath, "/planning");
|
|
|
-// File newFile = new File(GagaFileUtil.getConcatenationPath(planUploadPath, param.getMainMimg()));
|
|
|
-// planUploadPath = GagaFileUtil.getConcatenationPath(planUploadPath, yearMonth);
|
|
|
-// String newFilename = "PLANNING_" + GagaDateUtil.getTodayDateTime() + "_" + imgInd + "." + StringUtils.getFilenameExtension(param.getMainMimg());
|
|
|
-// File uniqueFile = GagaFileUtil.getUniqueFile(new File(GagaFileUtil.getConcatenationPath(planUploadPath, newFilename)));
|
|
|
-// // Rename a file
|
|
|
-// File path = new File(planUploadPath);
|
|
|
-// if (!path.exists()) {
|
|
|
-// path.mkdir();
|
|
|
-// }
|
|
|
-// newFile.renameTo(uniqueFile);
|
|
|
-// param.setMainMimg("/planning/" + yearMonth + "/" + newFilename);
|
|
|
-// }
|
|
|
+
|
|
|
planDao.createPlanInfo(param);
|
|
|
|
|
|
String[] brand = param.getMultiBrand();
|
|
|
@@ -168,24 +149,28 @@ public class TsaPlanService {
|
|
|
planDao.savePlanAttendBenefit(attendInfo);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- log.debug("planSq : {}", param.getPlanSq());
|
|
|
-
|
|
|
- //기획전 응모이벤트
|
|
|
-// if (StringUtils.isNotBlank(param.getPrivacyPolicy())) {
|
|
|
-// int i = 0;
|
|
|
-// for (String planQtitle : param.getPlanQtitle()) {
|
|
|
-// PlanQuestAnswer planQuestAnswer = new PlanQuestAnswer();
|
|
|
-// planQuestAnswer.setPlanSq(param.getPlanSq());
|
|
|
-// planQuestAnswer.setPlanQtitle(planQtitle);
|
|
|
-// planQuestAnswer.setAttachYn(param.getAttachYn()[i]);
|
|
|
-// planQuestAnswer.setQuestNo(i);
|
|
|
-// planQuestAnswer.setRegNo(param.getRegNo());
|
|
|
-// planQuestAnswer.setUpdNo(param.getUpdNo());
|
|
|
-// planDao.savePlanQuestion(planQuestAnswer);
|
|
|
-// i++;
|
|
|
-// }
|
|
|
-// }
|
|
|
+ // 총알배송일떼 -- 코너에 자동으로 자사브랜드 insert
|
|
|
+ String planGb = param.getPlanGb();
|
|
|
+ if ("S".equals(planGb)) {
|
|
|
+
|
|
|
+ Collection<Plan> brandList = planDao.getShotSelfBrandList();
|
|
|
+ int idx = 1;
|
|
|
+ for (Plan corner : brandList) {
|
|
|
+ // 5열 전시 default
|
|
|
+ corner.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
+ corner.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
+ corner.setPlanSq(param.getPlanSq());
|
|
|
+ corner.setDispStdt(param.getDispStdt());
|
|
|
+ corner.setDispEddt(param.getDispEddt());
|
|
|
+ corner.setCornerDispType("G045_5");
|
|
|
+ corner.setDispOrd(idx);
|
|
|
+ corner.setCornerNm(corner.getBrandNm());
|
|
|
+
|
|
|
+ planDao.savePlanCornerInfo(corner);
|
|
|
+ idx++;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -389,29 +374,7 @@ public class TsaPlanService {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-// if(param.getMainMimg() != null && !"".equals(param.getMainMimg())){
|
|
|
-// String imgInd = String.valueOf(ind);
|
|
|
-// if (ind < 10) {
|
|
|
-// imgInd = "0" + imgInd;
|
|
|
-// }
|
|
|
-// if(!param.getMainMimg().contains("planning")) {
|
|
|
-// String planUploadPath = env.getProperty("upload.default.target.path");
|
|
|
-// String yearMonth = GagaDateUtil.getToday().substring(0, 6);
|
|
|
-// planUploadPath = GagaFileUtil.getConcatenationPath(planUploadPath, "/planning");
|
|
|
-// File newFile = new File(GagaFileUtil.getConcatenationPath(planUploadPath, param.getMainMimg()));
|
|
|
-// planUploadPath = GagaFileUtil.getConcatenationPath(planUploadPath, yearMonth);
|
|
|
-// String newFilename = "PLANNING_" + GagaDateUtil.getTodayDateTime() + "_" + imgInd + "." + StringUtils.getFilenameExtension(param.getMainMimg());
|
|
|
-// File uniqueFile = GagaFileUtil.getUniqueFile(new File(GagaFileUtil.getConcatenationPath(planUploadPath, newFilename)));
|
|
|
-// // Rename a file
|
|
|
-// File path = new File(planUploadPath);
|
|
|
-// if (!path.exists()) {
|
|
|
-// path.mkdir();
|
|
|
-// }
|
|
|
-// newFile.renameTo(uniqueFile);
|
|
|
-// param.setMainMimg("/planning/" + yearMonth + "/" + newFilename);
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
+
|
|
|
// 이벤트 출석체크
|
|
|
planDao.deletePlanAttendBenefitList(param);
|
|
|
|
|
|
@@ -426,21 +389,6 @@ public class TsaPlanService {
|
|
|
// 최종업데이트
|
|
|
planDao.updatePlanInfo(param);
|
|
|
|
|
|
- //기획전 응모이벤트
|
|
|
-// if (StringUtils.isNotBlank(param.getPrivacyPolicy())) {
|
|
|
-// int i = 0;
|
|
|
-// for (String planQtitle : param.getPlanQtitle()) {
|
|
|
-// PlanQuestAnswer planQuestAnswer = new TsaPlanQuestAnswer();
|
|
|
-// planQuestAnswer.setPlanSq(param.getPlanSq());
|
|
|
-// planQuestAnswer.setPlanQtitle(planQtitle);
|
|
|
-// planQuestAnswer.setAttachYn(param.getAttachYn()[i]);
|
|
|
-// planQuestAnswer.setQuestNo(i);
|
|
|
-// planQuestAnswer.setRegNo(param.getRegNo());
|
|
|
-// planQuestAnswer.setUpdNo(param.getUpdNo());
|
|
|
-// planDao.savePlanQuestion(planQuestAnswer);
|
|
|
-// i++;
|
|
|
-// }
|
|
|
-// }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -1568,10 +1516,6 @@ public class TsaPlanService {
|
|
|
@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("T");
|
|
|
fsrcTop.setRegNo(param.getRegNo());
|
|
|
@@ -1582,54 +1526,6 @@ public class TsaPlanService {
|
|
|
fsrcTop.setFsrcMob(param.getFsrcMobileTop());
|
|
|
planDao.savePlanFsrcInfo(fsrcTop);
|
|
|
|
|
|
-// if (fsrcPcTotalCnt > byteCnt || fsrcMobileTotalCnt > byteCnt) { // 4000 바이트 이상 일 때 파싱.
|
|
|
-// StringBuilder sbStr = new StringBuilder(4000);
|
|
|
-//
|
|
|
-// int cnt = 0;
|
|
|
-// int getCnt = 0;
|
|
|
-// int tempCnt = 1500;
|
|
|
-//
|
|
|
-// for (char ch : param.getFsrcPcTop().toCharArray()) {
|
|
|
-// getCnt++;
|
|
|
-// sbStr.append(ch);
|
|
|
-//
|
|
|
-// if (getCnt == tempCnt || getCnt == fsrcPcTotalCnt) {
|
|
|
-// fsrcTop.setSeq(cnt + 1);
|
|
|
-// fsrcTop.setFsrcPc(sbStr.toString());
|
|
|
-//
|
|
|
-// // 초기화
|
|
|
-// sbStr.delete(0, tempCnt);
|
|
|
-// cnt++;
|
|
|
-// tempCnt += byteCnt;
|
|
|
-//
|
|
|
-// //planDao.savePlanFsrcInfo(fsrcTop);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// for (char ch : param.getFsrcMobileTop().toCharArray()) {
|
|
|
-// getCnt++;
|
|
|
-// sbStr.append(ch);
|
|
|
-//
|
|
|
-// if (getCnt == tempCnt || getCnt == fsrcPcTotalCnt) {
|
|
|
-// fsrcTop.setSeq(cnt + 1);
|
|
|
-// fsrcTop.setFsrcMob(sbStr.toString());
|
|
|
-//
|
|
|
-// // 초기화
|
|
|
-// sbStr.delete(0, tempCnt);
|
|
|
-// cnt++;
|
|
|
-// tempCnt += byteCnt;
|
|
|
-//
|
|
|
-// }
|
|
|
-// }
|
|
|
-// planDao.savePlanFsrcInfo(fsrcTop);
|
|
|
-// }
|
|
|
-// else {
|
|
|
-// fsrcTop.setSeq(1);
|
|
|
-// fsrcTop.setFsrcPc(param.getFsrcPcTop());
|
|
|
-// fsrcTop.setFsrcMob(param.getFsrcMobileTop());
|
|
|
-//
|
|
|
-// planDao.savePlanFsrcInfo(fsrcTop);
|
|
|
-// }
|
|
|
return param;
|
|
|
}
|
|
|
|
|
|
@@ -1640,10 +1536,6 @@ public class TsaPlanService {
|
|
|
@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("B");
|
|
|
fsrcBtm.setRegNo(param.getRegNo());
|
|
|
@@ -1652,55 +1544,7 @@ public class TsaPlanService {
|
|
|
fsrcBtm.setFsrcPc(param.getFsrcPcBtm());
|
|
|
fsrcBtm.setFsrcMob(param.getFsrcMobileBtm());
|
|
|
planDao.savePlanFsrcInfo(fsrcBtm);
|
|
|
-
|
|
|
-// if (fsrcPcTotalCnt > byteCnt) { // 4000 바이트 이상 일 때 파싱.
|
|
|
-// StringBuilder sbStr = new StringBuilder(4000);
|
|
|
-//
|
|
|
-// int cnt = 0;
|
|
|
-// int getCnt = 0;
|
|
|
-// int tempCnt = 1500;
|
|
|
-//
|
|
|
-// for (char ch : param.getFsrcPcBtm().toCharArray()) {
|
|
|
-// getCnt++;
|
|
|
-// sbStr.append(ch);
|
|
|
-//
|
|
|
-// if (getCnt == tempCnt || getCnt == fsrcPcTotalCnt) {
|
|
|
-// fsrcBtm.setSeq(cnt + 1);
|
|
|
-// fsrcBtm.setFsrcPc(sbStr.toString());
|
|
|
-//
|
|
|
-// // 초기화
|
|
|
-// sbStr.delete(0, tempCnt);
|
|
|
-// cnt++;
|
|
|
-// tempCnt += byteCnt;
|
|
|
-//
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
-//
|
|
|
-// for (char ch : param.getFsrcMobileBtm().toCharArray()) {
|
|
|
-// getCnt++;
|
|
|
-// sbStr.append(ch);
|
|
|
-//
|
|
|
-// if (getCnt == tempCnt || getCnt == fsrcPcTotalCnt) {
|
|
|
-// fsrcBtm.setSeq(cnt + 1);
|
|
|
-// fsrcBtm.setFsrcMob(sbStr.toString());
|
|
|
-//
|
|
|
-// // 초기화
|
|
|
-// sbStr.delete(0, tempCnt);
|
|
|
-// cnt++;
|
|
|
-// tempCnt += byteCnt;
|
|
|
-//
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// planDao.savePlanFsrcInfo(fsrcBtm);
|
|
|
-// } else {
|
|
|
-// fsrcBtm.setSeq(1);
|
|
|
-// fsrcBtm.setFsrcPc(param.getFsrcPcBtm());
|
|
|
-// fsrcBtm.setFsrcMob(param.getFsrcMobileBtm());
|
|
|
-//
|
|
|
-// planDao.savePlanFsrcInfo(fsrcBtm);
|
|
|
-// }
|
|
|
+
|
|
|
return param;
|
|
|
}
|
|
|
|