package com.ltkj.hosp.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ltkj.hosp.domain.TjSurveyOptions; import com.ltkj.hosp.domain.TjSurveyQuestion; import com.ltkj.hosp.domain.TjSurveyTempQues; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Select; import java.util.List; /** * 问卷问题Mapper接口 * * @author ltkj_赵佳豪&李格 * @date 2023-04-07 */ @Mapper public interface TjSurveyQuestionMapper extends BaseMapper { /** * 查询问卷问题 * * @param qid 问卷问题主键 * @return 问卷问题 */ public TjSurveyQuestion selectTjSurveyQuestionByQid(String qid); /*根据问题查询选项集合*/ public List selectOptionsByQid(String qid); /** * 查询问卷问题列表 * * @param tjSurveyQuestion 问卷问题 * @return 问卷问题集合 */ public List selectTjSurveyQuestionList(TjSurveyQuestion tjSurveyQuestion); /** * 新增问卷问题 * * @param tjSurveyQuestion 问卷问题 * @return 结果 */ public int insertTjSurveyQuestion(TjSurveyQuestion tjSurveyQuestion); /** * 新增问卷 * * @param tjSurveyOptions 问卷 * @return 结果 */ public int insertTjSurveyOptions(TjSurveyOptions tjSurveyOptions); /** * 修改问卷问题 * * @param tjSurveyQuestion 问卷问题 * @return 结果 */ public int updateTjSurveyQuestion(TjSurveyQuestion tjSurveyQuestion); /** * 删除问卷问题 * * @param qid 问卷问题主键 * @return 结果 */ public int deleteTjSurveyQuestionByQid(Long qid); public int deleteTjSurveyQuestionByMid(Long mid); /** * 批量删除问卷问题 * * @param qids 需要删除的数据主键集合 * @return 结果 */ public int deleteTjSurveyQuestionByQids(String[] qids); /** * 批量删除问卷选项 * * @param qids 需要删除的数据主键集合 * @return 结果 */ public int deleteTjSurveyOptionsByQids(String[] qids); /** * 批量新增问卷选项 * * @param tjSurveyOptionsList 问卷选项列表 * @return 结果 */ public int batchTjSurveyOptions(List tjSurveyOptionsList); /** * 通过问卷问题主键删除问卷选项信息 * * @param qid 问卷问题ID * @return 结果 */ public int deleteTjSurveyOptionsByQid(Long qid); @Select("SELECT * FROM tj_survey_temp_ques a WHERE a.mid=#{mid} AND a.deleted=0") List selectOptionsByMid(String mid); List getOptionsByMid(String mid); }