<![CDATA[select t1.* from (SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DEFAULT, t1.DESCRIPTION, t1.HIDDEN, t1.ID, t1.INTERNAL, t1.NAME, t1.PARENT_ID, t51.NAME AS PARENT_ID_TEXT, t1.RELATION_FIELD, t1.RES_MODEL, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM MAIL_MESSAGE_SUBTYPE t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN MAIL_MESSAGE_SUBTYPE t51 ON t1.PARENT_ID = t51.ID ) t1 where id=#{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="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DEFAULT, t1.HIDDEN, t1.ID, t1.INTERNAL, t1.NAME, t1.PARENT_ID, t51.NAME AS PARENT_ID_TEXT, t1.RELATION_FIELD, t1.RES_MODEL, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM MAIL_MESSAGE_SUBTYPE t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN MAIL_MESSAGE_SUBTYPE t51 ON t1.PARENT_ID = t51.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.CREATE_DATE, t1.CREATE_UID, t41.NAME AS CREATE_UID_TEXT, t1.DEFAULT, t1.DESCRIPTION, t1.HIDDEN, t1.ID, t1.INTERNAL, t1.NAME, t1.PARENT_ID, t51.NAME AS PARENT_ID_TEXT, t1.RELATION_FIELD, t1.RES_MODEL, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT FROM MAIL_MESSAGE_SUBTYPE t1 LEFT JOIN RES_USERS t11 ON t1.WRITE_UID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN RES_USERS t31 ON t1.CREATE_UID = t31.ID LEFT JOIN RES_PARTNER t41 ON t31.PARTNER_ID = t41.ID LEFT JOIN MAIL_MESSAGE_SUBTYPE t51 ON t1.PARENT_ID = t51.ID
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_message_subtype-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Mail_message_subtype-Get')")
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','iBizBusinessCentral-Mail_message_subtype-searchDefault-all') and hasPermission(#context,'iBizBusinessCentral-Mail_message_subtype-Get')")