package com.diagbot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.diagbot.dto.GetQuestionInfoDTO;
import com.diagbot.dto.QuestionPageDTO;
import com.diagbot.entity.QuestionInfo;
import com.diagbot.entity.wrapper.QuestionInfoWrapper;
import com.diagbot.vo.GetQuestionInfoVO;
import com.diagbot.vo.GetQuestionUsualByDeptVO;
import com.diagbot.vo.ModuleGetQuestionInfoVO;
import com.diagbot.vo.QuestionPageVO;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 标签基础表 Mapper 接口
 * </p>
 *
 * @author zhaops
 * @since 2018-11-23
 */
public interface QuestionInfoMapper extends BaseMapper<QuestionInfo> {

    /**
     *  根据参数获取标签信息
     * @param map 参数
     * @return
     */
    public QuestionInfo getByParam(Map map);

    public void deleteByIds(Map map);

    public List<QuestionInfo> index(Map map);

    /**
     * 根据名称获取标签信息
     *
     * @param getQuestionInfoVO
     * @return
     */
    public List<GetQuestionInfoDTO> getQuestiongInfoByName(GetQuestionInfoVO  getQuestionInfoVO);

    /**
     * 根据名称获取标签信息
     *
     * @param moduleGetQuestionInfoVO
     * @return
     */
    public List<GetQuestionInfoDTO> moduleGetQuestiongInfoByName(ModuleGetQuestionInfoVO moduleGetQuestionInfoVO);

    /**
     * 根据科室id获取标签信息
     * @param getQuestionUsualByDeptVO
     * @return
     */
    public List<GetQuestionInfoDTO> getQuestionUsualsByDept(GetQuestionUsualByDeptVO getQuestionUsualByDeptVO);


    /**
     * 获取特殊标签，同伴|无
     * @param map
     * @return
     */
    public List<QuestionInfo> getSpecial(Map map);


    /**
     * 获取关联的父级标签
     *
     * @param id
     * @return
     */
    public List<QuestionInfo> getParent(Long id);


    /**
     * 获取标签列表
     *
     * @param questionPageVO
     * @return
     */
    public IPage<QuestionPageDTO> getList(QuestionPageVO questionPageVO);



    /**
     *  根据questionMapping获取标签信息
     * @param map 参数
     * @return
     */
    public List<QuestionInfoWrapper> getByQuestionMapping(Map map);


    /**
     * 根据模板id获取标签信息
     *
     * @param moduleId
     * @return
     */
    public List<GetQuestionInfoDTO> getQuestionByModuleId(Long moduleId);

}
