关联下一个查询的值当作条件
三层collection嵌套如下:
第一层:
第二,三层:
第一个select
select a.TITLE_NAME, a.TITLE_ID, b.NUMBER, b.REVIEW_INDICATIONS, b.GRADE, b.OPTION_TYPE, b.ID_ from ic_ed_evidence_document_structure a left join ic_ed_policy_content b ON a.TITLE_ID = b.REVIEW_CONTENT_ID a.ISDELETeD = '0' and b.ISDELETED = '0' and a.TITLE_ID = #{titleId, jdbcType=VARCHAR} and b.EVIDENCE_DOCUMENT_ID = #{evidenceDocumentId, jdbcType=VARCHAR} order by cast(substring_index(b.NUMBER,'.',1) as UNSIGNED) asc, cast(substring_index(substring_index(b.NUMBER,'.',2),'.',-1) as UNSIGNED) asc, cast(substring_index(substring_index(b.NUMBER,'.',3),'.',-1) as UNSIGNED) asc, cast(substring_index(b.NUMBER,'.',-1) AS UNSIGNED) asc
第一层中的
select="queryIcEdPolicyOptionList"以column="ID_为条件,查询
select c.ID_, c.ISDELETED, c.OPER, c.OPTIME, c.UPDATOR, c.UPDATETIME, c.TENANTID, c.NUMBER_ID, c.OPTION_ID, c.CHECK_BOX, c.CHOICE, d.ID_, d.ISDELETED, d.OPER, d.OPTIME, d.UPDATOR, d.UPDATETIME, d.TENANTID, d.OPTION_ID, d.OPTION_CONTENT_ID, d.OPTION_CONTENT from ic_ed_policy_option c left join ic_ed_policy_option_content d ON c.ID_ = d.OPTION_ID c.ISDELETED = '0' and d.ISDELETED = '0' and c.NUMBER_ID = #{ID_, jdbcType=INTEGER} order by cast(substring_index(c.OPTION_ID,'.',1) as UNSIGNED) asc, cast(substring_index(substring_index(c.OPTION_ID,'.',2),'.',-1) as UNSIGNED) asc, cast(substring_index(substring_index(c.OPTION_ID,'.',3),'.',-1) as UNSIGNED) asc, cast(substring_index(substring_index(c.OPTION_ID,'-',1),'.',-1) as UNSIGNED) asc, cast(substring_index(c.OPTION_ID,'-',-1) AS UNSIGNED) asc
上一篇 Java-Level1-day01:JDK&IDEA环境搭建;helloworld工程创建;注释 标识符 关键字;数据类型;变量;
下一篇 Linux7.6 学习笔记 第九章:Linux的系统进程
版权所有 (c)2021-2022 wk8.com.cn
ICP备案号:晋ICP备2021003244-6号