|
|
@@ -4,6 +4,9 @@ import java.util.ArrayList;
|
|
|
import java.util.Collection;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
@@ -16,9 +19,6 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
-import com.gagaframework.web.parameter.GagaMap;
|
|
|
-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;
|
|
|
@@ -49,6 +49,10 @@ import com.style24.persistence.domain.WishList;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
+import com.gagaframework.web.parameter.GagaMap;
|
|
|
+import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
+import com.gagaframework.web.rest.server.GagaResponseStatus;
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 Controller
|
|
|
*
|
|
|
@@ -74,7 +78,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private TscOrderService coreOrderService;
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private TsfOrderChangeService orderChangeService;
|
|
|
|
|
|
@@ -101,13 +105,13 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private TsfRendererService rendererService;
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private TscKakaoPayService kakaoPayService;
|
|
|
|
|
|
@Autowired
|
|
|
private NiceCertify niceCertify;
|
|
|
-
|
|
|
+
|
|
|
@Autowired
|
|
|
private TscCouponService coreCouponService;
|
|
|
|
|
|
@@ -125,7 +129,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
if (order == null) {
|
|
|
order = new Order();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
// 고객번호 설정
|
|
|
int custNo = TsfSession.getInfo().getCustNo();
|
|
|
order.setCustNo(custNo);
|
|
|
@@ -139,7 +143,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
// 쿠폰정보 조회
|
|
|
mav.addObject("couponCnt", coreOrderService.getCouponInfo(order));
|
|
|
-
|
|
|
+
|
|
|
order.setExpiredSoon("Y");
|
|
|
mav.addObject("expiredSoonCouponCnt", coreOrderService.getCouponInfo(order));
|
|
|
|
|
|
@@ -187,11 +191,10 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
// 주문번호 설정
|
|
|
mav.addObject("ordNo", ordNo);
|
|
|
|
|
|
-
|
|
|
Order order = new Order();
|
|
|
order.setCustNo(custNo);
|
|
|
order.setOrdNo(ordNo);
|
|
|
-
|
|
|
+
|
|
|
// 주문목록 조회
|
|
|
Collection<GagaMap> orderList = orderService.getOrderListForMypage(order);
|
|
|
|
|
|
@@ -210,7 +213,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
// 주문 결제정보 조회
|
|
|
mav.addObject("paymentInfo", orderService.getPaymentInfoForMypage(order));
|
|
|
-
|
|
|
+
|
|
|
// 주문 배송지 정보 조회
|
|
|
mav.addObject("deliveryAddrInfo", orderService.getOrderDeliveryAddrInfo(order));
|
|
|
|
|
|
@@ -278,7 +281,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
// 고객번호 설정
|
|
|
int custNo = TsfSession.getInfo().getCustNo();
|
|
|
order.setUpdNo(custNo);
|
|
|
-
|
|
|
+
|
|
|
// 주문내역 삭제 처리
|
|
|
int chk = orderService.updateOrderDisplayYn(order);
|
|
|
|
|
|
@@ -316,10 +319,10 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
order.setCustNo(custNo);
|
|
|
order.setRegNo(custNo);
|
|
|
order.setUpdNo(custNo);
|
|
|
-
|
|
|
+
|
|
|
// 구매확정 처리
|
|
|
result = coreOrderService.decideOrder(order);
|
|
|
-
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@@ -335,7 +338,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
@ResponseBody
|
|
|
public ModelAndView exchangeForm(Order order) {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
-
|
|
|
+
|
|
|
// 주문번호 설정
|
|
|
mav.addObject("ordNo", order.getOrdNo());
|
|
|
|
|
|
@@ -353,7 +356,6 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
mav.addObject("customerInfo", customer);
|
|
|
|
|
|
-
|
|
|
// 주문목록 조회
|
|
|
Collection<GagaMap> orderList = orderService.getOrderListForMypage(order);
|
|
|
|
|
|
@@ -366,12 +368,12 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
// 주문 배송지 정보 조회
|
|
|
mav.addObject("deliveryAddrInfo", orderService.getOrderDeliveryAddrInfo(order));
|
|
|
-
|
|
|
+
|
|
|
// 교환 사유 목록 조회
|
|
|
mav.addObject("exchangeReason", rendererService.getCommonCodeList("G689", "Y"));
|
|
|
-
|
|
|
+
|
|
|
mav.setViewName(super.getDeviceViewName("/mypage/MypageExchangeForm"));
|
|
|
-
|
|
|
+
|
|
|
return mav;
|
|
|
}
|
|
|
|
|
|
@@ -400,9 +402,9 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
// 등급쿠폰 다운 처리
|
|
|
int count = couponService.createCustGradeAllCoupon(coupon);
|
|
|
-
|
|
|
+
|
|
|
result.set("status", GagaResponseStatus.SUCCESS.getCode());
|
|
|
-
|
|
|
+
|
|
|
if (count == 0) {
|
|
|
result.set("message", message.getMessage("COUPON_0002"));
|
|
|
} else {
|
|
|
@@ -485,7 +487,6 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
mav.addObject("customerInfo", customer);
|
|
|
|
|
|
-
|
|
|
// 반품 가능 리스트 조회
|
|
|
mav.addObject("returnList", orderChangeService.getCancelListForMypage(order));
|
|
|
|
|
|
@@ -508,7 +509,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
return mav;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 STYLE24 포인트화면
|
|
|
*
|
|
|
@@ -527,28 +528,27 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
map.setString("bankNm", "김지철");
|
|
|
map.setString("accountNo", "110500288201");
|
|
|
map.setString("bankCd", "88");
|
|
|
- coreOrderService.checkAccount(map);
|
|
|
// 테스트용 (삭제예정)
|
|
|
-
|
|
|
+
|
|
|
int custNo = TsfSession.getInfo().getCustNo();
|
|
|
point.setCustNo(custNo);
|
|
|
// 잔여포인트
|
|
|
- mav.addObject("pointInfo", pointService.getUsablePointInfo(point));
|
|
|
+ mav.addObject("pointInfo", pointService.getUsablePointInfo(point));
|
|
|
// 적립예정포인트 expectedPntAmt
|
|
|
mav.addObject("expectedpointInfo", pointService.getExpectedPointInfo(point));
|
|
|
// 한달 이내 소멸 예정 포인트
|
|
|
mav.addObject("extinctpointInfo", pointService.getExtinctPointInfo(point));
|
|
|
// 전체내역 조회
|
|
|
- mav.addObject("allPointList",pointService.getAllPointList(point));
|
|
|
+ mav.addObject("allPointList", pointService.getAllPointList(point));
|
|
|
// 적립내역 조회
|
|
|
- mav.addObject("accumulatePointList",pointService.getAccumulatePointList(point));
|
|
|
+ mav.addObject("accumulatePointList", pointService.getAccumulatePointList(point));
|
|
|
// 사용내역 조회
|
|
|
- mav.addObject("usePointList",pointService.getUsePointList(point));
|
|
|
-
|
|
|
+ mav.addObject("usePointList", pointService.getUsePointList(point));
|
|
|
+
|
|
|
mav.setViewName(super.getDeviceViewName("mypage/MypagePointForm"));
|
|
|
return mav;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 STYLE24 포인트 전체,적립,사용내역
|
|
|
*
|
|
|
@@ -561,17 +561,17 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
@ResponseBody
|
|
|
public GagaMap getAllPointList(@RequestBody Point point) {
|
|
|
GagaMap result = new GagaMap();
|
|
|
-
|
|
|
+
|
|
|
int custNo = TsfSession.getInfo().getCustNo();
|
|
|
point.setCustNo(custNo);
|
|
|
-
|
|
|
+
|
|
|
// 전체내역 조회
|
|
|
- result.set("allPointList",pointService.getAllPointList(point));
|
|
|
+ result.set("allPointList", pointService.getAllPointList(point));
|
|
|
// 적립내역 조회
|
|
|
- result.set("accumulatePointList",pointService.getAccumulatePointList(point));
|
|
|
+ result.set("accumulatePointList", pointService.getAccumulatePointList(point));
|
|
|
// 사용내역 조회
|
|
|
- result.set("usePointList",pointService.getUsePointList(point));
|
|
|
-
|
|
|
+ result.set("usePointList", pointService.getUsePointList(point));
|
|
|
+
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@@ -627,8 +627,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
/* 김소원 상품권 쿠폰 시작 */
|
|
|
/**
|
|
|
* 마이페이지 상품권화면
|
|
|
@@ -646,7 +645,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
|
|
|
return mav;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 상품권 사용 리스트
|
|
|
*
|
|
|
@@ -658,10 +657,10 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
@ResponseBody
|
|
|
public GagaMap getGiftcardUseList(@RequestBody GiftCard giftcard) {
|
|
|
GagaMap result = new GagaMap();
|
|
|
- result.set("giftcardUseList",giftcardService.getGiftcardUseList(giftcard));
|
|
|
+ result.set("giftcardUseList", giftcardService.getGiftcardUseList(giftcard));
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 상품권 보유 리스트
|
|
|
*
|
|
|
@@ -673,7 +672,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
@ResponseBody
|
|
|
public GagaMap getGiftcardOwnList(@RequestBody GiftCard giftcard) {
|
|
|
GagaMap result = new GagaMap();
|
|
|
- result.set("giftcardOwnList",giftcardService.getGiftcardOwnList(giftcard));
|
|
|
+ result.set("giftcardOwnList", giftcardService.getGiftcardOwnList(giftcard));
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@@ -691,7 +690,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
giftcardService.getGiftcardUseConfirm(giftcard);
|
|
|
return super.ok(message.getMessage("SUCC_0001"));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 쿠폰화면
|
|
|
*
|
|
|
@@ -702,13 +701,13 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
@GetMapping("/coupon/form")
|
|
|
public ModelAndView mypageCouponForm(Coupon coupon) {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
- mav.addObject("couponList",couponService.getMypageCouponList(coupon));
|
|
|
- mav.addObject("couponInfo",couponService.getMypageCouponInfo(coupon));
|
|
|
+ mav.addObject("couponList", couponService.getMypageCouponList(coupon));
|
|
|
+ mav.addObject("couponInfo", couponService.getMypageCouponInfo(coupon));
|
|
|
mav.setViewName(super.getDeviceViewName("mypage/MypageCouponForm"));
|
|
|
-
|
|
|
+
|
|
|
return mav;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 마이페이지 쿠폰 상세보기 팝업
|
|
|
*
|
|
|
@@ -716,10 +715,10 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
* @author sowon
|
|
|
* @since 2021. 03. 17
|
|
|
*/
|
|
|
- @GetMapping(value="/coupon/detailPop")
|
|
|
+ @GetMapping(value = "/coupon/detailPop")
|
|
|
public ModelAndView mypageCouponDetailPop(@RequestParam(value = "cpnId") int cpnId) {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
-
|
|
|
+
|
|
|
// 쿠폰 - 기본정보
|
|
|
mav.addObject("couponDetailInfo", couponService.getCouponDetailInfo(cpnId));
|
|
|
// 쿠폰적용대상 - 공급업체 조회
|
|
|
@@ -736,9 +735,6 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
return mav;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/*신주승 시작*/
|
|
|
|
|
|
/**
|
|
|
@@ -772,7 +768,6 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 마이페이지 - 회원정보수정 화면
|
|
|
*
|
|
|
@@ -782,16 +777,16 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
* @since 2021. 03. 15
|
|
|
*/
|
|
|
@GetMapping("/customer/modify/form")
|
|
|
- public ModelAndView getCustomerModifyForm(@RequestParam(required = false)String confirmYn) {
|
|
|
+ public ModelAndView getCustomerModifyForm(@RequestParam(required = false) String confirmYn) {
|
|
|
ModelAndView mav = new ModelAndView();
|
|
|
- String referer = StringUtils.defaultIfBlank(TsfSession.getHttpServletRequest().getHeader("referer"),"");
|
|
|
+ String referer = StringUtils.defaultIfBlank(TsfSession.getHttpServletRequest().getHeader("referer"), "");
|
|
|
boolean redirect = false;
|
|
|
|
|
|
- if(StringUtils.isBlank(referer)) {
|
|
|
+ if (StringUtils.isBlank(referer)) {
|
|
|
redirect = true;
|
|
|
- } else if(!referer.contains("/mypage/customer/confirm/form")) {
|
|
|
+ } else if (!referer.contains("/mypage/customer/confirm/form")) {
|
|
|
redirect = true;
|
|
|
- } else if(!"Y".equals(confirmYn)) {
|
|
|
+ } else if (!"Y".equals(confirmYn)) {
|
|
|
redirect = true;
|
|
|
}
|
|
|
|
|
|
@@ -800,7 +795,7 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
return mav;
|
|
|
}
|
|
|
|
|
|
- mav.addObject("bankList", rendererService.getCommonCodeList("G050", "Y"));
|
|
|
+ mav.addObject("bankList", rendererService.getCommonCodeList("G940", "Y"));
|
|
|
mav.addObject("genderGbList", rendererService.getCommonCodeList("G007", "Y"));
|
|
|
|
|
|
mav.setViewName(super.getDeviceViewName("/mypage/MypageCustModifyForm"));
|
|
|
@@ -840,5 +835,20 @@ public class TsfMypageController extends TsfBaseController {
|
|
|
customer.setBirthYmd(authInfo.getString("sBirthDate"));
|
|
|
return customerService.updateCustomerAuth(customer);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 마이페이지 - 계좌인증
|
|
|
+ *
|
|
|
+ * @return GagaMap - 결과
|
|
|
+ * @author jsshin
|
|
|
+ * @since 2021. 03. 16
|
|
|
+ */
|
|
|
+ @RequestMapping("/account/check")
|
|
|
+ @ResponseBody
|
|
|
+ public GagaMap getAccountCheck(HttpServletRequest request, HttpServletResponse response) throws Exception {
|
|
|
+ log.info("request2 accountHolder {}", request.getParameter("accountHolder"));
|
|
|
+ GagaMap result = customerService.checkAccount(request);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
/*신주승 끝*/
|
|
|
}
|