package com.haha.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.haha.entity.DistributorConfig;
import com.haha.entity.dto.DistributorConfigDTO;

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

public interface DistributorConfigService extends IService<DistributorConfig> {

    String getConfigValue(String key);

    String getConfigValue(String key, String defaultValue);

    BigDecimal getFixedCommissionAmount();

    BigDecimal getFirstOrderCommissionRate();

    String getValidUserRule();

    BigDecimal getMinValidOrderAmount();

    Integer getValidTimeWindowDays();

    BigDecimal getMinWithdrawalAmount();

    List<DistributorConfig> getAllConfigs();

    DistributorConfig updateConfig(DistributorConfigDTO dto);
}
