package cn.iocoder.yudao.module.jx.payment.mapper;

import cn.iocoder.yudao.module.jx.payment.entity.DriveSchoolPay;
import cn.iocoder.yudao.module.jx.vo.DriveSchoolPayVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 订单Mapper接口
 *
 * @author ruoyi
 * @date 2024-04-24
 */
@Mapper
public interface DriveSchoolPayMapper
{
    /**
     * 查询订单
     *
     * @param id 订单主键
     * @return 订单
     */
    public DriveSchoolPay selectDriveSchoolPayById(Long id);

    /**
     * 查询订单列表
     *
     * @param driveSchoolPay 订单
     * @return 订单集合
     */
    public IPage<DriveSchoolPay> selectDriveSchoolPayList(@Param("entity") DriveSchoolPay driveSchoolPay, Page<DriveSchoolPay> page);
    public IPage<DriveSchoolPay> stuList(@Param("entity") DriveSchoolPay driveSchoolPay,Page<DriveSchoolPay> page);
    public IPage<DriveSchoolPay> stuOneList(@Param("entity") DriveSchoolPay driveSchoolPay,Page<DriveSchoolPay> page);
    public IPage<DriveSchoolPay> stuTwoList(@Param("entity")DriveSchoolPay driveSchoolPay,Page<DriveSchoolPay> page);

    /**
     * 新增订单
     *
     * @param driveSchoolPay 订单
     * @return 结果
     */
    public int insertDriveSchoolPay(DriveSchoolPay driveSchoolPay);

    /**
     * 修改订单
     *
     * @param driveSchoolPay 订单
     * @return 结果
     */
    public int updateDriveSchoolPay(DriveSchoolPay driveSchoolPay);

    /**
     * 删除订单
     *
     * @param id 订单主键
     * @return 结果
     */
    public int deleteDriveSchoolPayById(Long id);

    /**
     * 批量删除订单
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDriveSchoolPayByIds(Long[] ids);

    void updatePayById(@Param("id") Integer id, @Param("name") String name, @Param("jlId") Integer jlId);

    IPage<DriveSchoolPay> getReportCourseList(@Param("entity") DriveSchoolPay driveSchoolPay,Page<DriveSchoolPay> page);

    IPage<DriveSchoolPay>  getUserList(@Param("entity") DriveSchoolPay driveSchoolPay,Page<DriveSchoolPay> page);

    List<DriveSchoolPay> getInfoByUserId(Long userId);
    List<DriveSchoolPay> getInfoByUserIndenty(String userId);

    DriveSchoolPay getDeductByUserInfo(DriveSchoolPay driveSchoolPay);

    Integer selectByCoachId(Long userId);

    DriveSchoolPay selectByUserId(Long userId);

    DriveSchoolPay selectByPhone(String phone);

    double getAllMoney();
}
