/*
 * Copyright (c) 2018-2999 广州亚米信息科技有限公司 All rights reserved.
 *
 * https://www.gz-yami.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.yami.shop.distribution.comment.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.distribution.comment.dto.DistributionUserWalletDto;
import com.yami.shop.distribution.comment.model.DistributionUserWallet;
import org.apache.ibatis.annotations.Param;

/**
 *
 * @author lgh on 2019/04/01.
 */
public interface DistributionUserWalletService extends IService<DistributionUserWallet> {
    /**
     * 根据分销员id获取可提现金额
     * @param distributionUserId
     * @return
     */
    Double getSettledAmountByDistributionUserId(Long distributionUserId);

    /**
     * 根据分销员id获取钱包id
     * @param distributionUserId 钱包id
     * @return
     */
    Long getWalletIdByDistributionUserId(@Param("distributionUserId")Long distributionUserId);

    /**
     *  返回钱包对象和用户vo分页
     * @param page
     * @param userMobile
     * @return
     */
    Page<DistributionUserWallet> getDistributionUserWalletAndDistributionUserVOPage(Page page, @Param("userMobile")String userMobile);

    /**
     * 人工修改钱包 并且添加一条钱包流水记录
     */
    void updateDistributionUserWallet(DistributionUserWallet distributionUserWallet,Long modifier);


    DistributionUserWalletDto getDistributionUserWalletDtoByDistributionUserId(Long distributionUserId);

}
