|
@@ -4,15 +4,6 @@ import java.io.File;
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
import java.util.Collection;
|
|
import java.util.Collection;
|
|
|
|
|
|
|
|
-import com.style24.persistence.domain.Category;
|
|
|
|
|
-import com.style24.persistence.domain.CategoryGoods;
|
|
|
|
|
-import com.style24.persistence.domain.Contents;
|
|
|
|
|
-import com.style24.persistence.domain.GnbTab;
|
|
|
|
|
-import com.style24.persistence.domain.Goods;
|
|
|
|
|
-import com.style24.persistence.domain.GoodsCategory;
|
|
|
|
|
-import com.style24.persistence.domain.ItemkindCategory;
|
|
|
|
|
-import com.style24.persistence.domain.MainDisplay;
|
|
|
|
|
-import com.style24.persistence.domain.SearchKeyword;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.core.env.Environment;
|
|
import org.springframework.core.env.Environment;
|
|
@@ -23,6 +14,16 @@ import org.springframework.util.StringUtils;
|
|
|
import com.style24.admin.biz.dao.TsaDisplayDao;
|
|
import com.style24.admin.biz.dao.TsaDisplayDao;
|
|
|
import com.style24.admin.support.security.session.TsaSession;
|
|
import com.style24.admin.support.security.session.TsaSession;
|
|
|
import com.style24.core.biz.service.TscCommonService;
|
|
import com.style24.core.biz.service.TscCommonService;
|
|
|
|
|
+import com.style24.persistence.domain.Category;
|
|
|
|
|
+import com.style24.persistence.domain.CategoryGoods;
|
|
|
|
|
+import com.style24.persistence.domain.Contents;
|
|
|
|
|
+import com.style24.persistence.domain.GnbTab;
|
|
|
|
|
+import com.style24.persistence.domain.Goods;
|
|
|
|
|
+import com.style24.persistence.domain.GoodsCategory;
|
|
|
|
|
+import com.style24.persistence.domain.ItemkindCategory;
|
|
|
|
|
+import com.style24.persistence.domain.MainDisplay;
|
|
|
|
|
+import com.style24.persistence.domain.SearchKeyword;
|
|
|
|
|
+import com.style24.persistence.domain.SplashImage;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
@@ -117,8 +118,7 @@ public class TsaDisplayService {
|
|
|
category.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
category.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
displayDao.saveCategory1(category);
|
|
displayDao.saveCategory1(category);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 카테고리 갱신
|
|
* 카테고리 갱신
|
|
|
* @author gagamel
|
|
* @author gagamel
|
|
@@ -222,46 +222,46 @@ public class TsaDisplayService {
|
|
|
goodsCategory.setRegNo(TsaSession.getInfo().getUserNo());
|
|
goodsCategory.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
goodsCategory.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
goodsCategory.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
|
|
|
|
|
- if(!StringUtils.isEmpty(goodsCategory.getGoodsCds())){
|
|
|
|
|
|
|
+ if (!StringUtils.isEmpty(goodsCategory.getGoodsCds())) {
|
|
|
String[] goodsCdArr = goodsCategory.getGoodsCds().split(",");
|
|
String[] goodsCdArr = goodsCategory.getGoodsCds().split(",");
|
|
|
for (String goodsCd : goodsCdArr) {
|
|
for (String goodsCd : goodsCdArr) {
|
|
|
goodsCategory.setGoodsCd(goodsCd);
|
|
goodsCategory.setGoodsCd(goodsCd);
|
|
|
int cnt = 0;
|
|
int cnt = 0;
|
|
|
for (String cateCd : goodsCategory.getCateCdArr()) {
|
|
for (String cateCd : goodsCategory.getCateCdArr()) {
|
|
|
- if(!StringUtils.isEmpty(cateCd)){
|
|
|
|
|
|
|
+ if (!StringUtils.isEmpty(cateCd)) {
|
|
|
//goodsCategory.setCateCd(cateCd);
|
|
//goodsCategory.setCateCd(cateCd);
|
|
|
//goodsCategory.setCateGb(goodsCategory.getCateGbArr()[cnt]);
|
|
//goodsCategory.setCateGb(goodsCategory.getCateGbArr()[cnt]);
|
|
|
//goodsCategory.setCateType(goodsCategory.getCateTypeArr()[cnt]);
|
|
//goodsCategory.setCateType(goodsCategory.getCateTypeArr()[cnt]);
|
|
|
//displayDao.saveGoodsCategory(goodsCategory);
|
|
//displayDao.saveGoodsCategory(goodsCategory);
|
|
|
|
|
|
|
|
- if(!"G031_20".equals(goodsCategory.getCateType())){
|
|
|
|
|
- if(!StringUtils.isEmpty(goodsCategory.getCateCd1Arr()[cnt])){
|
|
|
|
|
- String[] cate1Array = goodsCategory.getCateCd1Arr()[cnt] .split(",");
|
|
|
|
|
- if(cate1Array[1].equals("Y")){
|
|
|
|
|
|
|
+ if (!"G031_20".equals(goodsCategory.getCateType())) {
|
|
|
|
|
+ if (!StringUtils.isEmpty(goodsCategory.getCateCd1Arr()[cnt])) {
|
|
|
|
|
+ String[] cate1Array = goodsCategory.getCateCd1Arr()[cnt].split(",");
|
|
|
|
|
+ if (cate1Array[1].equals("Y")) {
|
|
|
goodsCategory.setCateCd(cate1Array[0]);
|
|
goodsCategory.setCateCd(cate1Array[0]);
|
|
|
displayDao.saveGoodsCategory(goodsCategory);
|
|
displayDao.saveGoodsCategory(goodsCategory);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(!StringUtils.isEmpty(goodsCategory.getCateCd2Arr()[cnt])){
|
|
|
|
|
- String[] cate2Array = goodsCategory.getCateCd2Arr()[cnt] .split(",");
|
|
|
|
|
- if(cate2Array[1].equals("Y")){
|
|
|
|
|
|
|
+ if (!StringUtils.isEmpty(goodsCategory.getCateCd2Arr()[cnt])) {
|
|
|
|
|
+ String[] cate2Array = goodsCategory.getCateCd2Arr()[cnt].split(",");
|
|
|
|
|
+ if (cate2Array[1].equals("Y")) {
|
|
|
goodsCategory.setCateCd(cate2Array[0]);
|
|
goodsCategory.setCateCd(cate2Array[0]);
|
|
|
displayDao.saveGoodsCategory(goodsCategory);
|
|
displayDao.saveGoodsCategory(goodsCategory);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(!StringUtils.isEmpty(goodsCategory.getCateCd3Arr()[cnt])){
|
|
|
|
|
|
|
+ if (!StringUtils.isEmpty(goodsCategory.getCateCd3Arr()[cnt])) {
|
|
|
String[] cate3Array = goodsCategory.getCateCd3Arr()[cnt].split(",");
|
|
String[] cate3Array = goodsCategory.getCateCd3Arr()[cnt].split(",");
|
|
|
- if(cate3Array[1].equals("Y")){
|
|
|
|
|
|
|
+ if (cate3Array[1].equals("Y")) {
|
|
|
goodsCategory.setCateCd(cate3Array[0]);
|
|
goodsCategory.setCateCd(cate3Array[0]);
|
|
|
displayDao.saveGoodsCategory(goodsCategory);
|
|
displayDao.saveGoodsCategory(goodsCategory);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(!StringUtils.isEmpty(goodsCategory.getCateCd4Arr()[cnt])){
|
|
|
|
|
|
|
+ if (!StringUtils.isEmpty(goodsCategory.getCateCd4Arr()[cnt])) {
|
|
|
String[] cate4Array = goodsCategory.getCateCd4Arr()[cnt].split(",");
|
|
String[] cate4Array = goodsCategory.getCateCd4Arr()[cnt].split(",");
|
|
|
- if(cate4Array[1].equals("Y")){
|
|
|
|
|
|
|
+ if (cate4Array[1].equals("Y")) {
|
|
|
goodsCategory.setCateCd(cate4Array[0]);
|
|
goodsCategory.setCateCd(cate4Array[0]);
|
|
|
displayDao.saveGoodsCategory(goodsCategory);
|
|
displayDao.saveGoodsCategory(goodsCategory);
|
|
|
}
|
|
}
|
|
@@ -292,7 +292,7 @@ public class TsaDisplayService {
|
|
|
*/
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
@Transactional("shopTxnManager")
|
|
|
public void deleteGoodsCategoryList(GoodsCategory goodsCategory) {
|
|
public void deleteGoodsCategoryList(GoodsCategory goodsCategory) {
|
|
|
- for(int i=0; i<goodsCategory.getGoodsList().size(); i++){
|
|
|
|
|
|
|
+ for (int i = 0; i < goodsCategory.getGoodsList().size(); i++) {
|
|
|
goodsCategory.setGoodsCd(goodsCategory.getGoodsList().get(i).getGoodsCd());
|
|
goodsCategory.setGoodsCd(goodsCategory.getGoodsList().get(i).getGoodsCd());
|
|
|
goodsCategory.setCateNo(goodsCategory.getGoodsList().get(i).getCateCd());
|
|
goodsCategory.setCateNo(goodsCategory.getGoodsList().get(i).getCateCd());
|
|
|
this.deleteGoodsCategory(goodsCategory);
|
|
this.deleteGoodsCategory(goodsCategory);
|
|
@@ -330,14 +330,14 @@ public class TsaDisplayService {
|
|
|
* @author bin2107
|
|
* @author bin2107
|
|
|
* @since 2021. 2. 15
|
|
* @since 2021. 2. 15
|
|
|
*/
|
|
*/
|
|
|
- public void moveCategoryGoods(CategoryGoods categoryGoods){
|
|
|
|
|
|
|
+ public void moveCategoryGoods(CategoryGoods categoryGoods) {
|
|
|
GoodsCategory goodsCategory = new GoodsCategory();
|
|
GoodsCategory goodsCategory = new GoodsCategory();
|
|
|
goodsCategory.setRegNo(categoryGoods.getRegNo());
|
|
goodsCategory.setRegNo(categoryGoods.getRegNo());
|
|
|
- for(int i=0; i<categoryGoods.getGoodsList().size(); i++){
|
|
|
|
|
|
|
+ for (int i = 0; i < categoryGoods.getGoodsList().size(); i++) {
|
|
|
goodsCategory.setGoodsCd(categoryGoods.getGoodsList().get(i).getGoodsCd());
|
|
goodsCategory.setGoodsCd(categoryGoods.getGoodsList().get(i).getGoodsCd());
|
|
|
goodsCategory.setCateCd(categoryGoods.getAddCateNo());
|
|
goodsCategory.setCateCd(categoryGoods.getAddCateNo());
|
|
|
displayDao.saveGoodsCategory(goodsCategory);
|
|
displayDao.saveGoodsCategory(goodsCategory);
|
|
|
- if("move".equals(categoryGoods.getMode())){
|
|
|
|
|
|
|
+ if ("move".equals(categoryGoods.getMode())) {
|
|
|
goodsCategory.setCateNo(categoryGoods.getCateNo());
|
|
goodsCategory.setCateNo(categoryGoods.getCateNo());
|
|
|
displayDao.deleteGoodsCategory(goodsCategory);
|
|
displayDao.deleteGoodsCategory(goodsCategory);
|
|
|
}
|
|
}
|
|
@@ -350,9 +350,9 @@ public class TsaDisplayService {
|
|
|
* @author bin2107
|
|
* @author bin2107
|
|
|
* @since 2021. 2. 15
|
|
* @since 2021. 2. 15
|
|
|
*/
|
|
*/
|
|
|
- public void deleteCategoryGoods(CategoryGoods categoryGoods){
|
|
|
|
|
|
|
+ public void deleteCategoryGoods(CategoryGoods categoryGoods) {
|
|
|
GoodsCategory goodsCategory = new GoodsCategory();
|
|
GoodsCategory goodsCategory = new GoodsCategory();
|
|
|
- for(int i=0; i<categoryGoods.getGoodsList().size(); i++){
|
|
|
|
|
|
|
+ for (int i = 0; i < categoryGoods.getGoodsList().size(); i++) {
|
|
|
goodsCategory.setGoodsCd(categoryGoods.getGoodsList().get(i).getGoodsCd());
|
|
goodsCategory.setGoodsCd(categoryGoods.getGoodsList().get(i).getGoodsCd());
|
|
|
goodsCategory.setCateNo(categoryGoods.getGoodsList().get(i).getCateNo());
|
|
goodsCategory.setCateNo(categoryGoods.getGoodsList().get(i).getCateNo());
|
|
|
displayDao.deleteGoodsCategory(goodsCategory);
|
|
displayDao.deleteGoodsCategory(goodsCategory);
|
|
@@ -365,10 +365,10 @@ public class TsaDisplayService {
|
|
|
* @author bin2107
|
|
* @author bin2107
|
|
|
* @since 2021. 2. 15
|
|
* @since 2021. 2. 15
|
|
|
*/
|
|
*/
|
|
|
- public void insertCategoryGoods(CategoryGoods categoryGoods){
|
|
|
|
|
|
|
+ public void insertCategoryGoods(CategoryGoods categoryGoods) {
|
|
|
GoodsCategory goodsCategory = new GoodsCategory();
|
|
GoodsCategory goodsCategory = new GoodsCategory();
|
|
|
goodsCategory.setRegNo(categoryGoods.getRegNo());
|
|
goodsCategory.setRegNo(categoryGoods.getRegNo());
|
|
|
- for(int i=0; i<categoryGoods.getMultiGoods().length; i++){
|
|
|
|
|
|
|
+ for (int i = 0; i < categoryGoods.getMultiGoods().length; i++) {
|
|
|
goodsCategory.setGoodsCd(categoryGoods.getMultiGoods()[i]);
|
|
goodsCategory.setGoodsCd(categoryGoods.getMultiGoods()[i]);
|
|
|
goodsCategory.setCateCd((categoryGoods.getCateNo()).toString());
|
|
goodsCategory.setCateCd((categoryGoods.getCateNo()).toString());
|
|
|
goodsCategory.setBrandGroupNo(categoryGoods.getBrandGroupNo());
|
|
goodsCategory.setBrandGroupNo(categoryGoods.getBrandGroupNo());
|
|
@@ -410,11 +410,11 @@ public class TsaDisplayService {
|
|
|
*/
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
@Transactional("shopTxnManager")
|
|
|
public void updateCategoryGoodsDispOrdUpdown(CategoryGoods categoryGoods) {
|
|
public void updateCategoryGoodsDispOrdUpdown(CategoryGoods categoryGoods) {
|
|
|
- if("up".equals(categoryGoods.getChangeGb())){
|
|
|
|
|
|
|
+ if ("up".equals(categoryGoods.getChangeGb())) {
|
|
|
categoryGoods.setChangeGb("min");
|
|
categoryGoods.setChangeGb("min");
|
|
|
displayDao.updateCategoryGoodsDispOrdUpdown(categoryGoods);
|
|
displayDao.updateCategoryGoodsDispOrdUpdown(categoryGoods);
|
|
|
categoryGoods.setChangeGb("up");
|
|
categoryGoods.setChangeGb("up");
|
|
|
- }else if("down".equals(categoryGoods.getChangeGb())){
|
|
|
|
|
|
|
+ } else if ("down".equals(categoryGoods.getChangeGb())) {
|
|
|
categoryGoods.setChangeGb("max");
|
|
categoryGoods.setChangeGb("max");
|
|
|
displayDao.updateCategoryGoodsDispOrdUpdown(categoryGoods);
|
|
displayDao.updateCategoryGoodsDispOrdUpdown(categoryGoods);
|
|
|
categoryGoods.setChangeGb("down");
|
|
categoryGoods.setChangeGb("down");
|
|
@@ -431,7 +431,7 @@ public class TsaDisplayService {
|
|
|
@Transactional("shopTxnManager")
|
|
@Transactional("shopTxnManager")
|
|
|
public void updateCategoryGoodsDispOrd(CategoryGoods categoryGoods) {
|
|
public void updateCategoryGoodsDispOrd(CategoryGoods categoryGoods) {
|
|
|
int cnt = 0;
|
|
int cnt = 0;
|
|
|
- for(String goodsCd : categoryGoods.getGoodsCdArr()){
|
|
|
|
|
|
|
+ for (String goodsCd : categoryGoods.getGoodsCdArr()) {
|
|
|
categoryGoods.setGoodsCd(goodsCd);
|
|
categoryGoods.setGoodsCd(goodsCd);
|
|
|
categoryGoods.setDispOrd(categoryGoods.getDispOrdArr()[cnt]);
|
|
categoryGoods.setDispOrd(categoryGoods.getDispOrdArr()[cnt]);
|
|
|
displayDao.updateCategoryGoodsDispOrd(categoryGoods);
|
|
displayDao.updateCategoryGoodsDispOrd(categoryGoods);
|
|
@@ -468,26 +468,26 @@ public class TsaDisplayService {
|
|
|
*/
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
@Transactional("shopTxnManager")
|
|
|
public void saveMainLayout(Collection<MainDisplay> mainDisplayList) {
|
|
public void saveMainLayout(Collection<MainDisplay> mainDisplayList) {
|
|
|
- for(MainDisplay mainDisplay: mainDisplayList){
|
|
|
|
|
- log.info("mainDisplay.getContentsLoc()::::{}",mainDisplay.getContentsLoc());
|
|
|
|
|
- if(mainDisplay != null && mainDisplay.getContentsLoc() != null){
|
|
|
|
|
|
|
+ for (MainDisplay mainDisplay : mainDisplayList) {
|
|
|
|
|
+ log.info("mainDisplay.getContentsLoc()::::{}", mainDisplay.getContentsLoc());
|
|
|
|
|
+ if (mainDisplay != null && mainDisplay.getContentsLoc() != null) {
|
|
|
displayDao.deleteMainLayout(mainDisplay);
|
|
displayDao.deleteMainLayout(mainDisplay);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- for(MainDisplay mainDisplay: mainDisplayList){
|
|
|
|
|
- log.info("mainDisplay.getCateNo()::::{}",mainDisplay.getCateNo());
|
|
|
|
|
|
|
+ for (MainDisplay mainDisplay : mainDisplayList) {
|
|
|
|
|
+ log.info("mainDisplay.getCateNo()::::{}", mainDisplay.getCateNo());
|
|
|
// 이미지 변경 시
|
|
// 이미지 변경 시
|
|
|
- if(mainDisplay.getNewSysFileNm() != null && mainDisplay.getNewSysFileNm() != ""){
|
|
|
|
|
|
|
+ if (mainDisplay.getNewSysFileNm() != null && mainDisplay.getNewSysFileNm() != "") {
|
|
|
String bannerUploadPath = env.getProperty("upload.default.target.path");
|
|
String bannerUploadPath = env.getProperty("upload.default.target.path");
|
|
|
bannerUploadPath = GagaFileUtil.getConcatenationPath(bannerUploadPath, "/mainLayout");
|
|
bannerUploadPath = GagaFileUtil.getConcatenationPath(bannerUploadPath, "/mainLayout");
|
|
|
String newFilename = "MAIN_LAYOUT_" + mainDisplay.getContentsLoc() + "_" + GagaDateUtil.getTodayDateTime() + "." + StringUtils.getFilenameExtension(mainDisplay.getNewSysFileNm());
|
|
String newFilename = "MAIN_LAYOUT_" + mainDisplay.getContentsLoc() + "_" + GagaDateUtil.getTodayDateTime() + "." + StringUtils.getFilenameExtension(mainDisplay.getNewSysFileNm());
|
|
|
|
|
|
|
|
// 기존이미지 삭제
|
|
// 기존이미지 삭제
|
|
|
- try{
|
|
|
|
|
|
|
+ try {
|
|
|
GagaFileUtil.deleteFile(GagaFileUtil.getConcatenationPath(bannerUploadPath, mainDisplay.getOrgFileNm()));
|
|
GagaFileUtil.deleteFile(GagaFileUtil.getConcatenationPath(bannerUploadPath, mainDisplay.getOrgFileNm()));
|
|
|
- }catch (IOException e){
|
|
|
|
|
|
|
+ } catch (IOException e) {
|
|
|
// nothing
|
|
// nothing
|
|
|
log.info("[saveBanner MAIN_LAYOUT 기존 이미지 삭제중 error]");
|
|
log.info("[saveBanner MAIN_LAYOUT 기존 이미지 삭제중 error]");
|
|
|
//e.printStackTrace();
|
|
//e.printStackTrace();
|
|
@@ -526,7 +526,7 @@ public class TsaDisplayService {
|
|
|
*/
|
|
*/
|
|
|
public Collection<Contents> getContentsPreviewList(Contents contents) {
|
|
public Collection<Contents> getContentsPreviewList(Contents contents) {
|
|
|
Collection<Contents> previewList = displayDao.getContentsPreviewList(contents);
|
|
Collection<Contents> previewList = displayDao.getContentsPreviewList(contents);
|
|
|
- for(Contents tempGoods : previewList){
|
|
|
|
|
|
|
+ for (Contents tempGoods : previewList) {
|
|
|
tempGoods.setContentsGoodsList(displayDao.getContentsForGoodsList(tempGoods));
|
|
tempGoods.setContentsGoodsList(displayDao.getContentsForGoodsList(tempGoods));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -561,14 +561,14 @@ public class TsaDisplayService {
|
|
|
*/
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
@Transactional("shopTxnManager")
|
|
|
public void saveGnbtabPreview(Collection<GnbTab> gnbTabList) {
|
|
public void saveGnbtabPreview(Collection<GnbTab> gnbTabList) {
|
|
|
- for(GnbTab gnbTab : gnbTabList){
|
|
|
|
|
- if(gnbTab != null && gnbTab.getGtabGb() != null){
|
|
|
|
|
|
|
+ for (GnbTab gnbTab : gnbTabList) {
|
|
|
|
|
+ if (gnbTab != null && gnbTab.getGtabGb() != null) {
|
|
|
displayDao.deleteGnbTabPreview(gnbTab);
|
|
displayDao.deleteGnbTabPreview(gnbTab);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- for(GnbTab gnbTab : gnbTabList){
|
|
|
|
|
|
|
+ for (GnbTab gnbTab : gnbTabList) {
|
|
|
gnbTab.setRegNo(TsaSession.getInfo().getUserNo());
|
|
gnbTab.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
gnbTab.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
gnbTab.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
displayDao.saveGnbTabPreview(gnbTab);
|
|
displayDao.saveGnbTabPreview(gnbTab);
|
|
@@ -610,7 +610,7 @@ public class TsaDisplayService {
|
|
|
if (contents != null && contents.getDispStdt() != null && !contents.getDispStdt().equals("")) {
|
|
if (contents != null && contents.getDispStdt() != null && !contents.getDispStdt().equals("")) {
|
|
|
// 브랜드 이미지 변경이 일어났을 경우
|
|
// 브랜드 이미지 변경이 일어났을 경우
|
|
|
String brandGroupImg = contents.getBrandGroupImg();
|
|
String brandGroupImg = contents.getBrandGroupImg();
|
|
|
- if(brandGroupImg != null && !brandGroupImg.equals("")){
|
|
|
|
|
|
|
+ if (brandGroupImg != null && !brandGroupImg.equals("")) {
|
|
|
String imgInd = "01";
|
|
String imgInd = "01";
|
|
|
String bannerUploadPath = env.getProperty("upload.default.target.path");
|
|
String bannerUploadPath = env.getProperty("upload.default.target.path");
|
|
|
String yearMonth = GagaDateUtil.getToday().substring(0, 6);
|
|
String yearMonth = GagaDateUtil.getToday().substring(0, 6);
|
|
@@ -638,17 +638,17 @@ public class TsaDisplayService {
|
|
|
}
|
|
}
|
|
|
String bannerUploadPath = env.getProperty("upload.default.target.path");
|
|
String bannerUploadPath = env.getProperty("upload.default.target.path");
|
|
|
String yearMonth = GagaDateUtil.getToday().substring(0, 6);
|
|
String yearMonth = GagaDateUtil.getToday().substring(0, 6);
|
|
|
- if("Y".equals(contents.getMultiContentsYn())){
|
|
|
|
|
|
|
+ if ("Y".equals(contents.getMultiContentsYn())) {
|
|
|
bannerUploadPath = GagaFileUtil.getConcatenationPath(bannerUploadPath, "/contents/planning");
|
|
bannerUploadPath = GagaFileUtil.getConcatenationPath(bannerUploadPath, "/contents/planning");
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
bannerUploadPath = GagaFileUtil.getConcatenationPath(bannerUploadPath, "/contents");
|
|
bannerUploadPath = GagaFileUtil.getConcatenationPath(bannerUploadPath, "/contents");
|
|
|
}
|
|
}
|
|
|
File newFile = new File(GagaFileUtil.getConcatenationPath(bannerUploadPath, newImgFile));
|
|
File newFile = new File(GagaFileUtil.getConcatenationPath(bannerUploadPath, newImgFile));
|
|
|
bannerUploadPath = GagaFileUtil.getConcatenationPath(bannerUploadPath, yearMonth);
|
|
bannerUploadPath = GagaFileUtil.getConcatenationPath(bannerUploadPath, yearMonth);
|
|
|
String newFilename = "";
|
|
String newFilename = "";
|
|
|
- if("Y".equals(contents.getMultiContentsYn())){
|
|
|
|
|
|
|
+ if ("Y".equals(contents.getMultiContentsYn())) {
|
|
|
newFilename = "PLANNING_" + GagaDateUtil.getTodayDateTime() + "_" + imgInd + "." + StringUtils.getFilenameExtension(newImgFile);
|
|
newFilename = "PLANNING_" + GagaDateUtil.getTodayDateTime() + "_" + imgInd + "." + StringUtils.getFilenameExtension(newImgFile);
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
newFilename = "CONTENS_" + GagaDateUtil.getTodayDateTime() + "_" + imgInd + "." + StringUtils.getFilenameExtension(newImgFile);
|
|
newFilename = "CONTENS_" + GagaDateUtil.getTodayDateTime() + "_" + imgInd + "." + StringUtils.getFilenameExtension(newImgFile);
|
|
|
}
|
|
}
|
|
|
File uniqueFile = GagaFileUtil.getUniqueFile(new File(GagaFileUtil.getConcatenationPath(bannerUploadPath, newFilename)));
|
|
File uniqueFile = GagaFileUtil.getUniqueFile(new File(GagaFileUtil.getConcatenationPath(bannerUploadPath, newFilename)));
|
|
@@ -660,9 +660,9 @@ public class TsaDisplayService {
|
|
|
newFile.renameTo(uniqueFile);
|
|
newFile.renameTo(uniqueFile);
|
|
|
|
|
|
|
|
String contentsPath = "";
|
|
String contentsPath = "";
|
|
|
- if("Y".equals(contents.getMultiContentsYn())){
|
|
|
|
|
|
|
+ if ("Y".equals(contents.getMultiContentsYn())) {
|
|
|
contentsPath = "/contents/planning/";
|
|
contentsPath = "/contents/planning/";
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
contentsPath = "/contents/";
|
|
contentsPath = "/contents/";
|
|
|
}
|
|
}
|
|
|
if (cnt == 1) {
|
|
if (cnt == 1) {
|
|
@@ -694,17 +694,17 @@ public class TsaDisplayService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- for (Contents contents1 : contentsList){
|
|
|
|
|
- if(contents1 != null && contents1.getGoodsCdArr() != null){
|
|
|
|
|
- if(contents1.getContentsLoc().equals("SMM012")){
|
|
|
|
|
|
|
+ for (Contents contents1 : contentsList) {
|
|
|
|
|
+ if (contents1 != null && contents1.getGoodsCdArr() != null) {
|
|
|
|
|
+ if (contents1.getContentsLoc().equals("SMM012")) {
|
|
|
contents1.setCateNo(1700);
|
|
contents1.setCateNo(1700);
|
|
|
}
|
|
}
|
|
|
contents1.setContentsSq(contents1.getDispOrd());
|
|
contents1.setContentsSq(contents1.getDispOrd());
|
|
|
contents1.setRegNo(TsaSession.getInfo().getUserNo());
|
|
contents1.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
displayDao.deleteContentsGoodsTemp(contents1);
|
|
displayDao.deleteContentsGoodsTemp(contents1);
|
|
|
|
|
|
|
|
- if(contents1.getGoodsCdArr().length>0){
|
|
|
|
|
- for(int i=0; i<contents1.getGoodsCdArr().length; i++){
|
|
|
|
|
|
|
+ if (contents1.getGoodsCdArr().length > 0) {
|
|
|
|
|
+ for (int i = 0; i < contents1.getGoodsCdArr().length; i++) {
|
|
|
contents1.setGoodsCd(contents1.getGoodsCdArr()[i]);
|
|
contents1.setGoodsCd(contents1.getGoodsCdArr()[i]);
|
|
|
// contents1.setGoodsNm(contents1.getGoodsNmArr()[i]);
|
|
// contents1.setGoodsNm(contents1.getGoodsNmArr()[i]);
|
|
|
// contents1.setImgPath1(contents1.getGoodsImgArr()[i]);
|
|
// contents1.setImgPath1(contents1.getGoodsImgArr()[i]);
|
|
@@ -723,22 +723,22 @@ public class TsaDisplayService {
|
|
|
* @since 2021. 2. 23
|
|
* @since 2021. 2. 23
|
|
|
*/
|
|
*/
|
|
|
@Transactional("shopTxnManager")
|
|
@Transactional("shopTxnManager")
|
|
|
- public void saveContents(Contents contents){
|
|
|
|
|
|
|
+ public void saveContents(Contents contents) {
|
|
|
contents.setRegNo(TsaSession.getInfo().getUserNo());
|
|
contents.setRegNo(TsaSession.getInfo().getUserNo());
|
|
|
contents.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
contents.setUpdNo(TsaSession.getInfo().getUserNo());
|
|
|
- for(String contentsLoc : contents.getContentsLocArr()) {
|
|
|
|
|
|
|
+ for (String contentsLoc : contents.getContentsLocArr()) {
|
|
|
contents.setContentsLoc(contentsLoc);
|
|
contents.setContentsLoc(contentsLoc);
|
|
|
displayDao.deleteContents(contents);
|
|
displayDao.deleteContents(contents);
|
|
|
displayDao.saveContents(contents);
|
|
displayDao.saveContents(contents);
|
|
|
- if("SMM007".equals(contentsLoc) || "SMM009".equals(contentsLoc)){
|
|
|
|
|
|
|
+ if ("SMM007".equals(contentsLoc) || "SMM009".equals(contentsLoc)) {
|
|
|
displayDao.deleteContentsGoods(contents);
|
|
displayDao.deleteContentsGoods(contents);
|
|
|
displayDao.saveContentsGoods(contents);
|
|
displayDao.saveContentsGoods(contents);
|
|
|
}
|
|
}
|
|
|
- if("STAB002".equals(contentsLoc) || "SBM002".equals(contentsLoc)){
|
|
|
|
|
|
|
+ if ("STAB002".equals(contentsLoc) || "SBM002".equals(contentsLoc)) {
|
|
|
GnbTab gnbTab = new GnbTab();
|
|
GnbTab gnbTab = new GnbTab();
|
|
|
- if("STAB002".equals(contentsLoc)){
|
|
|
|
|
|
|
+ if ("STAB002".equals(contentsLoc)) {
|
|
|
gnbTab.setGtabGb("C");
|
|
gnbTab.setGtabGb("C");
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
gnbTab.setGtabGb("B");
|
|
gnbTab.setGtabGb("B");
|
|
|
gnbTab.setBrandGroupNo(Integer.parseInt(contents.getBrandGroupNo()));
|
|
gnbTab.setBrandGroupNo(Integer.parseInt(contents.getBrandGroupNo()));
|
|
|
}
|
|
}
|
|
@@ -756,7 +756,7 @@ public class TsaDisplayService {
|
|
|
* @author bin2107
|
|
* @author bin2107
|
|
|
* @since 2021. 2. 24
|
|
* @since 2021. 2. 24
|
|
|
*/
|
|
*/
|
|
|
- public Category getCategory4srch(Category category){
|
|
|
|
|
|
|
+ public Category getCategory4srch(Category category) {
|
|
|
return displayDao.getCategory4srch(category);
|
|
return displayDao.getCategory4srch(category);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -791,4 +791,31 @@ public class TsaDisplayService {
|
|
|
public Collection<SearchKeyword> getSearchKeywordList(SearchKeyword searchKeyword) {
|
|
public Collection<SearchKeyword> getSearchKeywordList(SearchKeyword searchKeyword) {
|
|
|
return displayDao.getSearchKeywordList(searchKeyword);
|
|
return displayDao.getSearchKeywordList(searchKeyword);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 스플래시이미지 목록
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @author gagamel
|
|
|
|
|
+ * @since 2021. 7. 2
|
|
|
|
|
+ */
|
|
|
|
|
+ public Collection<SplashImage> getSplashImageList() {
|
|
|
|
|
+ return displayDao.getSplashImageList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 스플래시이미지 등록/수정
|
|
|
|
|
+ * @param splashImg - 스플래시이미지 정보
|
|
|
|
|
+ * @author gagamel
|
|
|
|
|
+ * @since 2021. 7. 2
|
|
|
|
|
+ */
|
|
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
|
|
+ @CacheEvict(value = "splashimg", allEntries = true)
|
|
|
|
|
+ public void saveSplashImage(SplashImage splashImg) {
|
|
|
|
|
+ if (splashImg.getMode().equals("N")) {
|
|
|
|
|
+ displayDao.createSplashImage(splashImg);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ displayDao.updateSplashImage(splashImg);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|