package com.ltgk.boat.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ltgk.boat.domain.dto.DsBoatBindCrewDTO;
import com.ltgk.boat.domain.entity.DsBoatBindCrew;

import java.util.List;

/**
 * 渔船绑定船员 服务接口
 *
 * @author Qi ChengBin
 * @date 2024-12-18
 */
public interface IDsBoatBindCrewService extends IService<DsBoatBindCrew> {

    /**
     * 分页查询船员绑定渔船数据
     *
     * @param dsBoatBindCrewDTO: 渔船绑定船员数据传输对象
     * @return java.util.List<com.ltgk.boat.domain.entity.DsBoatBindCrew>
     * @author Qi ChengBin
     * @date 2024/12/18 13:53
     */
    List<DsBoatBindCrew> findDsBoatBindCrewPage(DsBoatBindCrewDTO dsBoatBindCrewDTO);

    /**
     * 根据船名获取绑定船员列表，无分页
     *
     * @param dsBoatBindCrewDTO:
     * @return com.ltgk.common.core.domain.AjaxResult
     * @author Qi ChengBin
     * @date 2024/12/18 14:14
     */
    List<DsBoatBindCrew> findBoatBindCrewByBoatName(DsBoatBindCrewDTO dsBoatBindCrewDTO);

    /**
     * 不分页查询船员绑定渔船数据
     *
     * @param dsBoatBindCrewDTO:
     * @return java.util.List<com.ltgk.boat.domain.entity.DsBoatBindCrew>
     * @author Qi ChengBin
     * @date 2024/12/18 14:19
     */
    List<DsBoatBindCrew> findBoatBindCrewList(DsBoatBindCrewDTO dsBoatBindCrewDTO);

    /**
     * 移动端渔船绑定船员操作
     *
     * @param dsBoatBindCrewDTO:
     * @return boolean
     * @author Qi ChengBin
     * @date 2024/12/18 14:54
     */
    boolean addByApp(DsBoatBindCrewDTO dsBoatBindCrewDTO);

    /**
     * 根据船员ID解除渔船与船员绑定关系
     *
     * @param dsBoatBindCrewDTO:
     * @return boolean
     * @author Qi ChengBin
     * @date 2024/12/18 17:36
     */
    boolean unBindBoatToCrew(DsBoatBindCrewDTO dsBoatBindCrewDTO);

    /**
     * 根据登录用户查询跟登录用户相关的船员信息；登录用户所拥有渔船下绑定的船员信息
     *
     * @param dto:
     * @return com.ltgk.common.core.domain.AjaxResult
     * @author Qi ChengBin
     * @date 2025/3/27
     */
    List<DsBoatBindCrew> findBoatBindCrewByLoginUser(DsBoatBindCrewDTO dto);
}