package com.miaxis.coach.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.miaxis.coach.domain.CoachInfo;
import com.miaxis.coach.dto.CoachInfoDTO;
import com.miaxis.coach.dto.CoachInfoPcDTO;
import com.miaxis.coach.dto.CoachInfoVO;
import com.miaxis.coach.vo.CoachInfoPcVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 教练Mapper接口
 *
 * @author miaxis
 * @date 2021-01-07
 */
public interface CoachInfoMapper extends BaseMapper<CoachInfo> {
    /**
     * 查询教练
     *
     * @param coachnum 教练ID
     * @return 教练
     */
    public CoachInfo selectCoachInfoById(String coachnum);

    /**
     * 查询教练列表
     *
     * @param coachInfo 教练
     * @return 教练集合
     */
    public List<CoachInfo> selectCoachInfoList(CoachInfo coachInfo);

    /**
     * 新增教练
     *
     * @param coachInfo 教练
     * @return 结果
     */
    public int insertCoachInfo(CoachInfo coachInfo);

    /**
     * 修改教练
     *
     * @param coachInfo 教练
     * @return 结果
     */
    public int updateCoachInfo(CoachInfo coachInfo);


    /**
     * 批量删除教练
     *
     * @param coachnums 需要删除的数据ID
     * @return 结果
     */
    public int deleteCoachInfoByIds(String[] coachnums);

    /**
     * 查询教练列表 带头像距离信息
     */
    public List<CoachInfoVO> selectCoachInfoUrlList(CoachInfoDTO coachInfoDTO);

    /**
     * pc查询教练列表
     * @param coachInfo
     * @return
     */
    List<CoachInfoPcVO> queryList(CoachInfoPcDTO coachInfo);

    /**
     * pc教练密码重置
     * @param coachnums
     * @param password
     */
    void resetPassword(@Param("coachnums")String[] coachnums, @Param("password")String password);
}
