<![CDATA[select t1.* from (SELECT t1.`ENTITY2ID` AS `CAMPAIGN2ID`, t1.`ENTITY2NAME` AS `CAMPAIGN2NAME`, t1.`RELATIONSHIPSID` AS `CAMPAIGNCAMPAIGNID`, t1.`RELATIONSHIPSNAME` AS `CAMPAIGNCAMPAIGNNAME`, t1.`ENTITYID` AS `CAMPAIGNID`, t1.`ENTITYNAME` AS `CAMPAIGNNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1 ) t1 where campaigncampaignid=#{id}]]>
<where><iftest="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<iftest="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sqlid="Default"databaseId="mysql">
<![CDATA[ SELECT t1.`ENTITY2ID` AS `CAMPAIGN2ID`, t1.`ENTITY2NAME` AS `CAMPAIGN2NAME`, t1.`RELATIONSHIPSID` AS `CAMPAIGNCAMPAIGNID`, t1.`RELATIONSHIPSNAME` AS `CAMPAIGNCAMPAIGNNAME`, t1.`ENTITYID` AS `CAMPAIGNID`, t1.`ENTITYNAME` AS `CAMPAIGNNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1
WHERE ( t1.`RELATIONSHIPSTYPE` = 'CAMPAIGNCAMPAIGN' )
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="mysql">
<![CDATA[ SELECT t1.`ENTITY2ID` AS `CAMPAIGN2ID`, t1.`ENTITY2NAME` AS `CAMPAIGN2NAME`, t1.`RELATIONSHIPSID` AS `CAMPAIGNCAMPAIGNID`, t1.`RELATIONSHIPSNAME` AS `CAMPAIGNCAMPAIGNNAME`, t1.`ENTITYID` AS `CAMPAIGNID`, t1.`ENTITYNAME` AS `CAMPAIGNNAME`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`RELATIONSHIPSTYPE`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `RELATIONSHIPS` t1
WHERE ( t1.`RELATIONSHIPSTYPE` = 'CAMPAIGNCAMPAIGN' )