<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
	namespace="cn.com.countrygarden.bi.main.dao.review.ReviewQuestionnaireProblemOptionMapper">
	<!-- 通用查询映射结果 -->
	<resultMap id="BaseResultMap"
		type="cn.com.countrygarden.bi.main.model.review.ReviewQuestionnaireProblemOption">
		<id column="id" property="id" />
		<result column="questionnaire_problem_id"
			property="questionnaireProblemId" />
		<result column="name" property="name" />
		<result column="option_score" property="optionScore" />
		<result column="flag" property="flag" />
		<result column="create_by" property="createBy" />
		<result column="create_time" property="createTime" />
		<result column="update_by" property="updateBy" />
		<result column="update_time" property="updateTime" />
	</resultMap>
	<select id="optionVoList" parameterType="int">
		select name name,option_score optionScore from
		review_questionnaire_problem_option where
		questionnaire_problem_id=#{problemId}
	</select>


	<delete id="deleteproblemIds" parameterType="int">

		delete from review_questionnaire_problem_option where
		questionnaire_problem_id in
		<foreach collection="problemId" index="index" item="problemId"
			open="(" separator="," close=")">
			#{problemId}
		</foreach>


	</delete>
	<select id="problemOption" resultMap="BaseResultMap">
		select rqpo.id,rqpo.questionnaire_problem_id,rqpo.name,rqpo.option_score
		from review_questionnaire_problem_option
		rqpo,review_questionnaire_problem rqp
		where rqpo.questionnaire_problem_id=rqp.id

	</select>

</mapper>