| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- package com.style24.front.biz.service;
- import java.text.DateFormat;
- import java.text.SimpleDateFormat;
- import java.util.ArrayList;
- import java.util.Calendar;
- import java.util.Collection;
- import java.util.Date;
- import java.util.List;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import com.gagaframework.web.parameter.GagaMap;
- import com.style24.core.support.env.TscConstants;
- import com.style24.front.biz.dao.TsfOrderChangeDao;
- import com.style24.front.biz.dao.TsfOrderDao;
- import com.style24.persistence.domain.GiftCard;
- import com.style24.persistence.domain.Order;
- import com.style24.persistence.domain.Point;
- import lombok.extern.slf4j.Slf4j;
- /**
- * 주문 변경 Service
- *
- * @author card007
- * @since 2021. 02. 26
- */
- @Service
- @Slf4j
- public class TsfOrderChangeService {
- @Autowired
- private TsfOrderChangeDao orderChangeDao;
- /**
- * 마이페이지 취소/반품 목록 조회
- *
- * @param Order
- * @return Collection<Order>
- * @author card007
- * @since 2021. 02. 26
- */
- public GagaMap getCancelListForMypage(Order order) {
- GagaMap map = new GagaMap();
- Boolean shotDelv = false;
- Boolean selfMall = false;
- Boolean supplyMall = false;
-
- Collection<Order> result = orderChangeDao.getCancelListForMypage(order);
- for (Order tmpOrder : result) {
- // 총알배송 아이콘 설정
- if (!shotDelv && "Y".equals(tmpOrder.getShotDelvYn())) {
- shotDelv = true;
- }
- // STYLE24 일반배송 아이콘 설정
- if (!selfMall && "Y".equals(tmpOrder.getSelfGoodsYn())) {
- selfMall = true;
- }
- // 업체직배송 아이콘 설정
- if (!supplyMall && "N".equals(tmpOrder.getSelfGoodsYn())) {
- supplyMall = true;
- }
- }
-
- map.set("shotDelv", shotDelv);
- map.set("selfMall", selfMall);
- map.set("supplyMall", supplyMall);
- map.set("oneData", result.iterator().next());
- map.set("returnList", result);
- return map;
- }
- /**
- * 사용 상품권 정보 조회
- *
- * @param Order
- * @return Collection<GiftCard>
- * @author card007
- * @since 2021. 03. 02
- */
- public Collection<GiftCard> getUsedGiftcardInfo(Order order) {
- return orderChangeDao.getUsedGiftcardInfo(order);
- }
- /**
- * 사용 포인트 정보 조회
- *
- * @param Order
- * @return Collection<Point>
- * @author card007
- * @since 2021. 03. 02
- */
- public Collection<Point> getUsedPointInfo(Order order) {
- return orderChangeDao.getUsedPointInfo(order);
- }
- }
|