|
|
@@ -72,6 +72,7 @@ public class TsfCartService {
|
|
|
public GagaMap saveCartInfo(Collection<Cart> params) {
|
|
|
GagaMap result = new GagaMap();
|
|
|
List<Integer> cartSqList = new ArrayList<>();
|
|
|
+ String newCustCanYn = "Y";
|
|
|
|
|
|
// 로그인 유무 확인 (로그인이 되어 있지 않으면 regNo 를 0으로 장바구니에 저장한다.)
|
|
|
Login login = new Login();
|
|
|
@@ -114,6 +115,17 @@ public class TsfCartService {
|
|
|
|
|
|
goods = goodsService.getGoodsInfo(goods);
|
|
|
|
|
|
+ // 신규 고객 주문 가능 상품 체크
|
|
|
+ if("Y".equals(goods.getNewCustOrdYn())) {
|
|
|
+ Goods tmp = new Goods();
|
|
|
+ tmp.setCustNo(login.getCustNo());
|
|
|
+ tmp.setGoodsCd(param.getGoodsCd());
|
|
|
+ tmp = goodsDao.getNewCustOrdCanYnInfo(tmp);
|
|
|
+ if("N".equals(tmp.getNewCustCanYn())) {
|
|
|
+ newCustCanYn = "N";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (goods == null) {
|
|
|
result.put("message", "상품 정보가 존재하지 않습니다.");
|
|
|
return result;
|
|
|
@@ -199,6 +211,17 @@ public class TsfCartService {
|
|
|
|
|
|
goods = goodsService.getGoodsInfo(goods);
|
|
|
|
|
|
+ // 신규 고객 주문 가능 상품 체크
|
|
|
+ if("Y".equals(goods.getNewCustOrdYn())) {
|
|
|
+ Goods tmp = new Goods();
|
|
|
+ tmp.setCustNo(login.getCustNo());
|
|
|
+ tmp.setGoodsCd(param.getGoodsCd());
|
|
|
+ tmp = goodsDao.getNewCustOrdCanYnInfo(tmp);
|
|
|
+ if("N".equals(tmp.getNewCustCanYn())) {
|
|
|
+ newCustCanYn = "N";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (goods == null) {
|
|
|
result.put("message", "상품 정보가 존재하지 않습니다.");
|
|
|
return result;
|
|
|
@@ -274,6 +297,7 @@ public class TsfCartService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ result.put("newCustCanYn", newCustCanYn);
|
|
|
result.put("cartSqList", cartSqList);
|
|
|
result.put("goodsType", goodsType);
|
|
|
result.put("cartGb", cartGb);
|