package com.jeeplus.business.payment.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.business.borrow.service.dto.BorrowDTO;
import com.jeeplus.business.payment.domain.Payment;
import com.jeeplus.business.payment.service.dto.PaymentDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface PaymentMapper extends BaseMapper<Payment> {

    IPage<PaymentDTO> findPageList(@Param(Constants.WRAPPER) QueryWrapper<PaymentDTO> queryWrapper, Page<PaymentDTO> page);
    @InterceptorIgnore(tenantLine = "true")
    PaymentDTO findById(@Param("id") String id);

    void updateStatusById(@Param("id") String id, @Param("status") String status);
    @InterceptorIgnore(tenantLine = "true")
    void updateInfoById(@Param("payment") Payment payment);
    @InterceptorIgnore(tenantLine = "true")
    IPage<Payment> listByUserId(@Param(Constants.WRAPPER)QueryWrapper<Payment> queryWrapper, Page<BorrowDTO> page);
}
