提交 f6278eef 编写于 作者: ibizdev's avatar ibizdev

xignzi006 发布系统代码

上级 fa945471
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性--> <!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="IncidentCustomerResultMap" databaseId="mysql"> <select id="selectById" resultMap="IncidentCustomerResultMap" databaseId="mysql">
<![CDATA[select t1.* from (SELECT t1.`BUSINESSTYPECODE`, t1.`CUSTOMERID`, t1.`CUSTOMERNAME`, t1.`CUSTOMERTYPE` FROM (SELECT 'ACCOUNT' AS `CUSTOMERTYPE`,v1.`ACCOUNTID` AS `CUSTOMERID` ,v1.`ACCOUNTNAME` AS `CUSTOMERNAME` ,NULL AS `BUSINESSTYPECODE` FROM (SELECT t1.`ACCOUNTID`, t1.`ACCOUNTNAME` FROM `ACCOUNT` t1 ) v1 UNION ALL SELECT 'CONTACT' AS `CUSTOMERTYPE`,v2.`CONTACTID` AS `CUSTOMERID` ,v2.`FULLNAME` AS `CUSTOMERNAME` ,NULL AS `BUSINESSTYPECODE` FROM (SELECT t1.`CONTACTID`, t1.`FULLNAME` FROM `CONTACT` t1 ) v2 ) t1 ) t1 where customerid=#{id}]]> <![CDATA[select t1.* from (SELECT t1.`BUSINESSTYPECODE`, t1.`CUSTOMERID`, t1.`CUSTOMERNAME`, t1.`CUSTOMERTYPE` FROM (SELECT 'ACCOUNT' AS `CUSTOMERTYPE`,v1.`ACCOUNTID` AS `CUSTOMERID` ,v1.`ACCOUNTNAME` AS `CUSTOMERNAME` ,v1.`BUSINESSTYPECODE` AS `BUSINESSTYPECODE` FROM (SELECT t1.`ACCOUNTID`, t1.`ACCOUNTNAME`, t1.`BUSINESSTYPECODE` FROM `ACCOUNT` t1 ) v1 UNION ALL SELECT 'CONTACT' AS `CUSTOMERTYPE`,v2.`CONTACTID` AS `CUSTOMERID` ,v2.`FULLNAME` AS `CUSTOMERNAME` ,NULL AS `BUSINESSTYPECODE` FROM (SELECT t1.`CONTACTID`, t1.`FULLNAME` FROM `CONTACT` t1 ) v2 ) t1 ) t1 where customerid=#{id}]]>
</select> </select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 --> <!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
</sql> </sql>
<!--数据查询[Default]--> <!--数据查询[Default]-->
<sql id="Default" databaseId="mysql"> <sql id="Default" databaseId="mysql">
<![CDATA[ SELECT t1.`BUSINESSTYPECODE`, t1.`CUSTOMERID`, t1.`CUSTOMERNAME`, t1.`CUSTOMERTYPE` FROM (SELECT 'ACCOUNT' AS `CUSTOMERTYPE`,v1.`ACCOUNTID` AS `CUSTOMERID` ,v1.`ACCOUNTNAME` AS `CUSTOMERNAME` ,NULL AS `BUSINESSTYPECODE` FROM (SELECT t1.`ACCOUNTID`, t1.`ACCOUNTNAME` FROM `ACCOUNT` t1 ) v1 UNION ALL SELECT 'CONTACT' AS `CUSTOMERTYPE`,v2.`CONTACTID` AS `CUSTOMERID` ,v2.`FULLNAME` AS `CUSTOMERNAME` ,NULL AS `BUSINESSTYPECODE` FROM (SELECT t1.`CONTACTID`, t1.`FULLNAME` FROM `CONTACT` t1 ) v2 ) t1 <![CDATA[ SELECT t1.`BUSINESSTYPECODE`, t1.`CUSTOMERID`, t1.`CUSTOMERNAME`, t1.`CUSTOMERTYPE` FROM (SELECT 'ACCOUNT' AS `CUSTOMERTYPE`,v1.`ACCOUNTID` AS `CUSTOMERID` ,v1.`ACCOUNTNAME` AS `CUSTOMERNAME` ,v1.`BUSINESSTYPECODE` AS `BUSINESSTYPECODE` FROM (SELECT t1.`ACCOUNTID`, t1.`ACCOUNTNAME`, t1.`BUSINESSTYPECODE` FROM `ACCOUNT` t1 ) v1 UNION ALL SELECT 'CONTACT' AS `CUSTOMERTYPE`,v2.`CONTACTID` AS `CUSTOMERID` ,v2.`FULLNAME` AS `CUSTOMERNAME` ,NULL AS `BUSINESSTYPECODE` FROM (SELECT t1.`CONTACTID`, t1.`FULLNAME` FROM `CONTACT` t1 ) v2 ) t1
]]> ]]>
</sql> </sql>
<!--数据查询[View]--> <!--数据查询[View]-->
<sql id="View" databaseId="mysql"> <sql id="View" databaseId="mysql">
<![CDATA[ SELECT t1.`BUSINESSTYPECODE`, t1.`CUSTOMERID`, t1.`CUSTOMERNAME`, t1.`CUSTOMERTYPE` FROM (SELECT 'ACCOUNT' AS `CUSTOMERTYPE`,v1.`ACCOUNTID` AS `CUSTOMERID` ,v1.`ACCOUNTNAME` AS `CUSTOMERNAME` ,NULL AS `BUSINESSTYPECODE` FROM (SELECT t1.`ACCOUNTID`, t1.`ACCOUNTNAME` FROM `ACCOUNT` t1 ) v1 UNION ALL SELECT 'CONTACT' AS `CUSTOMERTYPE`,v2.`CONTACTID` AS `CUSTOMERID` ,v2.`FULLNAME` AS `CUSTOMERNAME` ,NULL AS `BUSINESSTYPECODE` FROM (SELECT t1.`CONTACTID`, t1.`FULLNAME` FROM `CONTACT` t1 ) v2 ) t1 <![CDATA[ SELECT t1.`BUSINESSTYPECODE`, t1.`CUSTOMERID`, t1.`CUSTOMERNAME`, t1.`CUSTOMERTYPE` FROM (SELECT 'ACCOUNT' AS `CUSTOMERTYPE`,v1.`ACCOUNTID` AS `CUSTOMERID` ,v1.`ACCOUNTNAME` AS `CUSTOMERNAME` ,v1.`BUSINESSTYPECODE` AS `BUSINESSTYPECODE` FROM (SELECT t1.`ACCOUNTID`, t1.`ACCOUNTNAME`, t1.`BUSINESSTYPECODE` FROM `ACCOUNT` t1 ) v1 UNION ALL SELECT 'CONTACT' AS `CUSTOMERTYPE`,v2.`CONTACTID` AS `CUSTOMERID` ,v2.`FULLNAME` AS `CUSTOMERNAME` ,NULL AS `BUSINESSTYPECODE` FROM (SELECT t1.`CONTACTID`, t1.`FULLNAME` FROM `CONTACT` t1 ) v2 ) t1
]]> ]]>
</sql> </sql>
</mapper> </mapper>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册