package com.kxs.user.biz.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kxs.common.core.util.R;
import com.kxs.user.api.model.KxsTotalDebt;
import com.kxs.user.api.vo.admin.totalDebt.TotalDebtListVO;
import com.kxs.user.api.vo.kxsapp.totalDebt.TotalDebtDetailVO;

/**
 * 用户总欠款表(KxsTotalDebt)表服务接口
 *
 * @author 系统
 * @since 2024-03-22 11:05:40
 */
public interface KxsTotalDebtService extends IService<KxsTotalDebt> {

    /**
     * 添加数据
     *
     * @param param 参数
     * @return {@link R}
     */
    R addData(KxsTotalDebt param);

    /**
     * app查询总欠款
     *
     * @return {@link TotalDebtDetailVO}
     */
    TotalDebtDetailVO detail();

    /**
     * 扣除合伙人可提现额度
     *
     * @param kxsTotalDebt KXS总债务
     */
    void deductPartnerAmount(KxsTotalDebt kxsTotalDebt);

    /**
     * 扣除盟主可提现额度
     *
     * @param kxsTotalDebt KXS总债务
     */
    void deductLeaderAmount(KxsTotalDebt kxsTotalDebt);

    /**
     * 分页
     *
     * @param page  页
     * @param param 参数
     * @return {@link IPage}<{@link TotalDebtListVO}>
     */
    IPage<TotalDebtListVO> getByPage(Page<KxsTotalDebt> page, String param);
}

