package com.jxy.order.mapper;

import com.jxy.common.datasource.annotation.Master;
import com.jxy.order.dto.WithdrawDetailDto;
import com.jxy.order.dto.WithdrawDto;
import com.jxy.order.dto.WithdrawPraviteDto;
import com.jxy.order.vo.WithdrawApplyVo;
import com.jxy.order.vo.WithdrawHandleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description TODO
 * @Date 2023/5/31 15:27
 * @Author 杜懿
 */
@Master
public interface WithdrawMapper {

    public boolean insertWithdraw(@Param("vo") WithdrawApplyVo vo);

    public List<WithdrawPraviteDto> getWithdrawByUserId(@Param("userId") Long userId,@Param("status") Integer status);

    public WithdrawDetailDto getWithdrawDetailById(@Param("id") Long id);

    public List<WithdrawDto> getWithdrawByStatus(@Param("status") int status,@Param("email") String email);

    public boolean updateWithdraw(@Param("vo") WithdrawHandleVo vo);

    /**
     *获取超时未处理的提现订单列表
     * @param date
     */
    public List<WithdrawPraviteDto> getExpireNoHandleWithdrawOrder(@Param("date") String date);

    /**
     *批量修改超时未处理的充值订单状态  修改为fail(status=0)
     * @param list
     * @return
     */
    public int batchUpdateExpireWithdraw(List<WithdrawPraviteDto> list);

    ///**
    // *批量修改超时未处理的充值订单状态  修改为fail(status=0)
    // * @param list
    // * @return
    // */
    //public int batchUpdateExpireWithdraw(List<Long> list);
}
