|
|
@@ -22,11 +22,11 @@ import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
import com.gagaframework.web.rest.server.GagaResponseStatus;
|
|
|
import com.style24.core.biz.service.TscCouponService;
|
|
|
import com.style24.core.biz.service.TscCustomerService;
|
|
|
-import com.style24.core.biz.service.TscKakaoPayService;
|
|
|
import com.style24.core.biz.service.TscKcpService;
|
|
|
import com.style24.core.biz.service.TscOrderChangeService;
|
|
|
import com.style24.core.biz.service.TscOrderRefundService;
|
|
|
import com.style24.core.biz.service.TscOrderService;
|
|
|
+import com.style24.core.biz.service.TscWmsService;
|
|
|
import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.front.biz.service.TsfCartService;
|
|
|
@@ -114,9 +114,6 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
@Autowired
|
|
|
private TsfRendererService rendererService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private TscKakaoPayService kakaoPayService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private NiceCertify niceCertify;
|
|
|
|
|
|
@@ -130,10 +127,13 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
private TsfCommonService commonService;
|
|
|
|
|
|
@Autowired
|
|
|
- private TscKcpService kcpService;
|
|
|
+ private TscKcpService coreKcpService;
|
|
|
|
|
|
@Autowired
|
|
|
private TsfReinboundService reinboundService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private TscWmsService coreWmsService;
|
|
|
|
|
|
/**
|
|
|
* 마이페이지 메인 화면
|
|
|
@@ -465,6 +465,38 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 교환요청철회
|
|
|
+ *
|
|
|
+ * @param OrderChange
|
|
|
+ * @return GagaResponse
|
|
|
+ * @author card007
|
|
|
+ * @since 2021. 04. 20
|
|
|
+ */
|
|
|
+ @PostMapping("/exchange/cancel")
|
|
|
+ @ResponseBody
|
|
|
+ public GagaResponse exchangeRequestCancel(@RequestBody OrderChange orderChange) {
|
|
|
+
|
|
|
+ if (orderChange== null) {
|
|
|
+ throw new IllegalStateException(message.getMessage("FAIL_1001"));
|
|
|
+ }
|
|
|
+
|
|
|
+ // 1. 교환요청철회 정보 설정
|
|
|
+ int custNo = TsfSession.isLogin() ? TsfSession.getInfo().getCustNo() : 0;
|
|
|
+ orderChange.setCustNo(custNo);
|
|
|
+ orderChange.setRegNo(custNo);
|
|
|
+ orderChange.setUpdNo(custNo);
|
|
|
+
|
|
|
+ String ipAddress = TsfSession.getIpAddress();
|
|
|
+ orderChange.setIpAddress(ipAddress);
|
|
|
+
|
|
|
+ // 2.교환요청철회
|
|
|
+ coreOrderChangeService.exchangeCancel(orderChange);
|
|
|
+
|
|
|
+ return super.ok(message.getMessage("EXCHANGE_0002"));
|
|
|
+ // return super.ok();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 등급쿠폰 다운 처리
|
|
|
*
|
|
|
@@ -747,16 +779,12 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
throw new IllegalStateException(message.getMessage("FAIL_1001"));
|
|
|
}
|
|
|
|
|
|
- // TODO
|
|
|
- // @ 결품취소로직 추가
|
|
|
- // @ 주문취소시 상태값 체크
|
|
|
- // @ 취소, 반품시 배송비 체크 로직 (선결제 로직)
|
|
|
-
|
|
|
// 1. 세션회원조회
|
|
|
int custNo = TsfSession.getInfo().getCustNo();
|
|
|
orderChange.setCustNo(custNo);
|
|
|
orderChange.setIpAddress(TsfSession.getIpAddress());
|
|
|
|
|
|
+ // 2. 취소완료 처리
|
|
|
GagaMap result = coreOrderChangeService.orderCancelPreInfo(orderChange);
|
|
|
|
|
|
// TODO
|
|
|
@@ -970,6 +998,35 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
return mav;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * WMS 주문 취소 가능 여부 조회
|
|
|
+ *
|
|
|
+ * @param
|
|
|
+ * @return
|
|
|
+ * @author card007
|
|
|
+ * @since 2021. 04. 22
|
|
|
+ */
|
|
|
+ @PostMapping("/wms/cancel/available")
|
|
|
+ @ResponseBody
|
|
|
+ public GagaMap getWmsCancelYn(@RequestBody OrderChange orderChange) {
|
|
|
+ GagaMap result = new GagaMap();
|
|
|
+ String cancelYn = "Y";
|
|
|
+
|
|
|
+ Integer ordNo = orderChange.getOrdNo();
|
|
|
+
|
|
|
+ for (Integer ordDtlNo : orderChange.getOrdDtlNoArr()) {
|
|
|
+ String rst = coreWmsService.getCancelYn(ordNo, ordDtlNo);
|
|
|
+
|
|
|
+ if ("Y".equals(cancelYn) && "N".equals(rst)) {
|
|
|
+ cancelYn = "N";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ result.setString("cancelYn", cancelYn);
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 STYLE24 포인트화면
|
|
|
*
|
|
|
@@ -1725,7 +1782,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
public GagaMap getAccountCheck(@RequestBody CustAccount custAccount) throws Exception {
|
|
|
custAccount.setIpAddress(TsfSession.getIpAddress());
|
|
|
boolean isValid = false;
|
|
|
- GagaMap result = kcpService.checkAccount(custAccount);
|
|
|
+ GagaMap result = coreKcpService.checkAccount(custAccount);
|
|
|
if ("0000".equals(result.get("resCd"))) {
|
|
|
isValid = true;
|
|
|
}
|