<resultMap id="chainVo" type="com.suncnpap.intelligentqa.vo.ChainVo">
<id column="cid" property="id"/>
<result column="access_key" property="accessKey"/>
<result column="secret_key" property="secretKey"/>
<result column="outer_chain_name" property="outerChainName"/>
<result column="outer_chain_document" property="outerChainDocument"/>
<collection property="intentionVos" ofType="com.suncnpap.intelligentqa.vo.ChainIntentionVo"
resultMap="intentionVos"/>
</resultMap>
<resultMap id="intentionVos" type="com.suncnpap.intelligentqa.vo.ChainIntentionVo">
<id column="iid" property="id"/>
<result column="intention_name" property="intentionName"/>
<collection property="questionVoList" ofType="com.suncnpap.intelligentqa.vo.MultiQuestionVo">
<id column="qid" property="id"/>
<result column="question" property="question"/>
</collection>
<collection property="wordVos" ofType="com.suncnpap.intelligentqa.vo.ChainIntentionWordVo">
<id column="wid" property="id"/>
<result column="word_slot" property="wordSlot"/>
<result column="word_slot_miss_question" property="wordSlotMissQuestion"/>
<result column="entity_type_ids" property="entityTypeIds"/>
</collection>
</resultMap>
<select id="detail" resultMap="chainVo">
select tc.id as tid,
tci.id as iid,
tciw.id as wid,
tmq.id as qid,
access_key,
secret_key,
outer_chain_name,
outer_chain_document,
intention_name,
question,
word_slot,
word_slot_miss_question,
entity_type_ids
from t_chain tc
left join t_chain_intention tci on tc.id = tci.chain_id
left join t_chain_intention_word tciw on tci.id = tciw.intention_id
left join t_multi_question tmq on tci.id = tmq.parent_id
where tc.id = #{id}
and tc.deleted = 0
</select>
|