|
@@ -7,10 +7,6 @@ import java.util.Collections;
|
|
|
import java.util.Comparator;
|
|
import java.util.Comparator;
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
-
|
|
|
|
|
-import com.gagaframework.web.rest.server.GagaResponse;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.core.env.Environment;
|
|
import org.springframework.core.env.Environment;
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -21,14 +17,12 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
-import org.thymeleaf.util.StringUtils;
|
|
|
|
|
|
|
|
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
import com.gagaframework.web.parameter.GagaMap;
|
|
|
import com.style24.core.biz.service.TscKcpService;
|
|
import com.style24.core.biz.service.TscKcpService;
|
|
|
import com.style24.core.biz.service.TscOrderService;
|
|
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.core.support.util.CryptoUtils;
|
|
|
|
|
import com.style24.front.biz.service.TsfCartService;
|
|
import com.style24.front.biz.service.TsfCartService;
|
|
|
import com.style24.front.biz.service.TsfCouponService;
|
|
import com.style24.front.biz.service.TsfCouponService;
|
|
|
import com.style24.front.biz.service.TsfOrderService;
|
|
import com.style24.front.biz.service.TsfOrderService;
|
|
@@ -36,12 +30,8 @@ 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.Cart;
|
|
import com.style24.persistence.domain.Cart;
|
|
|
import com.style24.persistence.domain.Coupon;
|
|
import com.style24.persistence.domain.Coupon;
|
|
|
-import com.style24.persistence.domain.GiftCard;
|
|
|
|
|
-import com.style24.persistence.domain.Goods;
|
|
|
|
|
import com.style24.persistence.domain.Login;
|
|
import com.style24.persistence.domain.Login;
|
|
|
import com.style24.persistence.domain.Order;
|
|
import com.style24.persistence.domain.Order;
|
|
|
-import com.style24.persistence.domain.Payment;
|
|
|
|
|
-import com.style24.persistence.domain.WishList;
|
|
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
@@ -158,6 +148,48 @@ public class TsfCartController extends TsfBaseController {
|
|
|
model.addAttribute("order", order);
|
|
model.addAttribute("order", order);
|
|
|
model.addAttribute("IMG_PATH", env.getProperty("upload.goods.view"));
|
|
model.addAttribute("IMG_PATH", env.getProperty("upload.goods.view"));
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ Order temp = new Order();
|
|
|
|
|
+ String[] goodsNameArr = new String[3]; //상품명
|
|
|
|
|
+ String[] goodsPriceArr = new String[3]; //가격
|
|
|
|
|
+ String[] goodsQuantityArr = new String[3]; //상품수량
|
|
|
|
|
+
|
|
|
|
|
+ // goodsCount 수량에 맞춰 아래 필드 작성
|
|
|
|
|
+ goodsNameArr[0] = "테스트아이템1";
|
|
|
|
|
+ goodsNameArr[1] = "테스트아이템2";
|
|
|
|
|
+ goodsNameArr[2] = "테스트아이템3";
|
|
|
|
|
+
|
|
|
|
|
+ goodsPriceArr[0] = "100";
|
|
|
|
|
+ goodsPriceArr[1] = "500";
|
|
|
|
|
+ goodsPriceArr[2] = "300";
|
|
|
|
|
+
|
|
|
|
|
+ goodsQuantityArr[0] = "1";
|
|
|
|
|
+ goodsQuantityArr[1] = "2";
|
|
|
|
|
+ goodsQuantityArr[2] = "3";
|
|
|
|
|
+
|
|
|
|
|
+ temp.setItemNmArr(goodsNameArr); // 상품명 배열
|
|
|
|
|
+ temp.setGoodsPriceArr(goodsPriceArr); // 상품별 가격 배열
|
|
|
|
|
+ temp.setItemQtyArr(goodsQuantityArr); // 상품별 수량 배열
|
|
|
|
|
+ temp.setCustId("xodud1202"); // 고객 ID
|
|
|
|
|
+ temp.setOrdNo(1); // 주문번호
|
|
|
|
|
+ temp.setRealOrdAmt(32000); // 결제금액
|
|
|
|
|
+ temp.setBirthYmd("198912021"); // 생년월일 + 성별(남자 : 1, 여자 : 2)
|
|
|
|
|
+ temp.setPayMeans(TscConstants.PayMeans.ACCOUNT_TRANSFER.value()); // 무통장입금 or 계좌이체
|
|
|
|
|
+ temp.setBankCd("BK88"); // 은행코드 (BK + 은행코드)
|
|
|
|
|
+
|
|
|
|
|
+ /* 무통장입금 : 가상계좌번호, 계좌이체 : pgTid */
|
|
|
|
|
+ temp.setPgTid("20210423952698"); // temp.setAccountNo("110242212990");
|
|
|
|
|
+ temp.setOrdNm("이태영"); // 주문자명
|
|
|
|
|
+ temp.setOrdTelno(""); // 주문자전화1 ("-" 포함)
|
|
|
|
|
+ temp.setOrdPhnno("010-7111-4489"); // 주문자전화2 ("-" 포함)
|
|
|
|
|
+ temp.setRecipZipcode("08755"); // 주문자우편번호
|
|
|
|
|
+ temp.setRecipAddr("서울시 관악구 신림동 1414-26 해피타워 501호"); // 주문자주소
|
|
|
|
|
+ temp.setOrdEmail("xodud1202@naver.com"); // 주문자이메일
|
|
|
|
|
+ temp.setRecipNm("이태영"); // 수령인명
|
|
|
|
|
+ temp.setRecipTelno(""); // 수령인전화번호
|
|
|
|
|
+ temp.setRecipPhnno("010-7111-4489"); // 수령인휴대폰번호
|
|
|
|
|
+ orderService.uSafeGuaranteeInsurance(temp);
|
|
|
|
|
+
|
|
|
return super.getDeviceViewName("cart/CartListAjaxForm");
|
|
return super.getDeviceViewName("cart/CartListAjaxForm");
|
|
|
}
|
|
}
|
|
|
|
|
|