|
@@ -1,18 +1,23 @@
|
|
|
package com.style24.scm.biz.service;
|
|
package com.style24.scm.biz.service;
|
|
|
|
|
|
|
|
|
|
+import java.util.Collection;
|
|
|
|
|
+
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
+import com.style24.core.biz.dao.TscOrderDao;
|
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
import com.style24.core.support.message.TscMessageByLocale;
|
|
|
import com.style24.scm.biz.dao.TssDeliveryDao;
|
|
import com.style24.scm.biz.dao.TssDeliveryDao;
|
|
|
-
|
|
|
|
|
|
|
+import com.style24.persistence.domain.Order;
|
|
|
|
|
+import com.style24.persistence.domain.SweetTracker;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 배송 Service
|
|
* 배송 Service
|
|
|
*
|
|
*
|
|
|
- * @author gagamel
|
|
|
|
|
- * @since 2020. 10. 19
|
|
|
|
|
|
|
+ * @author moon
|
|
|
|
|
+ * @since 2021. 04. 13
|
|
|
*/
|
|
*/
|
|
|
@Service
|
|
@Service
|
|
|
@Slf4j
|
|
@Slf4j
|
|
@@ -24,4 +29,40 @@ public class TssDeliveryService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private TssDeliveryDao deliveryDao;
|
|
private TssDeliveryDao deliveryDao;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private TscOrderDao orderDao;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 스윗트래커 배송상태 등록 및 주문상세상태 변경
|
|
|
|
|
+ * @param SweetTracker
|
|
|
|
|
+ * @return
|
|
|
|
|
+ * @author moon
|
|
|
|
|
+ * @since 2020. 12. 08
|
|
|
|
|
+ */
|
|
|
|
|
+ @Transactional("shopTxnManager")
|
|
|
|
|
+ public void saveDelvStat(SweetTracker sweetTracker) {
|
|
|
|
|
+
|
|
|
|
|
+ if(6 == sweetTracker.getLevel()) {
|
|
|
|
|
+ // 주문상세번호 조회
|
|
|
|
|
+ Collection<SweetTracker> list = deliveryDao.getOrdDtlNoList(sweetTracker);
|
|
|
|
|
+ for(SweetTracker data : list) {
|
|
|
|
|
+ // 주문상태값 변경
|
|
|
|
|
+ deliveryDao.updateTbOrderDtlStat(data);
|
|
|
|
|
+ // 주문상세이력
|
|
|
|
|
+ Order order = new Order();
|
|
|
|
|
+ order.setOrdDtlNo(data.getOrdDtlNo());
|
|
|
|
|
+ order.setUpdNo(0);
|
|
|
|
|
+ order.setRegNo(0);
|
|
|
|
|
+ orderDao.createOrderDetailHst(order);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ // TB_SWEET_TRACKER 등록
|
|
|
|
|
+ sweetTracker.setDelvLevel(sweetTracker.getLevel());
|
|
|
|
|
+ sweetTracker.setDelvWhere(sweetTracker.getWhere());
|
|
|
|
|
+ deliveryDao.insertTbSweetTracker(sweetTracker);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|