package com.ssm.manage.service;

import com.github.pagehelper.PageInfo;
import com.ssm.core.service.BaseService;
import com.ssm.manage.entity.BaseGrouponCard;
import com.ssm.manage.entity.RechargeList;
import com.ssm.manage.entity.SmsException;
import com.ssm.manage.extendEntity.StoreDaily;
import com.ssm.manage.query.RechargeListRequest;
import com.ssm.manage.query.StoreDailyRequest;
import com.ssm.manage.response.BaseGrouponCardResponse;
import com.ssm.manage.response.RechargeListResponse;
import com.ssm.manage.response.RechargeVo;

import java.text.ParseException;
import java.util.Date;
import java.util.List;

public interface SsmRechargeService extends BaseService<RechargeList> {
    PageInfo<RechargeListResponse> selectPage(RechargeListRequest rechargeListRequest) throws ParseException, SmsException;
    PageInfo<RechargeListResponse> tstPage(RechargeListRequest rechargeListRequest) throws ParseException, SmsException;
    PageInfo<RechargeListResponse> selectPageNew(RechargeListRequest rechargeListRequest) throws ParseException, SmsException;
    PageInfo<RechargeListResponse> pageDetail(RechargeListRequest rechargeListRequest) throws ParseException, SmsException;
    PageInfo<RechargeList> page(RechargeListRequest rechargeListRequest) throws SmsException, ParseException;
    void createTable();
    void createTable1();

    int addRecharge(RechargeListRequest rechargeListRequest) throws SmsException;
    int addPromotionRecharge(RechargeListRequest rechargeListRequest) throws SmsException;
    int addRecharges(RechargeListRequest rechargeListRequest) throws SmsException;

    int cancel(RechargeListRequest rechargeListRequest) throws SmsException;
    int cancelPromotionCourse(RechargeListRequest rechargeListRequest) throws SmsException;

    int updateStaff(RechargeListRequest rechargeListRequest) throws SmsException;

    List<RechargeListResponse> selectList(Long storeId, String dateStr, Date date) throws ParseException, SmsException;
    List<RechargeListResponse> selectListchia(Long storeId,  Date date) throws ParseException, SmsException;
    List<RechargeListResponse> selectListAbnormal(Long storeId, String dateStr, Date date) throws ParseException, SmsException;
    List<RechargeListResponse> selectLists(Long storeId, String startDate, String endDate, Date date) throws ParseException, SmsException;

    StoreDaily selectDayRecord(StoreDailyRequest storeDailyRequest);
    StoreDaily NegativeKazin(StoreDailyRequest storeDailyRequest);
    StoreDaily NegativeKazinByDate(StoreDailyRequest storeDailyRequest);

    List<RechargeList> selectListSalem(RechargeList rechargeList);

    int updateRatio(RechargeList rechargeList);

    //团购卡次数和金额
    StoreDaily grouponTuan(StoreDailyRequest dailyRequest);
    StoreDaily grouponTuanNew(StoreDailyRequest dailyRequest);

    //团购卡次数和金额
    List<BaseGrouponCardResponse> grouponTuan1(StoreDailyRequest dailyRequest);

    RechargeList selectAchiEntities(RechargeList rechargeList);

    List<RechargeVo> selectByDay(StoreDailyRequest storeDailyRequest);

    List<StoreDaily> selectByDayGroupByDateAndStoreId(StoreDailyRequest storeDailyRequest);

    List<RechargeList> selectList(RechargeListRequest rechargeListRequest);

    PageInfo<RechargeListResponse> rechargeGifList(RechargeListRequest rechargeListRequest) throws ParseException;
}
