|
@@ -16,18 +16,16 @@ import com.gagaframework.web.parameter.GagaMap;
|
|
|
import com.style24.core.biz.dao.TscEnvsetDao;
|
|
import com.style24.core.biz.dao.TscEnvsetDao;
|
|
|
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.annotation.ShopDs;
|
|
|
|
|
import com.style24.core.support.env.TscConstants;
|
|
import com.style24.core.support.env.TscConstants;
|
|
|
import com.style24.core.support.session.TscSession;
|
|
import com.style24.core.support.session.TscSession;
|
|
|
import com.style24.front.biz.dao.TsfCartDao;
|
|
import com.style24.front.biz.dao.TsfCartDao;
|
|
|
|
|
+import com.style24.front.biz.dao.TsfGoodsDao;
|
|
|
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.Envset;
|
|
|
|
|
import com.style24.persistence.domain.Goods;
|
|
import com.style24.persistence.domain.Goods;
|
|
|
import com.style24.persistence.domain.GoodsStock;
|
|
import com.style24.persistence.domain.GoodsStock;
|
|
|
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 lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
@@ -44,6 +42,9 @@ public class TsfCartService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TsfCartDao cartDao;
|
|
private TsfCartDao cartDao;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TsfGoodsDao goodsDao;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TsfGoodsService goodsService;
|
|
private TsfGoodsService goodsService;
|
|
|
|
|
|
|
@@ -799,9 +800,9 @@ public class TsfCartService {
|
|
|
if(lastCompCheck != null) {
|
|
if(lastCompCheck != null) {
|
|
|
// 한 업체의 마지막 상품 체크
|
|
// 한 업체의 마지막 상품 체크
|
|
|
lastCompCheck.setAddDelvFeeYn("Y");
|
|
lastCompCheck.setAddDelvFeeYn("Y");
|
|
|
-
|
|
|
|
|
// 배송 상품 존재 여부
|
|
// 배송 상품 존재 여부
|
|
|
lastCompCheck.setDelvYn(delvYn);
|
|
lastCompCheck.setDelvYn(delvYn);
|
|
|
|
|
+ // 배송상품 금액차이
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -818,6 +819,8 @@ public class TsfCartService {
|
|
|
} else if (TscConstants.DelvFeeCrite.NORMAL.value().equals(delv.getDelvFeeCrite()) && delv.getCompSumPrice() > delv.getMinOrdAmt()) {
|
|
} else if (TscConstants.DelvFeeCrite.NORMAL.value().equals(delv.getDelvFeeCrite()) && delv.getCompSumPrice() > delv.getMinOrdAmt()) {
|
|
|
param.setDelvFee(0);
|
|
param.setDelvFee(0);
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ param.setCompSumPrice(delv.getCompSumPrice());
|
|
|
|
|
+ param.setMinOrdAmt(delv.getMinOrdAmt());
|
|
|
param.setDelvFee(delv.getDelvFee());
|
|
param.setDelvFee(delv.getDelvFee());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -839,6 +842,8 @@ public class TsfCartService {
|
|
|
order.setWmsDelvFee(0);
|
|
order.setWmsDelvFee(0);
|
|
|
} else {
|
|
} else {
|
|
|
order.setWmsDelvFee(wmsDelvFee);
|
|
order.setWmsDelvFee(wmsDelvFee);
|
|
|
|
|
+ order.setCompSumPrice(wmsSumPrice);
|
|
|
|
|
+ order.setMinOrdAmt(wmsMinOrdAmt);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 배송 상품 존재 여부
|
|
// 배송 상품 존재 여부
|
|
@@ -932,6 +937,29 @@ public class TsfCartService {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public Collection<Goods> getDelvFeeSaveGoodsList(Order param) {
|
|
|
|
|
+ Goods goods = new Goods();
|
|
|
|
|
+ if(StringUtils.isEmpty(param.getDelvFeeCd())) {
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if("WMS".equals(param.getDelvFeeCd())) {
|
|
|
|
|
+ goods.setSelfGoodsYn("Y");
|
|
|
|
|
+ } else {
|
|
|
|
|
+ goods.setDelvFeeCd(param.getDelvFeeCd());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ goods.setPrice(param.getDelvFeeSaveGoodsAmt());
|
|
|
|
|
+
|
|
|
|
|
+ if(TsfSession.isLogin()) {
|
|
|
|
|
+ goods.setCustNo(TsfSession.getInfo().getCustNo());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ goods.setCustNo(0);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return goodsDao.getDelvFeeSaveGoodsList(goods);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public Cart getCartGoodsInfo(Cart param) {
|
|
public Cart getCartGoodsInfo(Cart param) {
|
|
|
// Collection<Cart> result = new ArrayList<Cart>();
|
|
// Collection<Cart> result = new ArrayList<Cart>();
|
|
|
/* cart.add(cartDao.selectCartGoodsInfo(param)); */
|
|
/* cart.add(cartDao.selectCartGoodsInfo(param)); */
|