package jnpf.cultivate.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.model.cultivate.dto.learn.BatchCommonCountDto;
import jnpf.model.cultivate.po.promotion.FtbCultivatePromotionMemberNew;
import jnpf.model.cultivate.po.promotion.FtbCultivatePromotionPostNew;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FtbCultivatePromotionMemberNewMapper extends BaseMapper<FtbCultivatePromotionMemberNew> {
    /**
     * 查询当前人的学习地图等级
     *
     * @param userId
     * @param postId
     * @param promtionId
     * @return
     */
    Integer queryTheCurrentUserLearningMapLevel(@Param("userId") String userId, @Param("postId") String postId, @Param("promtionId") String promtionId);

    List<FtbCultivatePromotionMemberNew> selectStudyStep(@Param("userId") String userId, @Param("mainPositionId") String mainPositionId);

    /**
     * 查询岗位是否有学习地图
     *
     * @param mainPositionId 岗位id
     * @return
     */
    String queryHasStudyMap(@Param("mainPositionId") String mainPositionId);

    /**
     * 查询当前人的学习地图等级
     *
     * @param userId     用户id
     * @param pomotionId 学习地图id
     * @return
     */
    Integer queryCurrLevel(@Param("userId") String userId, @Param("pomotionId") String pomotionId);

    /**
     * 查询岗位关联的学习地图
     *
     * @param postId 岗位id
     * @return 学习地图id
     */
    List<FtbCultivatePromotionPostNew> queryRelationMap(@Param("postId") String postId);


    List<BatchCommonCountDto> queryMyCurrentPhase(@Param("userId") String userId, @Param("promotionIds") List<String> promotionIds);

    List<FtbCultivatePromotionMemberNew> queryMyAllSelectPosition(@Param("userId") String userId);
}