package com.kexue.skills.service;

import com.github.pagehelper.PageInfo;
import com.kexue.skills.entity.ExchangeCode;
import com.kexue.skills.entity.dto.ExchangeCodeQueryDto;
import com.kexue.skills.entity.dto.ExchangeRequestDto;
import org.springframework.web.multipart.MultipartFile;

import jakarta.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * (ExchangeCode)表服务接口
 */
public interface ExchangeCodeService {

    PageInfo<ExchangeCode> getPageList(ExchangeCodeQueryDto queryDto);

    List<ExchangeCode> getList(ExchangeCodeQueryDto queryDto);

    ExchangeCode queryById(Long id);

    ExchangeCode queryByCode(String code);

    ExchangeCode insert(ExchangeCode exchangeCode);

    ExchangeCode update(ExchangeCode exchangeCode);

    int deleteById(Long id);

    int logicDeleteById(Long id, String updateBy);

    Map<String, Object> exchange(ExchangeRequestDto requestDto);

    Map<String, Object> importExcel(MultipartFile file);

    void exportExcel(ExchangeCodeQueryDto queryDto, HttpServletResponse response) throws Exception;

    Map<String, Integer> getStatistics();

    int countAvailableByPrice(BigDecimal packagePrice);
}