<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.AMOUNT, t1.COMPANY_ID, t21.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t81.NAME AS CREATE_UNAME, t1.DEBUG_LOGGING, t1.DELIVERY_TYPE, t1.FIXED_PRICE, t1.FREE_OVER, t1.GET_RETURN_LABEL_FROM_PORTAL, t1.ID, t1.INTEGRATION_LEVEL, t1.INVOICE_POLICY, t1.IS_PUBLISHED, t1.MARGIN, t1.NAME, t1.PRODUCT_ID, t41.NAME AS PRODUCT_NAME, t1.PROD_ENVIRONMENT, t1.RETURN_LABEL_ON_DELIVERY, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UNAME, t1.ZIP_FROM, t1.ZIP_TO FROM DELIVERY_CARRIER t1 LEFT JOIN RES_COMPANY t11 ON t1.COMPANY_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN PRODUCT_PRODUCT t31 ON t1.PRODUCT_ID = t31.ID LEFT JOIN PRODUCT_TEMPLATE t41 ON t31.PRODUCT_TMPL_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.CREATE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.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.ACTIVE, t1.AMOUNT, t1.COMPANY_ID, t21.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t81.NAME AS CREATE_UNAME, t1.DEBUG_LOGGING, t1.DELIVERY_TYPE, t1.FIXED_PRICE, t1.FREE_OVER, t1.GET_RETURN_LABEL_FROM_PORTAL, t1.ID, t1.INTEGRATION_LEVEL, t1.INVOICE_POLICY, t1.IS_PUBLISHED, t1.MARGIN, t1.NAME, t1.PRODUCT_ID, t41.NAME AS PRODUCT_NAME, t1.PROD_ENVIRONMENT, t1.RETURN_LABEL_ON_DELIVERY, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UNAME, t1.ZIP_FROM, t1.ZIP_TO FROM DELIVERY_CARRIER t1 LEFT JOIN RES_COMPANY t11 ON t1.COMPANY_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN PRODUCT_PRODUCT t31 ON t1.PRODUCT_ID = t31.ID LEFT JOIN PRODUCT_TEMPLATE t41 ON t31.PRODUCT_TMPL_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.CREATE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.AMOUNT, t1.COMPANY_ID, t21.NAME AS COMPANY_NAME, t1.CREATE_DATE, t1.CREATE_UID, t81.NAME AS CREATE_UNAME, t1.DEBUG_LOGGING, t1.DELIVERY_TYPE, t1.FIXED_PRICE, t1.FREE_OVER, t1.GET_RETURN_LABEL_FROM_PORTAL, t1.ID, t1.INTEGRATION_LEVEL, t1.INVOICE_POLICY, t1.IS_PUBLISHED, t1.MARGIN, t1.NAME, t1.PRODUCT_ID, t41.NAME AS PRODUCT_NAME, t1.PROD_ENVIRONMENT, t1.RETURN_LABEL_ON_DELIVERY, t1.SEQUENCE, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UNAME, t1.ZIP_FROM, t1.ZIP_TO FROM DELIVERY_CARRIER t1 LEFT JOIN RES_COMPANY t11 ON t1.COMPANY_ID = t11.ID LEFT JOIN RES_PARTNER t21 ON t11.PARTNER_ID = t21.ID LEFT JOIN PRODUCT_PRODUCT t31 ON t1.PRODUCT_ID = t31.ID LEFT JOIN PRODUCT_TEMPLATE t41 ON t31.PRODUCT_TMPL_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.CREATE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID