|
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
|
|
|
+import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
import com.style24.core.biz.service.TscFreegiftService;
|
|
import com.style24.core.biz.service.TscFreegiftService;
|
|
|
import com.style24.core.biz.service.TscKakaotalkService;
|
|
import com.style24.core.biz.service.TscKakaotalkService;
|
|
|
import com.style24.core.biz.service.TscMailService;
|
|
import com.style24.core.biz.service.TscMailService;
|
|
@@ -26,10 +27,13 @@ import com.style24.core.biz.service.TscOrderService;
|
|
|
import com.style24.core.support.env.TscConstants;
|
|
import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.front.biz.service.TsfCartService;
|
|
import com.style24.front.biz.service.TsfCartService;
|
|
|
|
|
+import com.style24.front.biz.service.TsfCustomerService;
|
|
|
|
|
+import com.style24.front.biz.service.TsfOrderChangeService;
|
|
|
import com.style24.front.biz.service.TsfOrderService;
|
|
import com.style24.front.biz.service.TsfOrderService;
|
|
|
import com.style24.front.biz.thirdparty.NiceCertify;
|
|
import com.style24.front.biz.thirdparty.NiceCertify;
|
|
|
import com.style24.front.support.controller.TsfBaseController;
|
|
import com.style24.front.support.controller.TsfBaseController;
|
|
|
import com.style24.front.support.security.session.TsfSession;
|
|
import com.style24.front.support.security.session.TsfSession;
|
|
|
|
|
+import com.style24.persistence.domain.CustContactHst;
|
|
|
import com.style24.persistence.domain.Customer;
|
|
import com.style24.persistence.domain.Customer;
|
|
|
import com.style24.persistence.domain.Order;
|
|
import com.style24.persistence.domain.Order;
|
|
|
import com.style24.persistence.domain.OrderChange;
|
|
import com.style24.persistence.domain.OrderChange;
|
|
@@ -78,6 +82,12 @@ public class TsfOrderController extends TsfBaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TscMailService mailService;
|
|
private TscMailService mailService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TsfOrderChangeService orderChangeService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TsfCustomerService customerService;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 회원, 비회원 주문페이지
|
|
* 회원, 비회원 주문페이지
|
|
|
*
|
|
*
|
|
@@ -1040,43 +1050,52 @@ public class TsfOrderController extends TsfBaseController {
|
|
|
return mav;
|
|
return mav;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 2021.05.31 알림톡전송 주문완료정보
|
|
|
|
|
- if (StringUtils.isNotBlank(orderInfo.getOrdPhnno())) {
|
|
|
|
|
- Integer userNo = orderInfo.getCustNo();
|
|
|
|
|
- try {
|
|
|
|
|
- orderInfo.setGoodsNm((String) resultMap.get("goodsNm"));
|
|
|
|
|
- orderInfo.setGoodsCnt(String.valueOf(resultMap.get("goodsCnt")));
|
|
|
|
|
- kakaotalkService.sendOrderComplete(orderInfo, userNo);
|
|
|
|
|
-
|
|
|
|
|
- OrderChange orderChange = new OrderChange();
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // 2021.06.15
|
|
|
|
|
- // 주문완료 안내 메일 보내기
|
|
|
|
|
- GagaMap replaceInfo = coreOrderChangeService.getMailOrderCancelReplaceInfo(orderChange);
|
|
|
|
|
-
|
|
|
|
|
- // 주문완료 안내 메일 보내기
|
|
|
|
|
- if (StringUtils.isNotBlank(replaceInfo.getString("ordEmail"))) {
|
|
|
|
|
- // mailService.sendOrderComplete(replaceInfo, userNo);
|
|
|
|
|
|
|
+ // 2021.06.18 알림톡 이전 발송이력 조회
|
|
|
|
|
+ CustContactHst custContactHst = new CustContactHst();
|
|
|
|
|
+ custContactHst.setContactType(TscConstants.ContactType.ORDER_INFO.value());
|
|
|
|
|
+ custContactHst.setContactMethod(TscConstants.ContactMethod.KAKAOTALK.value());
|
|
|
|
|
+ custContactHst.setContactMemo(String.valueOf(order.getOrdNo()));
|
|
|
|
|
+
|
|
|
|
|
+ int count = customerService.getGiftKakaoSendInfo(custContactHst);
|
|
|
|
|
+
|
|
|
|
|
+ if (count < 1) {
|
|
|
|
|
+ // 2021.05.31 알림톡전송 주문완료정보
|
|
|
|
|
+ if (StringUtils.isNotBlank(orderInfo.getOrdPhnno())) {
|
|
|
|
|
+ Integer userNo = orderInfo.getCustNo();
|
|
|
|
|
+ try {
|
|
|
|
|
+ orderInfo.setGoodsNm((String) resultMap.get("goodsNm"));
|
|
|
|
|
+ orderInfo.setGoodsCnt(String.valueOf(resultMap.get("goodsCnt")));
|
|
|
|
|
+ kakaotalkService.sendOrderComplete(orderInfo, userNo);
|
|
|
|
|
+
|
|
|
|
|
+ OrderChange orderChange = new OrderChange();
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.06.15
|
|
|
|
|
+ // 주문완료 안내 메일 보내기
|
|
|
|
|
+ GagaMap replaceInfo = coreOrderChangeService.getMailOrderCancelReplaceInfo(orderChange);
|
|
|
|
|
+
|
|
|
|
|
+ // 주문완료 안내 메일 보내기
|
|
|
|
|
+ if (StringUtils.isNotBlank(replaceInfo.getString("ordEmail"))) {
|
|
|
|
|
+ // mailService.sendOrderComplete(replaceInfo, userNo);
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ // TODO Auto-generated catch block
|
|
|
|
|
+ e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- // TODO Auto-generated catch block
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // 2021.05.31 알림톡전송 선물받기정보 (KCP 무통장입금 제외)
|
|
|
|
|
- if ("Y".equals(orderInfo.getGiftPackYn())) {
|
|
|
|
|
- if ("KCP".equals(orderInfo.getPgGb()) && !TscConstants.PayMeans.BANK_DEPOSIT.value().equals(orderInfo.getPayMeans())) {
|
|
|
|
|
- if (StringUtils.isNotBlank(orderInfo.getRecipPhnno())) {
|
|
|
|
|
- Integer userNo = orderInfo.getCustNo();
|
|
|
|
|
- try {
|
|
|
|
|
- orderInfo.setGoodsNm((String) resultMap.get("goodsNm"));
|
|
|
|
|
- orderInfo.setGoodsCnt(String.valueOf(resultMap.get("goodsCnt")));
|
|
|
|
|
- kakaotalkService.sendOrderGiftComplete(orderInfo, userNo);
|
|
|
|
|
- } catch (Exception e) {
|
|
|
|
|
- // TODO Auto-generated catch block
|
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // 2021.05.31 알림톡전송 선물받기정보 (KCP 무통장입금 제외)
|
|
|
|
|
+ if ("Y".equals(orderInfo.getGiftPackYn())) {
|
|
|
|
|
+ if ("KCP".equals(orderInfo.getPgGb()) && !TscConstants.PayMeans.BANK_DEPOSIT.value().equals(orderInfo.getPayMeans())) {
|
|
|
|
|
+ if (StringUtils.isNotBlank(orderInfo.getRecipPhnno())) {
|
|
|
|
|
+ Integer userNo = orderInfo.getCustNo();
|
|
|
|
|
+ try {
|
|
|
|
|
+ orderInfo.setGoodsNm((String) resultMap.get("goodsNm"));
|
|
|
|
|
+ orderInfo.setGoodsCnt(String.valueOf(resultMap.get("goodsCnt")));
|
|
|
|
|
+ kakaotalkService.sendOrderGiftComplete(orderInfo, userNo);
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ // TODO Auto-generated catch block
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1593,4 +1612,60 @@ public class TsfOrderController extends TsfBaseController {
|
|
|
|
|
|
|
|
return mav;
|
|
return mav;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 마이페이지 교환 옵션 변경 팝업
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param Order
|
|
|
|
|
+ * @return ModelAndView
|
|
|
|
|
+ * @author card007
|
|
|
|
|
+ * @since 2021. 03. 30
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("/change/option/popup/form")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public ModelAndView changeOptionPopupForm(OrderChange orderChange) {
|
|
|
|
|
+ ModelAndView mav = new ModelAndView();
|
|
|
|
|
+
|
|
|
|
|
+ // custNo 설정
|
|
|
|
|
+ if (TsfSession.isLogin()) {
|
|
|
|
|
+ orderChange.setCustNo(TsfSession.getInfo().getCustNo());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ orderChange.setCustNo(0);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 교환 옵션 정보 조회
|
|
|
|
|
+ Collection<OrderChange> exchangeOptionInfo = orderChangeService.getExchangeOptionInfo(orderChange);
|
|
|
|
|
+ mav.addObject("exchangeOptionInfo" , exchangeOptionInfo);
|
|
|
|
|
+ mav.addObject("oneData" , exchangeOptionInfo.iterator().next());
|
|
|
|
|
+ mav.addObject("ordDtlNo" , orderChange.getOrdDtlNo());
|
|
|
|
|
+ mav.addObject("chgQty" , orderChange.getChgQty());
|
|
|
|
|
+ mav.addObject("title" , "옵션 변경");
|
|
|
|
|
+
|
|
|
|
|
+ mav.setViewName(super.getDeviceViewName("mypage/ChangeOptionPopupForm"));
|
|
|
|
|
+
|
|
|
|
|
+ return mav;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 선물받기 옵션변경
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param Order
|
|
|
|
|
+ * @return ModelAndView
|
|
|
|
|
+ * @author jsh77b
|
|
|
|
|
+ * @since 2021. 06. 18
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("/updateOrderDetailItemOpt2")
|
|
|
|
|
+ @ResponseBody
|
|
|
|
|
+ public GagaResponse updateOrderDetailItemOpt2(@RequestBody Order order) {
|
|
|
|
|
+ // custNo 설정
|
|
|
|
|
+ if (TsfSession.isLogin()) {
|
|
|
|
|
+ order.setUpdNo(TsfSession.getInfo().getCustNo());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ order.setUpdNo(0);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ coreOrderService.updateOrderDetailItemOpt2(order);
|
|
|
|
|
+
|
|
|
|
|
+ return super.ok("저장이 완료되었습니다.");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|