package com.ai.da.service;

import com.ai.da.common.response.PageBaseResponse;
import com.ai.da.mapper.primary.entity.Affiliate;
import com.ai.da.model.dto.AffiliateQueryDTO;
import com.ai.da.model.vo.AffiliateInvitationDetailsVO;
import com.ai.da.model.vo.AffiliateVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface AffiliateService extends IService<Affiliate> {

    Boolean registerAsAnAffiliate(String promotionMethod);

    PageBaseResponse<AffiliateVO> getAffiliateList(AffiliateQueryDTO affiliateQueryDTO);

    AffiliateVO personalAffiliateCenter();

    BigDecimal[] getPersonalMonthlyIncome(int year);

    Boolean applicationApproval(Long id, Boolean isApproved, Float commission);

    void editAffiliate(Long id, Float commission, String operationType);

    void updateAffiliateInfoWithPayment();

    Boolean affiliateLinkViewsIncrease(Long id);

    void syncLinkViewCountToDB();

    IPage<AffiliateInvitationDetailsVO> getEachAffiliateGeneratedRevenue(AffiliateQueryDTO affiliateQueryDTO);

    Affiliate getByAccountId(Long accountId);

    void commissionCalculation(Integer year, Integer month);

    void calcCouponsCommission();

    List<Map<String, Object>> getAllAffiliateUsername();
}
