package com.dayou.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dayou.entity.Personal;
import com.dayou.dao.CustomBaseMapper;
import com.dayou.vo.PersonalVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 个贷业务订单 Mapper 接口
 * </p>
 *
 * @author wucl
 * @since 2024-03-01
 */
public interface PersonalMapper extends CustomBaseMapper<Personal> {

    Page<PersonalVO> xSelectPage(Page page, @Param("personal") PersonalVO personal,@Param("keyword") String keyword);

    /**
     * 条件查询个贷已终止流程
     * @param page 分页
     * @param personal 查询条件
     * @param keyword 关键字
     * @return Page<PersonalVO>
     */
    Page<PersonalVO> getTerminatedPage(Page page, @Param("personal") PersonalVO personal, @Param("keyword") String keyword, @Param("currentUserId") Long currentUserId);

    PersonalVO getDetail(@Param("id") Long id);

    Personal getByTargetId(@Param("targetId") Long targetId);

    Page<PersonalVO> waitingSaveFile(Page page, @Param("personal")PersonalVO personal ,@Param("keyword") String keyword);

    void updateSaveFileInfo(@Param("list") List<Long> personalIds);

    Page<PersonalVO> saveFileDone(Page page, @Param("personal")PersonalVO personal ,@Param("keyword") String keyword);

    Page<PersonalVO> myOrder(Page page, @Param("personal")PersonalVO personal ,@Param("keyword") String keyword);

    List<PersonalVO> exportMyOrder(@Param("personal")PersonalVO personal ,@Param("keyword") String keyword);

    Page<PersonalVO> waitingAllotOrderPage(Page page,@Param("keyword") String keyword);

    void batchUpdateOutWardStaffId(@Param("userId") Long userId, @Param("priceStaffId") Long priceStaffId,@Param("list") List<Long> orderIds);

    Page<PersonalVO> selectOrder(Page page, @Param("personal") PersonalVO personal,@Param("keyword") String keyword);

    Long getAllOrderCount(@Param("personal")PersonalVO personal, @Param("keyword")String keyword);
}
