|
|
@@ -12,9 +12,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.env.Environment;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
-import com.gagaframework.excel.env.GagaExcelConstants;
|
|
|
import com.gagaframework.shoplinker.GagaShoplinkertUtil;
|
|
|
import com.gagaframework.shoplinker.domain.orderlist.Order;
|
|
|
import com.gagaframework.shoplinker.env.GagaShoplinkerConstants;
|
|
|
@@ -24,12 +22,8 @@ import com.style24.admin.biz.dao.TsaOcmDao;
|
|
|
import com.style24.admin.biz.dao.TsaShoplinkerDao;
|
|
|
import com.style24.admin.support.env.TsaConstants;
|
|
|
import com.style24.admin.support.security.session.TsaSession;
|
|
|
-import com.style24.admin.support.util.TsitUtil;
|
|
|
-import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.persistence.domain.ExtmallOrder;
|
|
|
-import com.style24.persistence.domain.Goods;
|
|
|
-import com.style24.persistence.domain.GoodsStock;
|
|
|
import com.style24.persistence.domain.ShoplinkerGoods;
|
|
|
import com.style24.persistence.domain.ShoplinkerInvoice;
|
|
|
import com.style24.persistence.domain.ShoplinkerOrder;
|
|
|
@@ -74,10 +68,16 @@ public class TsaShoplinkerService {
|
|
|
* @author jmh
|
|
|
* @since 2020. 5. 28
|
|
|
*/
|
|
|
- public ShoplinkerSearch getCallRunableInfo(ShoplinkerSearch slkSearch ) {
|
|
|
- return shoplinkerDao.getCallRunableInfo(slkSearch);
|
|
|
+ public ShoplinkerSearch getCallRunableInfo(ShoplinkerSearch slkSearch) {
|
|
|
+ ShoplinkerSearch result = shoplinkerDao.getCallRunableInfo(slkSearch);
|
|
|
+ if( null == result ) {
|
|
|
+ result = new ShoplinkerSearch();
|
|
|
+ result.setRunCnt(0);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 샵링커 api 호출 가능여부 상태 저장
|
|
|
*
|
|
|
@@ -255,6 +255,9 @@ public class TsaShoplinkerService {
|
|
|
// 상품기본정보
|
|
|
ShoplinkerGoods goodsMap = shoplinkerDao.getGoods(shoplinkerGoods);
|
|
|
|
|
|
+ // 상품상세(퍼블) 세팅
|
|
|
+ String detailDesc = this.setDetailDesc(shoplinkerGoods, goodsMap);
|
|
|
+
|
|
|
// xml 데이터 세팅
|
|
|
StringBuilder sbRequest = new StringBuilder();
|
|
|
sbRequest.append("<?xml version=\"1.0\" encoding=\"euc-kr\"?>\n");
|
|
|
@@ -267,294 +270,7 @@ public class TsaShoplinkerService {
|
|
|
sbRequest.append(" <attribute_title_code>").append("999999999").append("</attribute_title_code>\n");
|
|
|
sbRequest.append(" <attribute_partner_product_id>").append(goodsMap.getAttributePartnerProductId()).append("</attribute_partner_product_id>\n");
|
|
|
sbRequest.append(" <product_name>").append(goodsMap.getProductName()).append("</product_name>\n");
|
|
|
-
|
|
|
- // 상세폼신규사용여부 N: 기존 정보 / Y : html 형식
|
|
|
- if( "N".equals(goodsMap.getTobeFormYn())){
|
|
|
- String descStr = goodsMap.getDetailDesc();
|
|
|
- descStr = descStr.replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
|
|
|
- .replace("/Upload", "http://image.istyle24.com/Local")
|
|
|
- .replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
|
|
|
-
|
|
|
- sbRequest.append(" <detail_desc>").append(descStr).append("</detail_desc>\n");
|
|
|
- }else {
|
|
|
-
|
|
|
- String imgPath = env.getProperty("upload.goods.view");
|
|
|
- imgPath = imgPath.replace("/Upload", "/Local")
|
|
|
- .replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
|
|
|
- .replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
|
|
|
-
|
|
|
- Collection<ShoplinkerGoods> imgList = shoplinkerDao.getGoodsImageList(shoplinkerGoods);
|
|
|
-
|
|
|
- String dColor = goodsMap.getMainColorEnm(); //대표컬러
|
|
|
- String dImgFront = ""; //대표상품 앞판컷
|
|
|
- String dImgBack = ""; //대표상품 뒷판컷
|
|
|
- String dMaterial = ""; //대표상품 패브릭(소재컷?)
|
|
|
- ArrayList<String> dImgModelList = new ArrayList<String>(); //대표상품 모델컷
|
|
|
- ArrayList<String> dImgDetailList = new ArrayList<String>(); //대표상품 디테일컷(상세컷)
|
|
|
- ArrayList<String> dLabelList = new ArrayList<String>(); //대표상품 케어라벨
|
|
|
- ArrayList<String> dImgOtherList = new ArrayList<String>(); //상품외부몰용
|
|
|
-
|
|
|
- // 이미지 정보
|
|
|
- for(ShoplinkerGoods map : imgList) {
|
|
|
-
|
|
|
- if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_01.jpg")) { //대표상품 앞판컷
|
|
|
- dImgFront = imgPath +"/"+ map.getSysImgNm();
|
|
|
- }
|
|
|
- if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_02.jpg")) { //대표상품 뒷판컷
|
|
|
- dImgBack = imgPath +"/"+ map.getSysImgNm();
|
|
|
- }
|
|
|
- if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_C") || -1 <map.getSysImgNm().indexOf("_"+map.getColorCd()+"_M")) { //대표상품 모델컷
|
|
|
- dImgModelList.add(imgPath +"/"+ map.getSysImgNm());
|
|
|
- }
|
|
|
- if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_D")) { //대표상품 디테일컷(상세컷)
|
|
|
- dImgDetailList.add(imgPath +"/"+ map.getSysImgNm());
|
|
|
- }
|
|
|
- if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_F") || -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_S")) { //대표상품 패브릭(소재컷?)
|
|
|
- dMaterial = imgPath +"/"+ map.getSysImgNm();
|
|
|
- }
|
|
|
- if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_L")) { //대표상품 케어라벨
|
|
|
- dLabelList.add(imgPath +"/"+ map.getSysImgNm());
|
|
|
- }
|
|
|
- if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_X")) { //대표상품 디테일컷(상세컷)
|
|
|
- dImgOtherList.add(imgPath +"/"+ map.getSysImgNm());
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- // 제대로된 정보 없을 경우, 기존 상세내용으로 보냄
|
|
|
- if( "".equals(dImgFront) || "".equals(dImgBack)) {
|
|
|
- String descStr = goodsMap.getDetailDesc();
|
|
|
- descStr = descStr.replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
|
|
|
- .replace("/Upload", "http://image.istyle24.com/Local")
|
|
|
- .replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
|
|
|
-
|
|
|
- sbRequest.append(" <detail_desc>").append(descStr).append("</detail_desc>\n");
|
|
|
-
|
|
|
- }else {
|
|
|
-
|
|
|
- String htmlDesc = "";
|
|
|
- // 1) 상세내용 - 상품설명
|
|
|
- htmlDesc = "<div class='st_descrp_box' style='max-height:1100px; overflow:hidden;'>";
|
|
|
- htmlDesc += "<div class='st_desc_simple' style='position:relative; margin-top:0px; margin-left:auto; margin-right:auto;'>";
|
|
|
- htmlDesc += "<span class='st_tit_desc' style='display:block; margin-bottom:10px; font-size:18px; font-weight:500; letter-spacing:-0.025em;'>"+goodsMap.getDetailDescNew10()+"</span>";
|
|
|
- htmlDesc += "<p class='st_ptxt01' style='font-size:16px;font-weight:200;line-height:1.5;word-break:keep-all;color:#666666;'>";
|
|
|
- htmlDesc += goodsMap.getDetailDescNew20();
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "</div>";
|
|
|
- htmlDesc += "<div class='st_desc_character' style='position:relative; margin-top:40px; margin-left:auto; margin-right:auto;'>";
|
|
|
- htmlDesc += "<span class='st_tit_desc' style='display:block; margin-bottom:10px; font-size:18px; font-weight:500; letter-spacing:-0.025em;'>상품특징</span>";
|
|
|
- htmlDesc += "<p class='st_ptxt01' style='font-size:16px;font-weight:200;line-height:1.5;word-break:keep-all;color:#666666;'>";
|
|
|
- htmlDesc += goodsMap.getDetailDescNew30();
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "</div>";
|
|
|
- htmlDesc += "</div>";
|
|
|
-
|
|
|
- // 2) 상세내용 - 상품옵션별 색상
|
|
|
- String colorDesc = "";
|
|
|
- shoplinkerGoods.setColorListYn("Y"); // 상품이미지정보 색상별
|
|
|
- Collection<ShoplinkerGoods> imgColorList = shoplinkerDao.getGoodsImageList(shoplinkerGoods);
|
|
|
- colorDesc = "<div class='st_view_option_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
- String tmpColor = "";
|
|
|
- for(ShoplinkerGoods ic : imgColorList ) {
|
|
|
-
|
|
|
- if( !tmpColor.equals(ic.getColorCd())) {
|
|
|
- colorDesc += "<span class='st_tit_desc' style='display:block; margin-bottom:10px; font-size:18px; font-weight:500; letter-spacing:-0.025em;'>컬러 : ";
|
|
|
- colorDesc += "<span>"+ ic.getColorKnm() +"</span></span>";
|
|
|
- }
|
|
|
- colorDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
- colorDesc += "<img src='"+ imgPath+"/"+ic.getSysImgNm()+"' alt='' style='max-width:100%;margin: 10px auto 0;margin-top: 0;display: block;'>";
|
|
|
- colorDesc += "<img src='"+ imgPath+"/"+ic.getSysImgNm()+"' alt='' style='max-width:100%;display: block;margin: 10px auto 0;'>";
|
|
|
- colorDesc += "</div>";
|
|
|
- if( !tmpColor.equals(ic.getColorCd())) {
|
|
|
- colorDesc += "<div style='height:100px;'></div>";
|
|
|
- tmpColor = ic.getColorCd();
|
|
|
- }
|
|
|
- }
|
|
|
- colorDesc += "</div>";
|
|
|
- htmlDesc += colorDesc;
|
|
|
-
|
|
|
- // 3) 상세내용 - 모델 착용컷
|
|
|
- String dtlDesc = "";
|
|
|
- dtlDesc += "<div class='st_view_outfit_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
- dtlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>OUTFIT VIEW</span>";
|
|
|
- dtlDesc += "<span class='st_model_info' style='display: block;margin-top: 20px;color: #666;font-size: 16px;font-weight: 200;text-align: center;'>"+goodsMap.getModelInfo()+"</span>";
|
|
|
- dtlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
- for(String img : dImgModelList) {
|
|
|
- dtlDesc += "<img src='"+ img +"' alt='' style='display: block;margin: 10px auto 0;'>";
|
|
|
- }
|
|
|
- dtlDesc += "</div>";
|
|
|
- dtlDesc += "</div>";
|
|
|
-
|
|
|
- // 4) 상세내용 - 상품컷
|
|
|
- dtlDesc += "<div class='st_view_detail_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
- dtlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>PRODUCT VIEW</span>";
|
|
|
- dtlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
- for(String img : dImgDetailList) {
|
|
|
- dtlDesc += "<img src='"+ img +"' alt='' style='display: block;margin: 10px auto 0;'>";
|
|
|
- }
|
|
|
- dtlDesc += "</div>";
|
|
|
- dtlDesc += " </div>";
|
|
|
-
|
|
|
- // 5) 상세내용 - 원단
|
|
|
- dtlDesc += "<div class='st_view_fabric_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
- dtlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>FABRIC</span>";
|
|
|
- dtlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
- dtlDesc += "<img src='"+dMaterial +"' alt='' style='display: block;margin: 10px auto 0;margin-top: 0;'>";
|
|
|
- dtlDesc += "</div>";
|
|
|
- dtlDesc += "</div>";
|
|
|
-
|
|
|
- // 6) 상세내용 - 라벨
|
|
|
- dtlDesc += "<div class='st_view_label_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
- dtlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>LABEL INFO</span>";
|
|
|
- dtlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
- dtlDesc += "<span style='display:inline-block;'>";
|
|
|
- for(String img : dLabelList) {
|
|
|
- dtlDesc += "<img src='"+ img +"' alt='' style='float:left; margin-top:0; margin-left:20px;'>";
|
|
|
- }
|
|
|
- dtlDesc += "</span>";
|
|
|
- dtlDesc += "</div>";
|
|
|
- dtlDesc += "</div>";
|
|
|
- htmlDesc += dtlDesc;
|
|
|
-
|
|
|
- // 7) 상세내용 - 사이즈
|
|
|
- Collection<ShoplinkerGoods> sizeList = shoplinkerDao.getGoodsSizeList(shoplinkerGoods);
|
|
|
- if (sizeList == null || sizeList.isEmpty()) {
|
|
|
- //대표상품 실측정사이즈표 없을경우 > 브랜드 별 표준 이미지
|
|
|
- htmlDesc += "<div class='st_view_size_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
- htmlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>사이즈정보</span>";
|
|
|
- htmlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
-
|
|
|
- String brandSizeImg = env.getProperty("upload.image.view") + "/Upload/brandSizeImg/";
|
|
|
- if( "Y".equals(goodsMap.getKidsYn())){
|
|
|
- brandSizeImg += "kids/"+goodsMap.getBrandEnm() +".jpg";
|
|
|
- htmlDesc += "<img src='"+ brandSizeImg +"' alt='ANDEW 표준 사이즈' style='display: block;margin: 10px auto 0;'>";
|
|
|
- }else {
|
|
|
- brandSizeImg += "casuals/"+goodsMap.getBrandEnm() +".jpg";
|
|
|
- htmlDesc += "<img src='"+ brandSizeImg +"' alt='ANDEW 표준 사이즈' style='display: block;margin: 10px auto 0;'>";
|
|
|
- }
|
|
|
- htmlDesc += "</div>";
|
|
|
- htmlDesc += "</div>";
|
|
|
-
|
|
|
- }else {
|
|
|
-
|
|
|
- htmlDesc += "<div class='st_view_size_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
- htmlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>사이즈정보</span>";
|
|
|
- htmlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
-
|
|
|
- htmlDesc += "<div class='st_tbl' style='padding:0; border-top:1px solid #000;'>";
|
|
|
- htmlDesc += "<table style='margin:0;padding:0;border-collapse:collapse;border-spacing:0;width:100%;border-top:1px solid #000;word-break:keep-all;'>";
|
|
|
- htmlDesc += "<thead style=''>";
|
|
|
- htmlDesc += "<tr style=''>";
|
|
|
-
|
|
|
- String typeCd = "";
|
|
|
- int cnt = 0;
|
|
|
- for(ShoplinkerGoods size : sizeList) {
|
|
|
- typeCd = size.getSizeTypecd();
|
|
|
- if( 0 == cnt ) {
|
|
|
- if( "하의".equals(size.getSizeTypecd())) {
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'></th>";
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>허리둘레(cm)</th>";
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>밑위(cm)</th>";
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>엉덩이둘레(cm)</th>";
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>허벅지둘레(cm)</th>";
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>총길이(cm)</th>";
|
|
|
- }else {
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'></th>";
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>가슴둘레(cm)</th>";
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>어깨너비(cm)</th>";
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>팔길이(cm)</th>";
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>총길이(cm)</th>";
|
|
|
- }
|
|
|
- htmlDesc += "</tr>";
|
|
|
- htmlDesc += "</thead>";
|
|
|
- htmlDesc += "<tbody style=''>";
|
|
|
- }
|
|
|
-
|
|
|
- htmlDesc += "<tr style=''>";
|
|
|
- htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>"+ size.getOptCd2() +"</th>";
|
|
|
- htmlDesc += "<td style='position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;'>"+ size.getSizeValue1() +"</td>";
|
|
|
- htmlDesc += "<td style='position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;'>"+ size.getSizeValue2() +"</td>";
|
|
|
- htmlDesc += "<td style='position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;'>"+ size.getSizeValue3() +"</td>";
|
|
|
- htmlDesc += "<td style='position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;'>"+ size.getSizeValue4() +"</td>";
|
|
|
- if( "하의".equals(size.getSizeTypecd())) {
|
|
|
- htmlDesc += "<td style='position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;'>"+ size.getSizeValue5() +"</td>";
|
|
|
- }
|
|
|
- cnt ++;
|
|
|
- }
|
|
|
-
|
|
|
- htmlDesc += "</tbody>";
|
|
|
- htmlDesc += "</table>";
|
|
|
- htmlDesc += "</div>";
|
|
|
- htmlDesc += "</div>";
|
|
|
- htmlDesc += " </div>";
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- // 8) 상세내용 - 상품필수정보
|
|
|
- ShoplinkerGoods certInfo = shoplinkerDao.getCert(shoplinkerGoods);
|
|
|
- if( null != certInfo) {
|
|
|
- if( "G083_1".equals(certInfo.getCertTargetGb())) { // 인증대상
|
|
|
-
|
|
|
- if( "".equals(certInfo.getCertNum())) {
|
|
|
-
|
|
|
- htmlDesc += "<div class='st_required_box' style='margin-bottom:80px;'>";
|
|
|
- htmlDesc += "<div class='st_area_kcl' style='color:#222;display:block; position:relative; min-height:160px; margin-top:100px; padding:40px 40px 40px 160px; box-sizing:border-box; background:#f5f5f5;'>";
|
|
|
- htmlDesc += "<i class='st_ico_kcl' style='position:absolute;left:64px;top:50%;transform:translateY(-50%);z-index:2;background-image: url(/images/pc/ico_kcl.png);width: 32px;height: 50px;display: inline-block;vertical-align: middle;background-repeat: no-repeat;background-size: contain;background-position: 0% 0%;'></i>";
|
|
|
- htmlDesc += "<p class='st_tit' style='margin-top:0;color:#222;font-size:16px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
- htmlDesc += certInfo.getCertTargetNm() +"/"+ certInfo.getCertOrganName();
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "<p style='margin-top:20px; color:#222; font-size:13px; font-weight: 300; line-height:1; letter-spacing:-0.025em;'>";
|
|
|
- htmlDesc += certInfo.getCertDiv();
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "<p class='st_dot_info' style='color: #888888;position:relative;margin-top:20px;font-size:13px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
- htmlDesc += "<span style='color: #888888 !important;background: #888888 !important;display: inline-block;width: 2px;height: 2px;position: relative;top: -4px;left: 0px;margin-right: 4px;'></span>";
|
|
|
- htmlDesc += "해당 인증정보는 판매자가 등록한 것으로 등록정보에 대한 일체의 책임은 판매자에게 있습니다.";
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "</div>";
|
|
|
- htmlDesc += "</div>";
|
|
|
- }else {
|
|
|
- htmlDesc += "<div class='st_required_box' style='margin-bottom:80px;'>";
|
|
|
- htmlDesc += "<div class='st_area_kcl' style='display:block; position:relative; min-height:160px; margin-top:100px; padding:40px 40px 40px 160px; box-sizing:border-box; background:#f5f5f5;'>";
|
|
|
- htmlDesc += "<i class='st_ico_kcl' style='position:absolute;left:64px;top:50%;transform:translateY(-50%);z-index:2;background-image: url(/images/pc/ico_kcl.png);width: 32px;height: 50px;display: inline-block;vertical-align: middle;background-repeat: no-repeat;background-size: contain;background-position: 0% 0%;'></i>";
|
|
|
- htmlDesc += "<p class='st_tit' style='margin-top:0;color:#222;font-size:16px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
- htmlDesc += certInfo.getCertDiv() +"/"+ certInfo.getCertOrganName();
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "<p style='margin-top:20px; color:#222; font-size:13px; font-weight: 300; line-height:1; letter-spacing:-0.025em;'>";
|
|
|
- htmlDesc += "인증번호: "+ certInfo.getCertNum();
|
|
|
- htmlDesc += "<a href='http://www.safetykorea.kr/search/searchPop?certNum=XX00000-0000' target='_blank' class='st_linktxt3' style='margin-left:20px; color:#888; font-weight:200; text-decoration:none !important;'>상세보기</a>";
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "<p class='st_dot_info' style='color: #888888;position:relative;margin-top:20px;font-size:13px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
- htmlDesc += "<span style='color: #888888 !important;background: #888888 !important;display: inline-block;width: 2px;height: 2px;position: relative;top: -4px;left: 0px;margin-right: 4px;'></span>";
|
|
|
- htmlDesc += "해당 인증정보는 판매자가 등록한 것으로 등록정보에 대한 일체의 책임은 판매자에게 있습니다.";
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "</div>";
|
|
|
- htmlDesc += "</div>";
|
|
|
- }
|
|
|
-
|
|
|
- }else if( "G083_3".equals(certInfo.getCertTargetGb())) { // 상세설명별도표기
|
|
|
- htmlDesc += "<div class='st_required_box' style='margin-bottom:80px;'>";
|
|
|
- htmlDesc += "<div class='st_area_kcl st_no-mark' style='display:block;position:relative;min-height:160px;margin-top:100px;padding:40px 40px 40px 160px;box-sizing:border-box;background:#f5f5f5;padding-left:65px;'>";
|
|
|
- htmlDesc += "<p class='st_tit' style='margin-top:0;color:#222;font-size:16px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
- htmlDesc += certInfo.getCertTargetNm();
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "<p style='margin-top:20px; color:#222; font-size:13px; font-weight: 300; line-height:1; letter-spacing:-0.025em;'>";
|
|
|
- htmlDesc += "제품 상세정보 내 표기되어 있습니다. 상품 정보를 확인해주세요.";
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "<p class='st_dot_info' style='color: #888888;position:relative;margin-top:20px;font-size:13px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
- htmlDesc += "<span style='color: #888888 !important;background: #888888 !important;display: inline-block;width: 2px;height: 2px;position: relative;top: -4px;left: 0px;margin-right: 4px;'></span>";
|
|
|
- htmlDesc += "해당 인증정보는 판매자가 등록한 것으로 등록정보에 대한 일체의 책임은 판매자에게 있습니다.";
|
|
|
- htmlDesc += "</p>";
|
|
|
- htmlDesc += "</div>";
|
|
|
- htmlDesc += "</div>";
|
|
|
- }else {
|
|
|
- // G083_2 - 인증대상아님
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- sbRequest.append(" <detail_desc>").append(htmlDesc).append("</detail_desc>\n");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
+ sbRequest.append(" <detail_desc>").append(detailDesc).append("</detail_desc>\n");
|
|
|
|
|
|
// 가격연계
|
|
|
if( "Y".equals(goodsMap.getSyncYn())) {
|
|
|
@@ -618,6 +334,303 @@ public class TsaShoplinkerService {
|
|
|
return succCnt;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 샵링커 상품등록 - 상세내용 세팅
|
|
|
+ *
|
|
|
+ * @param shoplinkerGoods
|
|
|
+ * @return
|
|
|
+ * @author jmh
|
|
|
+ * @since 2021. 5. 20
|
|
|
+ */
|
|
|
+ private String setDetailDesc(ShoplinkerGoods shoplinkerGoods, ShoplinkerGoods goodsMap) {
|
|
|
+
|
|
|
+ String htmlDesc = "";
|
|
|
+
|
|
|
+ // 상세폼신규사용여부 N: 기존 정보 / Y : html 형식
|
|
|
+ if( "N".equals(goodsMap.getTobeFormYn())){
|
|
|
+ String descStr = goodsMap.getDetailDesc();
|
|
|
+ descStr = descStr.replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
|
|
|
+ .replace("/Upload", "http://image.istyle24.com/Local")
|
|
|
+ .replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
|
|
|
+
|
|
|
+ htmlDesc = descStr;
|
|
|
+
|
|
|
+ }else {
|
|
|
+
|
|
|
+ String imgPath = env.getProperty("upload.goods.view");
|
|
|
+ imgPath = imgPath.replace("/Upload", "/Local")
|
|
|
+ .replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
|
|
|
+ .replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
|
|
|
+
|
|
|
+ Collection<ShoplinkerGoods> imgList = shoplinkerDao.getGoodsImageList(shoplinkerGoods);
|
|
|
+
|
|
|
+ String dColor = goodsMap.getMainColorEnm(); //대표컬러
|
|
|
+ String dImgFront = ""; //대표상품 앞판컷
|
|
|
+ String dImgBack = ""; //대표상품 뒷판컷
|
|
|
+ String dMaterial = ""; //대표상품 패브릭(소재컷?)
|
|
|
+ ArrayList<String> dImgModelList = new ArrayList<String>(); //대표상품 모델컷
|
|
|
+ ArrayList<String> dImgDetailList = new ArrayList<String>(); //대표상품 디테일컷(상세컷)
|
|
|
+ ArrayList<String> dLabelList = new ArrayList<String>(); //대표상품 케어라벨
|
|
|
+ ArrayList<String> dImgOtherList = new ArrayList<String>(); //상품외부몰용
|
|
|
+
|
|
|
+ // 이미지 정보
|
|
|
+ for(ShoplinkerGoods map : imgList) {
|
|
|
+
|
|
|
+ if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_01.jpg")) { //대표상품 앞판컷
|
|
|
+ dImgFront = imgPath +"/"+ map.getSysImgNm();
|
|
|
+ }
|
|
|
+ if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_02.jpg")) { //대표상품 뒷판컷
|
|
|
+ dImgBack = imgPath +"/"+ map.getSysImgNm();
|
|
|
+ }
|
|
|
+ if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_C")) { //대표상품 모델컷
|
|
|
+ dImgModelList.add(imgPath +"/"+ map.getSysImgNm());
|
|
|
+ }
|
|
|
+ if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_D")) { //대표상품 디테일컷(상세컷)
|
|
|
+ dImgDetailList.add(imgPath +"/"+ map.getSysImgNm());
|
|
|
+ }
|
|
|
+ if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_F")) { //대표상품 패브릭(소재컷?)
|
|
|
+ dMaterial = imgPath +"/"+ map.getSysImgNm();
|
|
|
+ }
|
|
|
+ if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_L")) { //대표상품 케어라벨
|
|
|
+ dLabelList.add(imgPath +"/"+ map.getSysImgNm());
|
|
|
+ }
|
|
|
+ if( -1 < map.getSysImgNm().indexOf("_"+map.getColorCd()+"_X")) { //대표상품 디테일컷(상세컷)
|
|
|
+ dImgOtherList.add(imgPath +"/"+ map.getSysImgNm());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 제대로된 정보 없을 경우, 기존 상세내용으로 보냄
|
|
|
+ if( "".equals(dImgFront) || "".equals(dImgBack)) {
|
|
|
+ String descStr = goodsMap.getDetailDesc();
|
|
|
+ descStr = descStr.replace("http://www.istyle24.com/Upload/", "http://image.istyle24.com/Local/")
|
|
|
+ .replace("/Upload", "http://image.istyle24.com/Local")
|
|
|
+ .replace("http://www.istyle24.com/Images", "http://image.istyle24.com/Statics/design/Images");
|
|
|
+
|
|
|
+ htmlDesc = descStr;
|
|
|
+
|
|
|
+ }else {
|
|
|
+
|
|
|
+ // 1) 상세내용 - 상품설명
|
|
|
+ htmlDesc = "<div class='st_descrp_box' style='max-height:1100px; overflow:hidden;'>";
|
|
|
+ htmlDesc += "<div class='st_desc_simple' style='position:relative; margin-top:0px; margin-left:auto; margin-right:auto;'>";
|
|
|
+ htmlDesc += "<span class='st_tit_desc' style='display:block; margin-bottom:10px; font-size:18px; font-weight:500; letter-spacing:-0.025em;'>"+goodsMap.getDetailDescNew10()+"</span>";
|
|
|
+ htmlDesc += "<p class='st_ptxt01' style='font-size:16px;font-weight:200;line-height:1.5;word-break:keep-all;color:#666666;'>";
|
|
|
+ htmlDesc += goodsMap.getDetailDescNew20();
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ htmlDesc += "<div class='st_desc_character' style='position:relative; margin-top:40px; margin-left:auto; margin-right:auto;'>";
|
|
|
+ htmlDesc += "<span class='st_tit_desc' style='display:block; margin-bottom:10px; font-size:18px; font-weight:500; letter-spacing:-0.025em;'>상품특징</span>";
|
|
|
+ htmlDesc += "<p class='st_ptxt01' style='font-size:16px;font-weight:200;line-height:1.5;word-break:keep-all;color:#666666;'>";
|
|
|
+ htmlDesc += goodsMap.getDetailDescNew30();
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+
|
|
|
+ // 2) 상세내용 - 상품옵션별 색상
|
|
|
+ String colorDesc = "";
|
|
|
+ shoplinkerGoods.setColorListYn("Y"); // 상품이미지정보 색상별
|
|
|
+ Collection<ShoplinkerGoods> imgColorList = shoplinkerDao.getGoodsImageList(shoplinkerGoods);
|
|
|
+ colorDesc = "<div class='st_view_option_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
+ String tmpColor = "";
|
|
|
+ for(ShoplinkerGoods ic : imgColorList ) {
|
|
|
+
|
|
|
+ if( !tmpColor.equals(ic.getColorCd())) {
|
|
|
+ colorDesc += "<span class='st_tit_desc' style='display:block; margin-bottom:10px; font-size:18px; font-weight:500; letter-spacing:-0.025em;'>컬러 : ";
|
|
|
+ colorDesc += "<span>"+ ic.getColorKnm() +"</span></span>";
|
|
|
+ }
|
|
|
+ colorDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
+ colorDesc += "<img src='"+ imgPath+"/"+ic.getSysImgNm()+"' alt='' style='max-width:100%;margin: 10px auto 0;margin-top: 0;display: block;'>";
|
|
|
+ colorDesc += "<img src='"+ imgPath+"/"+ic.getSysImgNm()+"' alt='' style='max-width:100%;display: block;margin: 10px auto 0;'>";
|
|
|
+ colorDesc += "</div>";
|
|
|
+ if( !tmpColor.equals(ic.getColorCd())) {
|
|
|
+ colorDesc += "<div style='height:100px;'></div>";
|
|
|
+ tmpColor = ic.getColorCd();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ colorDesc += "</div>";
|
|
|
+ htmlDesc += colorDesc;
|
|
|
+
|
|
|
+ // 3) 상세내용 - 모델 착용컷
|
|
|
+ String dtlDesc = "";
|
|
|
+ dtlDesc += "<div class='st_view_outfit_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
+ dtlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>OUTFIT VIEW</span>";
|
|
|
+ dtlDesc += "<span class='st_model_info' style='display: block;margin-top: 20px;color: #666;font-size: 16px;font-weight: 200;text-align: center;'>"+goodsMap.getModelInfo()+"</span>";
|
|
|
+ dtlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
+ for(String img : dImgModelList) {
|
|
|
+ dtlDesc += "<img src='"+ img +"' alt='' style='display: block;margin: 10px auto 0;'>";
|
|
|
+ }
|
|
|
+ dtlDesc += "</div>";
|
|
|
+ dtlDesc += "</div>";
|
|
|
+
|
|
|
+ // 4) 상세내용 - 상품컷
|
|
|
+ dtlDesc += "<div class='st_view_detail_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
+ dtlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>PRODUCT VIEW</span>";
|
|
|
+ dtlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
+ for(String img : dImgDetailList) {
|
|
|
+ dtlDesc += "<img src='"+ img +"' alt='' style='display: block;margin: 10px auto 0;'>";
|
|
|
+ }
|
|
|
+ dtlDesc += "</div>";
|
|
|
+ dtlDesc += " </div>";
|
|
|
+
|
|
|
+ // 5) 상세내용 - 원단
|
|
|
+ dtlDesc += "<div class='st_view_fabric_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
+ dtlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>FABRIC</span>";
|
|
|
+ dtlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
+ dtlDesc += "<img src='"+dMaterial +"' alt='' style='display: block;margin: 10px auto 0;margin-top: 0;'>";
|
|
|
+ dtlDesc += "</div>";
|
|
|
+ dtlDesc += "</div>";
|
|
|
+
|
|
|
+ // 6) 상세내용 - 라벨
|
|
|
+ dtlDesc += "<div class='st_view_label_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
+ dtlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>LABEL INFO</span>";
|
|
|
+ dtlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
+ dtlDesc += "<span style='display:inline-block;'>";
|
|
|
+ for(String img : dLabelList) {
|
|
|
+ dtlDesc += "<img src='"+ img +"' alt='' style='float:left; margin-top:0; margin-left:20px;'>";
|
|
|
+ }
|
|
|
+ dtlDesc += "</span>";
|
|
|
+ dtlDesc += "</div>";
|
|
|
+ dtlDesc += "</div>";
|
|
|
+ htmlDesc += dtlDesc;
|
|
|
+
|
|
|
+ // 7) 상세내용 - 사이즈
|
|
|
+ Collection<ShoplinkerGoods> sizeList = shoplinkerDao.getGoodsSizeList(shoplinkerGoods);
|
|
|
+ if (sizeList == null || sizeList.isEmpty()) {
|
|
|
+ //대표상품 실측정사이즈표 없을경우 > 브랜드 별 표준 이미지
|
|
|
+ htmlDesc += "<div class='st_view_size_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
+ htmlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>사이즈정보</span>";
|
|
|
+ htmlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
+
|
|
|
+ String brandSizeImg = env.getProperty("upload.image.view") + "/Upload/brandSizeImg/";
|
|
|
+ if( "Y".equals(goodsMap.getKidsYn())){
|
|
|
+ brandSizeImg += "kids/"+goodsMap.getBrandEnm() +".jpg";
|
|
|
+ htmlDesc += "<img src='"+ brandSizeImg +"' alt='ANDEW 표준 사이즈' style='display: block;margin: 10px auto 0;'>";
|
|
|
+ }else {
|
|
|
+ brandSizeImg += "casuals/"+goodsMap.getBrandEnm() +".jpg";
|
|
|
+ htmlDesc += "<img src='"+ brandSizeImg +"' alt='ANDEW 표준 사이즈' style='display: block;margin: 10px auto 0;'>";
|
|
|
+ }
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+
|
|
|
+ }else {
|
|
|
+
|
|
|
+ htmlDesc += "<div class='st_view_size_box' style='margin-top: 100px;text-align: center;'>";
|
|
|
+ htmlDesc += "<span class='st_tit_view' style='display: block;color: #222;font-size: 32px;font-weight: 300;text-align: center;'>사이즈정보</span>";
|
|
|
+ htmlDesc += "<div class='st_view' style='margin-top: 40px;'>";
|
|
|
+
|
|
|
+ htmlDesc += "<div class='st_tbl' style='padding:0; border-top:1px solid #000;'>";
|
|
|
+ htmlDesc += "<table style='margin:0;padding:0;border-collapse:collapse;border-spacing:0;width:100%;border-top:1px solid #000;word-break:keep-all;'>";
|
|
|
+ htmlDesc += "<thead style=''>";
|
|
|
+ htmlDesc += "<tr style=''>";
|
|
|
+
|
|
|
+ int cnt = 0;
|
|
|
+ for(ShoplinkerGoods size : sizeList) {
|
|
|
+
|
|
|
+ if( 0 == cnt ) {
|
|
|
+ if( "하의".equals(size.getSizeTypecd())) {
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'></th>";
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>허리둘레(cm)</th>";
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>밑위(cm)</th>";
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>엉덩이둘레(cm)</th>";
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>허벅지둘레(cm)</th>";
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>총길이(cm)</th>";
|
|
|
+ }else {
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'></th>";
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>가슴둘레(cm)</th>";
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>어깨너비(cm)</th>";
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>팔길이(cm)</th>";
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>총길이(cm)</th>";
|
|
|
+ }
|
|
|
+ htmlDesc += "</tr>";
|
|
|
+ htmlDesc += "</thead>";
|
|
|
+ htmlDesc += "<tbody style=''>";
|
|
|
+ }
|
|
|
+
|
|
|
+ htmlDesc += "<tr style=''>";
|
|
|
+ htmlDesc += "<th style='position:relative;padding:20px 0;border-bottom:1px solid #ddd;font-weight:500;font-size:16px;letter-spacing:-0.025em;text-align:center;'>"+ size.getOptCd2() +"</th>";
|
|
|
+ htmlDesc += "<td style='position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;'>"+ size.getSizeValue1() +"</td>";
|
|
|
+ htmlDesc += "<td style='position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;'>"+ size.getSizeValue2() +"</td>";
|
|
|
+ htmlDesc += "<td style='position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;'>"+ size.getSizeValue3() +"</td>";
|
|
|
+ htmlDesc += "<td style='position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;'>"+ size.getSizeValue4() +"</td>";
|
|
|
+ if( "하의".equals(size.getSizeTypecd())) {
|
|
|
+ htmlDesc += "<td style='position:relative; padding:20px 0; border-bottom:1px solid #ddd; font-weight:200; font-size:16px; letter-spacing:-0.025em; text-align:center;'>"+ size.getSizeValue5() +"</td>";
|
|
|
+ }
|
|
|
+ cnt ++;
|
|
|
+ }
|
|
|
+
|
|
|
+ htmlDesc += "</tbody>";
|
|
|
+ htmlDesc += "</table>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ htmlDesc += " </div>";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ // 8) 상세내용 - 상품필수정보
|
|
|
+ ShoplinkerGoods certInfo = shoplinkerDao.getCert(shoplinkerGoods);
|
|
|
+ if( null != certInfo) {
|
|
|
+ if( "G083_1".equals(certInfo.getCertTargetGb())) { // 인증대상
|
|
|
+
|
|
|
+ if( "".equals(certInfo.getCertNum())) {
|
|
|
+
|
|
|
+ htmlDesc += "<div class='st_required_box' style='margin-bottom:80px;'>";
|
|
|
+ htmlDesc += "<div class='st_area_kcl' style='color:#222;display:block; position:relative; min-height:160px; margin-top:100px; padding:40px 40px 40px 160px; box-sizing:border-box; background:#f5f5f5;'>";
|
|
|
+ htmlDesc += "<i class='st_ico_kcl' style='position:absolute;left:64px;top:50%;transform:translateY(-50%);z-index:2;background-image: url(/images/pc/ico_kcl.png);width: 32px;height: 50px;display: inline-block;vertical-align: middle;background-repeat: no-repeat;background-size: contain;background-position: 0% 0%;'></i>";
|
|
|
+ htmlDesc += "<p class='st_tit' style='margin-top:0;color:#222;font-size:16px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
+ htmlDesc += certInfo.getCertTargetNm() +"/"+ certInfo.getCertOrganName();
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "<p style='margin-top:20px; color:#222; font-size:13px; font-weight: 300; line-height:1; letter-spacing:-0.025em;'>";
|
|
|
+ htmlDesc += certInfo.getCertDiv();
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "<p class='st_dot_info' style='color: #888888;position:relative;margin-top:20px;font-size:13px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
+ htmlDesc += "<span style='color: #888888 !important;background: #888888 !important;display: inline-block;width: 2px;height: 2px;position: relative;top: -4px;left: 0px;margin-right: 4px;'></span>";
|
|
|
+ htmlDesc += "해당 인증정보는 판매자가 등록한 것으로 등록정보에 대한 일체의 책임은 판매자에게 있습니다.";
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ }else {
|
|
|
+ htmlDesc += "<div class='st_required_box' style='margin-bottom:80px;'>";
|
|
|
+ htmlDesc += "<div class='st_area_kcl' style='display:block; position:relative; min-height:160px; margin-top:100px; padding:40px 40px 40px 160px; box-sizing:border-box; background:#f5f5f5;'>";
|
|
|
+ htmlDesc += "<i class='st_ico_kcl' style='position:absolute;left:64px;top:50%;transform:translateY(-50%);z-index:2;background-image: url(/images/pc/ico_kcl.png);width: 32px;height: 50px;display: inline-block;vertical-align: middle;background-repeat: no-repeat;background-size: contain;background-position: 0% 0%;'></i>";
|
|
|
+ htmlDesc += "<p class='st_tit' style='margin-top:0;color:#222;font-size:16px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
+ htmlDesc += certInfo.getCertDiv() +"/"+ certInfo.getCertOrganName();
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "<p style='margin-top:20px; color:#222; font-size:13px; font-weight: 300; line-height:1; letter-spacing:-0.025em;'>";
|
|
|
+ htmlDesc += "인증번호: "+ certInfo.getCertNum();
|
|
|
+ htmlDesc += "<a href='http://www.safetykorea.kr/search/searchPop?certNum=XX00000-0000' target='_blank' class='st_linktxt3' style='margin-left:20px; color:#888; font-weight:200; text-decoration:none !important;'>상세보기</a>";
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "<p class='st_dot_info' style='color: #888888;position:relative;margin-top:20px;font-size:13px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
+ htmlDesc += "<span style='color: #888888 !important;background: #888888 !important;display: inline-block;width: 2px;height: 2px;position: relative;top: -4px;left: 0px;margin-right: 4px;'></span>";
|
|
|
+ htmlDesc += "해당 인증정보는 판매자가 등록한 것으로 등록정보에 대한 일체의 책임은 판매자에게 있습니다.";
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ }
|
|
|
+
|
|
|
+ }else if( "G083_3".equals(certInfo.getCertTargetGb())) { // 상세설명별도표기
|
|
|
+ htmlDesc += "<div class='st_required_box' style='margin-bottom:80px;'>";
|
|
|
+ htmlDesc += "<div class='st_area_kcl st_no-mark' style='display:block;position:relative;min-height:160px;margin-top:100px;padding:40px 40px 40px 160px;box-sizing:border-box;background:#f5f5f5;padding-left:65px;'>";
|
|
|
+ htmlDesc += "<p class='st_tit' style='margin-top:0;color:#222;font-size:16px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
+ htmlDesc += certInfo.getCertTargetNm();
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "<p style='margin-top:20px; color:#222; font-size:13px; font-weight: 300; line-height:1; letter-spacing:-0.025em;'>";
|
|
|
+ htmlDesc += "제품 상세정보 내 표기되어 있습니다. 상품 정보를 확인해주세요.";
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "<p class='st_dot_info' style='color: #888888;position:relative;margin-top:20px;font-size:13px;font-weight:300;line-height:1;letter-spacing:-0.025em;'>";
|
|
|
+ htmlDesc += "<span style='color: #888888 !important;background: #888888 !important;display: inline-block;width: 2px;height: 2px;position: relative;top: -4px;left: 0px;margin-right: 4px;'></span>";
|
|
|
+ htmlDesc += "해당 인증정보는 판매자가 등록한 것으로 등록정보에 대한 일체의 책임은 판매자에게 있습니다.";
|
|
|
+ htmlDesc += "</p>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ htmlDesc += "</div>";
|
|
|
+ }else {
|
|
|
+ // G083_2 - 인증대상아님
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return htmlDesc;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 샵링커 상품등록 - 3. 품목(고시)정보
|
|
|
*
|
|
|
@@ -1137,11 +1150,12 @@ public class TsaShoplinkerService {
|
|
|
|
|
|
}else {
|
|
|
// 테스트용
|
|
|
- xmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/order/order_real_0430_"+shoplinkerOrder.getOrderPageNo()+".xml";
|
|
|
+ xmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/order/0409/order_real_"+shoplinkerOrder.getOrderPageNo()+".xml";
|
|
|
|
|
|
try {
|
|
|
// API 호출
|
|
|
responseXmlData = shoplinkerUtil.callShoplinkerApiByGet(GagaShoplinkerConstants.API_DOMAIN+regMap.getApiSubUrl()+URLEncoder.encode(xmlUrl), "");
|
|
|
+ // shoplinkerUtil.callShoplinkerApiByGet(GagaShoplinkerConstants.API_DOMAIN+regMap.getApiSubUrl()+URLEncoder.encode(xmlUrl), "");
|
|
|
//testOrderStr();
|
|
|
|
|
|
// response 결과
|
|
|
@@ -1355,7 +1369,6 @@ public class TsaShoplinkerService {
|
|
|
|
|
|
ShoplinkerGoods apiHstMap = new ShoplinkerGoods();
|
|
|
|
|
|
- GagaMap returnMap = new GagaMap();
|
|
|
ShoplinkerGoods regMap = new ShoplinkerGoods();
|
|
|
regMap.setApiType("INVOICE");
|
|
|
regMap.setApiSubUrl(env.getProperty("shoplinker.url.invoice"));
|
|
|
@@ -1364,7 +1377,7 @@ public class TsaShoplinkerService {
|
|
|
regMap.setDomainUrl(shoplinkerInvoice.getDomainUrl());
|
|
|
|
|
|
StringBuilder sbRequest;
|
|
|
- com.gagaframework.shoplinker.domain.invoice.ResultMessage resultMsg_tmp;
|
|
|
+ com.gagaframework.shoplinker.domain.invoice.ResultMessage resultMsg;
|
|
|
|
|
|
Collection<ShoplinkerInvoice> sendList = shoplinkerDao.getShoplinkerInvoiceOrdDtlList(shoplinkerInvoice);
|
|
|
|
|
|
@@ -1399,7 +1412,6 @@ public class TsaShoplinkerService {
|
|
|
String xmlUrl = GagaFileUtil.getConcatenationPath(shoplinkerInvoice.getDomainUrl(), xmlFileName.toString());
|
|
|
|
|
|
// API 호출
|
|
|
- // xmlUrl = "http://ts5000.ipdisk.co.kr:8999/shoplinker/invoice.xml"; // test
|
|
|
String apiUrl = GagaShoplinkerConstants.API_DOMAIN + regMap.getApiSubUrl() + URLEncoder.encode(xmlUrl);
|
|
|
String responseXmlData = shoplinkerUtil.callShoplinkerApiByGet(apiUrl, "");
|
|
|
|
|
|
@@ -1407,16 +1419,8 @@ public class TsaShoplinkerService {
|
|
|
log.info(shoplinkerInvoice.getApiType()+" ####apiUrl "+apiUrl);
|
|
|
|
|
|
// response 결과
|
|
|
- com.gagaframework.shoplinker.domain.goods.result.ResultMessage resultMsg; //임시
|
|
|
- resultMsg = (com.gagaframework.shoplinker.domain.goods.result.ResultMessage)shoplinkerUtil.unmarshal(com.gagaframework.shoplinker.domain.goods.result.ResultMessage.class, responseXmlData);
|
|
|
- //com.style24.admin.support.util.ResultMessage22 resultMsg;
|
|
|
- //resultMsg = (com.style24.admin.support.util.ResultMessage22)shoplinkerUtil.unmarshal(com.style24.admin.support.util.ResultMessage22.class, responseXmlData);
|
|
|
- System.out.println(" ##### invoice2 : "+resultMsg);
|
|
|
- System.out.println(" ##### invoice3 : "+resultMsg.getResult());
|
|
|
- System.out.println(" ##### invoice4 : "+resultMsg.getMessage());
|
|
|
- /// System.out.println(" ##### invoice5 : "+resultMsg.getId());
|
|
|
-
|
|
|
- //resultMsg = (com.gagaframework.shoplinker.domain.invoice.ResultMessage)shoplinkerUtil.unmarshal(com.gagaframework.shoplinker.domain.invoice.ResultMessage.class, responseXmlData);
|
|
|
+ resultMsg = (com.gagaframework.shoplinker.domain.invoice.ResultMessage)shoplinkerUtil.unmarshal(com.gagaframework.shoplinker.domain.invoice.ResultMessage.class, responseXmlData);
|
|
|
+
|
|
|
apiHstMap.setApiType("INVOICE");
|
|
|
apiHstMap.setXmlTxt(sbRequest.toString());
|
|
|
apiHstMap.setOrdDtlNo(info.getOrdDtlNo());
|
|
|
@@ -1666,29 +1670,29 @@ public class TsaShoplinkerService {
|
|
|
String bbb = "<?xml version=\"1.0\" encoding=\"euc-kr\"?>"
|
|
|
+ "<Shoplinker>\r\n"
|
|
|
+ "<header>\r\n"
|
|
|
- + "<total_count>27</total_count>\r\n"
|
|
|
+ + "<total_count>1</total_count>\r\n"
|
|
|
+ "<total_page>1</total_page>\r\n"
|
|
|
+ "<currently_page>1</currently_page>\r\n"
|
|
|
- + "<currently_count>27</currently_count>\r\n"
|
|
|
+ + "<currently_count>1</currently_count>\r\n"
|
|
|
+ "</header>\r\n"
|
|
|
|
|
|
+ "<order>\r\n"
|
|
|
- + "<shoplinker_order_id>0611683168</shoplinker_order_id>\r\n"
|
|
|
- + "<mall_order_id><![CDATA[20210129292734]]></mall_order_id>\r\n"
|
|
|
+ + "<shoplinker_order_id>1234</shoplinker_order_id>\r\n"
|
|
|
+ + "<mall_order_id><![CDATA[1234]]></mall_order_id>\r\n"
|
|
|
+ "<mall_name><![CDATA[(주)현대홈쇼핑]]></mall_name>\r\n"
|
|
|
+ "<baesong_status><![CDATA[송장전송완료]]></baesong_status>\r\n"
|
|
|
- + "<order_name><![CDATA[]]></order_name>\r\n"
|
|
|
- + "<order_tel><![CDATA[]]></order_tel>\r\n"
|
|
|
- + "<order_cel><![CDATA[]]></order_cel>\r\n"
|
|
|
+ + "<order_name><![CDATA[조민혜]]></order_name>\r\n"
|
|
|
+ + "<order_tel><![CDATA[010-1234-5678]]></order_tel>\r\n"
|
|
|
+ + "<order_cel><![CDATA[010-1234-5678]]></order_cel>\r\n"
|
|
|
+ "<order_email><![CDATA[]]></order_email>\r\n"
|
|
|
- + "<receive><![CDATA[]]></receive>\r\n"
|
|
|
- + "<receive_tel><![CDATA[]]></receive_tel>\r\n"
|
|
|
- + "<receive_cel><![CDATA[]]></receive_cel>\r\n"
|
|
|
- + "<receive_zipcode><![CDATA[]]></receive_zipcode>\r\n"
|
|
|
- + "<receive_addr><![CDATA[]]></receive_addr>\r\n"
|
|
|
+ + "<receive><![CDATA[조민혜]]></receive>\r\n"
|
|
|
+ + "<receive_tel><![CDATA[010-1234-5678]]></receive_tel>\r\n"
|
|
|
+ + "<receive_cel><![CDATA[010-1234-5678]]></receive_cel>\r\n"
|
|
|
+ + "<receive_zipcode><![CDATA[21387]]></receive_zipcode>\r\n"
|
|
|
+ + "<receive_addr><![CDATA[인천 부평구 부흥로로로 1234]]></receive_addr>\r\n"
|
|
|
+ "<baesong_type><![CDATA[쇼핑몰확인요망]]></baesong_type>\r\n"
|
|
|
+ "<baesong_bi>0</baesong_bi>\r\n"
|
|
|
- + "<delivery_msg><![CDATA[]]></delivery_msg>\r\n"
|
|
|
+ + "<delivery_msg><![CDATA[조심조심]]></delivery_msg>\r\n"
|
|
|
+ "<order_product_id>2118602667</order_product_id>\r\n"
|
|
|
+ "<shoplinker_product_id>prd143809490</shoplinker_product_id>\r\n"
|
|
|
+ "<partner_product_id>NNW13QPM69</partner_product_id>\r\n"
|
|
|
@@ -1698,8 +1702,8 @@ public class TsaShoplinkerService {
|
|
|
+ "<sale_price>47600</sale_price>\r\n"
|
|
|
+ "<supply_price>36176</supply_price>\r\n"
|
|
|
+ "<sku><![CDATA[NA/160]]></sku>\r\n"
|
|
|
- + "<orderdate>20210129132721</orderdate>\r\n"
|
|
|
- + "<order_reg_date>20210201004337</order_reg_date>\r\n"
|
|
|
+ + "<orderdate>20210618132721</orderdate>\r\n"
|
|
|
+ + "<order_reg_date>20210618132721</order_reg_date>\r\n"
|
|
|
+ "<delivery_invoice>339382561300</delivery_invoice>\r\n"
|
|
|
+ "<order_flag>004</order_flag>\r\n"
|
|
|
+ "<seller_id>hs009583</seller_id>\r\n"
|