package com.style24.front.biz.service;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.style24.front.biz.dao.TsfPointDao;
import com.style24.persistence.domain.GiftCard;
import com.style24.persistence.domain.Point;

import lombok.extern.slf4j.Slf4j;

/**
 * 포인트 Service
 *
 * @author gagamel
 * @since 2020. 12. 29
 */
@Service
@Slf4j
public class TsfPointService {

	@Autowired
	private TsfPointDao pointDao;

	/**
	 * 사용가능 포인트조회
	 *
	 * @param point
	 * @return int - 사용가능포인트
	 * @author csh9191
	 * @since 2021. 02. 25
	 */
	public int getUsablePointInfo(Point point) {
		return pointDao.getUsablePointInfo(point);
	}

	/**
	 * 적립예정 포인트조회
	 *
	 * @param point
	 * @return int - 적립예정 포인트
	 * @author csh9191
	 * @since 2021. 02. 25
	 */
	public int getExpectedPointInfo(Point point) {
		return pointDao.getExpectedPointInfo(point);
	}

	/**
	 * 30일이내 소멸예정 포인트조회
	 *
	 * @param point
	 * @return int - 30일 이내 소멸예정포인트
	 * @author csh9191
	 * @since 2021. 02. 25
	 */
	public int getExtinctPointInfo(Point point) {
		return pointDao.getExtinctPointInfo(point);
	}
	
	/**
	 * 마이페이지 STYLE24 포인트 전체
	 *
	 * @param point
	 * @return Collection<Point>
	 * @author csh9191
	 * @since 2021. 03. 03
	 */	
	public Collection<Point> getAllPointList(Point point) {
		return pointDao.getAllPointList(point);
	}

	/**
	 * 마이페이지 STYLE24 포인트 적립
	 *
	 * @param point
	 * @return Collection<Point>
	 * @author csh9191
	 * @since 2021. 03. 03
	 */
	public Collection<Point> getAccumulatePointList(Point point) {
		return pointDao.getAccumulatePointList(point);
	}

	/**
	 * 마이페이지 STYLE24 포인트 사용내역
	 *
	 * @param point
	 * @return Collection<Point>
	 * @author csh9191
	 * @since 2021. 03. 03
	 */
	public Collection<Point> getUsePointList(Point point) {
		return pointDao.getUsePointList(point);
	}


	/**
	 * 마이페이지 STYLE24 포인트 사용내역
	 *
	 * @param point - 고객번호
	 * @return Point
	 * @author jsshin
	 * @since 2021. 03. 23
	 */
	public Point getCustomerPoint(Point point) {
		return pointDao.getCustomerPoint(point);
	}

	/**
	 * 포인트 최근 12개월 년 월
	 *
	 * @param GiftCard
	 * @author sowon
	 * @since 2021. 3. 30
	 */
	 public Collection<Point> getRecentlyDate(){
		 return pointDao.getRecentlyDate();
	 }

}
