|
|
@@ -22,6 +22,7 @@ import com.style24.core.biz.dao.TscScmDao;
|
|
|
import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.core.support.util.CryptoUtils;
|
|
|
+import com.style24.persistence.domain.DeliveryFee;
|
|
|
import com.style24.persistence.domain.Order;
|
|
|
import com.style24.persistence.domain.OrderChange;
|
|
|
import com.style24.persistence.domain.Payment;
|
|
|
@@ -1902,7 +1903,9 @@ public class TscOrderService {
|
|
|
}
|
|
|
|
|
|
// 3. 상품정보조회
|
|
|
- Collection<Order> orderDetailList = orderDao.getOrderDetailOrdAmtList(order);
|
|
|
+ Collection<Order> orderDetailList = orderDao.getOrderDetailOrdAmtList(order);
|
|
|
+ Collection<Order> orderDetailDelvFeeCdGrp = orderDao.getOrderDetailDelvFeeCdGrp(order);
|
|
|
+
|
|
|
int listSumAmt = 0; // 상품금액합계(정상가)
|
|
|
int goodsSumAmt = 0; // 상품금액합계(판매가)
|
|
|
int goodsDcSumAmt = 0; // 상품할인금액(정상가 - 판매가)
|
|
|
@@ -2048,140 +2051,41 @@ public class TscOrderService {
|
|
|
resultMap.set("delvMemo" , order.getDelvMemo()); // 받는사람배송메모
|
|
|
resultMap.set("pgGbNm" , payType); // 결제방법
|
|
|
|
|
|
- // 주문목록
|
|
|
- StringBuffer orderListInfo = new StringBuffer();
|
|
|
- orderListInfo.append("<table style=\"width:100%;margin:0;padding:0;font-size: 14px;\" cellspacing=\"0\" cellpadding=\"0\">");
|
|
|
- orderListInfo.append(" <tbody>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td height=\"50px;\" style=\"height: 50px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <th colspan=\"2\" style=\"text-align: left;font-size: 18px;color: #222222;\" align=\"left\">주문 상품 정보</th>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td height=\"30px;\" style=\"height: 30px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td>");
|
|
|
-
|
|
|
- // 배송단위 START
|
|
|
- orderListInfo.append(" <table style=\"border: 1px; border-color: #dddddd; border-style: solid; box-sizing: border-box; width:100%;margin:0;padding:0\" cellspacing=\"0\" cellpadding=\"0\">");
|
|
|
- orderListInfo.append(" <tbody>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td colspan=\"5\" height=\"20px;\" style=\"height: 20px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td width=\"40px;\"></td>");
|
|
|
- orderListInfo.append(" <td colspan=\"3\" style=\"text-align: left;font-size: 18px;font-family:\"Apple SD Gothic Neo\",\"나눔고딕\",NanumGothic,\"맑은고딕\",Malgun Gothic, Helvetica, sans-serif;font-weight:600;color: #222222;\" align=\"left\">").append("STYLE24 총알배송").append("</td>");
|
|
|
- orderListInfo.append(" <td width=\"40px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td colspan=\"5\" height=\"20px;\" style=\"height: 20px;border:0; border-bottom: 1px; border-color: #dddddd; border-style: solid; box-sizing: border-box;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td colspan=\"5\" style=\"text-align: left;font-size: 18px;font-family:\"Apple SD Gothic Neo\",\"나눔고딕\",NanumGothic,\"맑은고딕\",Malgun Gothic, Helvetica, sans-serif;color: #222222;\">");
|
|
|
-
|
|
|
- // 상품단위 START
|
|
|
- orderListInfo.append(" <table style=\"width:100%;height:100%;margin:0;padding:0;font-size: 14px;\" cellspacing=\"0\" cellpadding=\"0\">");
|
|
|
- orderListInfo.append(" <tbody>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td height=\"30px;\" style=\"height: 30px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td width=\"40px;\" rowspan=\"10\"></td>");
|
|
|
- orderListInfo.append(" <td width=\"100px;\" height=\"150px;\" rowspan=\"10\" valign=\"top\" style=\"margin:0;padding:0\">");
|
|
|
- orderListInfo.append(" <a href=\"#none\" target=\"_blank\" style=\"margin:0;padding:0\">");
|
|
|
- orderListInfo.append(" <span style=\"background: #f5f5f5;width: 100px;height: 150px;margin:0;padding:0\">");
|
|
|
- orderListInfo.append(" <img src=\"").append("이미지경로").append("\" alt=\"이미지\" style=\"width: 100px;height: 150px;margin:0;padding:0\">");
|
|
|
- orderListInfo.append(" </span>");
|
|
|
- orderListInfo.append(" </a>");
|
|
|
- orderListInfo.append(" </td>");
|
|
|
- orderListInfo.append(" <td width=\"30px;\" rowspan=\"10\"></td>");
|
|
|
- orderListInfo.append(" <td width=\"370px;\" height=\"10px;\"></td>");
|
|
|
- orderListInfo.append(" <td width=\"40px;\" rowspan=\"10\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td style=\"font-family:\"Apple SD Gothic Neo\",verdana,Arial,\"나눔고딕\",NanumGothic,\"맑은고딕\",Malgun Gothic, Helvetica, sans-serif;\">").append("브랜드명");
|
|
|
- orderListInfo.append(" </td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td height=\"10px;\" style=\"height: 10px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td style=\"color: #222222;font-size: 16px;font-weight: bold;letter-spacing: -0.05em;\">");
|
|
|
- orderListInfo.append(" <a href=\"").append("링크").append("\" target=\"_blank\" style=\"display: block; color: #222222; font-size: 16px; font-weight: bold; letter-spacing: -0.025em; text-decoration: none;\">");
|
|
|
- orderListInfo.append("상품명");
|
|
|
- orderListInfo.append(" </a>");
|
|
|
- orderListInfo.append(" </td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td height=\"10px;\" style=\"height: 10px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td>");
|
|
|
- orderListInfo.append(" <p style=\"margin: 0; padding: 0; font-family:\"Apple SD Gothic Neo\",\"나눔고딕\",NanumGothic,\"맑은고딕\",Malgun Gothic, Helvetica, sans-serif;font-weight:200;color: #666666; line-height: 2;\">옵션 1</p>");
|
|
|
- orderListInfo.append(" <p style=\"margin: 0; padding: 0; font-family:\"Apple SD Gothic Neo\",\"나눔고딕\",NanumGothic,\"맑은고딕\",Malgun Gothic, Helvetica, sans-serif;font-weight:200;color: #666666; line-height: 2;\">옵션 1</p>");
|
|
|
- orderListInfo.append(" <p style=\"margin: 0; padding: 0; font-family:\"Apple SD Gothic Neo\",\"나눔고딕\",NanumGothic,\"맑은고딕\",Malgun Gothic, Helvetica, sans-serif;font-weight:200;color: #666666; line-height: 2;\">옵션 1</p>");
|
|
|
- orderListInfo.append(" </td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td height=\"5px;\" style=\"height: 5px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td height=\"10px;\" style=\"height: 10px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td>");
|
|
|
- orderListInfo.append(" <span>").append("1").append("개</span>");
|
|
|
- orderListInfo.append(" <span style=\"width: 12px;padding-left:12px;\"></span>");
|
|
|
- orderListInfo.append(" <span style=\"display: inline-block; vertical-align: middle; width: 1px; height: 14px; background: #ddd;\"></span>");
|
|
|
- orderListInfo.append(" <span style=\"width: 12px;padding-right:12px;\"></span>");
|
|
|
- orderListInfo.append(" <span style=\"text-decoration: line-through;color: #888888;\"><span>").append("19,990").append("</span>원</span>");
|
|
|
- orderListInfo.append(" <span style=\"font-weight: 500;\"><span>").append("19,990").append("</span>원</span>");
|
|
|
- orderListInfo.append(" </td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td height=\"10px;\" style=\"height: 10px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td height=\"20px;\" style=\"height: 20px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" </tbody>");
|
|
|
- orderListInfo.append(" </table>");
|
|
|
- // 상품 END
|
|
|
-
|
|
|
-
|
|
|
- orderListInfo.append(" </td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td height=\"30px;\" style=\"height: 30px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" <tr>");
|
|
|
- orderListInfo.append(" <td width=\"30px;\"></td>");
|
|
|
- orderListInfo.append(" <td colspan=\"3\" height=\"1\" style=\"border: 1px; border-top-color: #ddd; border-top-style: dashed;\"></td>");
|
|
|
- orderListInfo.append(" <td width=\"30px;\"></td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" </tbody>");
|
|
|
- orderListInfo.append(" </table>");
|
|
|
- // 배송단위 END
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- orderListInfo.append(" </td>");
|
|
|
- orderListInfo.append(" </tr>");
|
|
|
- orderListInfo.append(" </tbody>");
|
|
|
- orderListInfo.append("</table>");
|
|
|
-
|
|
|
- log.info("orderListInfo ::: {} ", orderListInfo.toString());
|
|
|
-
|
|
|
+ // 취소 상세 정보 조회
|
|
|
+ Collection<OrderChange> cancelList = new ArrayList();
|
|
|
for (Order orderDetail : orderDetailList) {
|
|
|
-
|
|
|
+ OrderChange orderChange = new OrderChange();
|
|
|
+ orderChange.setGoodsCd(orderDetail.getGoodsCd());
|
|
|
+ orderChange.setGoodsNm(orderDetail.getGoodsNm());
|
|
|
+ orderChange.setBrandNm(orderDetail.getBrandGroupNm());
|
|
|
+ orderChange.setShotDelvYn(orderDetail.getShotDelvYn());
|
|
|
+ orderChange.setSelfGoodsYn(orderDetail.getSelfGoodsYn());
|
|
|
+ orderChange.setItemNm(orderDetail.getItemNm());
|
|
|
+ orderChange.setColorNm(orderDetail.getColorNm());
|
|
|
+ orderChange.setOptCd1(orderDetail.getOptCd1());
|
|
|
+ orderChange.setOptCd2(orderDetail.getOptCd2());
|
|
|
+ orderChange.setGoodsType(orderDetail.getGoodsType());
|
|
|
+ orderChange.setSysImgNm(orderDetail.getSysFileNm());
|
|
|
+ orderChange.setSupplyCompNm(orderDetail.getSupplyCompNm());
|
|
|
+ orderChange.setDelvFeeCd(orderDetail.getCartDelvFeeCd());
|
|
|
+ orderChange.setOrdNo(order.getOrdNo());
|
|
|
+
|
|
|
+ cancelList.add(orderChange);
|
|
|
}
|
|
|
- resultMap.set("orderListInfo" , orderListInfo); // 주문목록
|
|
|
+
|
|
|
+ // 상픔 정보 조회
|
|
|
+ String cancelInfo = orderChangeService.getMailOrderCancelInfo(cancelList);
|
|
|
+ resultMap.set("orderListInfo" , cancelInfo); // 주문목록
|
|
|
+
|
|
|
+ log.info("cancelInfo ::: {}", cancelInfo);
|
|
|
|
|
|
// 사은품목록
|
|
|
- StringBuffer orderFreegiftInfo = new StringBuffer();
|
|
|
- resultMap.set("orderFreegiftInfo" , orderFreegiftInfo); // 사은품목록
|
|
|
+ OrderChange oc = new OrderChange();
|
|
|
+ oc.setOrdNo(order.getOrdNo());
|
|
|
+ String freeGiftInfo = orderChangeService.getMailFreeGiftCancelInfo(oc);
|
|
|
+ resultMap.set("orderFreegiftInfo" , freeGiftInfo); // 사은품목록
|
|
|
+
|
|
|
+ log.info("freeGiftInfo ::: {}", freeGiftInfo);
|
|
|
|
|
|
return resultMap;
|
|
|
}
|