package com.bonus.canteen.core.account.service;

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

import com.bonus.canteen.core.account.constants.AccTradeTypeEnum;
import com.bonus.canteen.core.account.constants.AccWalletIdEnum;
import com.bonus.canteen.core.account.domain.AccWalletInfo;
import com.bonus.canteen.core.account.domain.WalletUpdateDTO;
import com.bonus.canteen.core.account.domain.bo.WalletBalanceOperation;
import com.bonus.canteen.core.account.domain.vo.AccWalletInfoVO;
import com.bonus.canteen.core.pay.constants.PayChannelEnum;
import com.bonus.canteen.core.pay.constants.PayTypeEnum;
import org.apache.ibatis.annotations.Param;

/**
 * 钱包详情信息Service接口
 * 
 * @author xsheng
 * @date 2025-04-05
 */
public interface IAccWalletInfoService {
    /**
     * 查询钱包详情信息
     * 
     * @param userId 钱包详情信息主键
     * @return 钱包详情信息
     */
    public List<AccWalletInfo> selectAccWalletInfoByUserId(Long userId);
    public AccWalletInfo selectAccWalletInfoByUserIdAndWalletId(Long userId, Integer walletId);

    /**
     * 查询钱包详情信息列表
     * 
     * @param accWalletInfo 钱包详情信息
     * @return 钱包详情信息集合
     */
    public List<AccWalletInfo> selectAccWalletInfoList(AccWalletInfo accWalletInfo);

    /**
     * 新增钱包详情信息
     * 
     * @param accWalletInfo 钱包详情信息
     * @return 结果
     */
    public int insertAccWalletInfo(AccWalletInfo accWalletInfo);

    public int batchInsertAccWalletInfo(List<AccWalletInfo> accWalletInfos);

    /**
     * 批量删除钱包详情信息
     * 
     * @param userIds 需要删除的钱包详情信息主键集合
     * @return 结果
     */
    public int deleteAccWalletInfoByUserIds(Long[] userIds);

    /**
     * 删除钱包详情信息信息
     * 
     * @param userId 钱包详情信息主键
     * @return 结果
     */
    public int deleteAccWalletInfoByUserId(Long userId);

    Map<Long, List<AccWalletInfoVO>> selectAccWalletInfoByUserIds(List<Long> userIds);

    void updateMinBalance(List<Long> userIds, Integer walletId, BigDecimal minBalance);

    void addAccWalletBalance(WalletUpdateDTO walletUpdateDTO);

    void clearAccWalletBalance(WalletUpdateDTO walletUpdateDTO);
}
