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

xignzi006 发布系统代码,后台体系[Spring Boot]

上级 33a49738
!!!!模版产生代码错误:----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #{item.srfkey} [in template "CODETEMPL_en_US" at line 268, column 98]
----
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partnerMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_partnerResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT t1.ACTIVE, t1.ADDITIONAL_INFO, t1.BARCODE, t1.CALENDAR_LAST_NOTIF_ACK, t1.CITY, t1.COLOR, t1.COMMENT, t1.COMMERCIAL_COMPANY_NAME, t1.COMMERCIAL_PARTNER_ID, t81.NAME AS COMMERCIAL_PARTNER_ID_TEXT, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.COMPANY_NAME, t1.COUNTRY_ID, t61.NAME AS COUNTRY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t131.NAME AS CREATE_UID_TEXT, t1.CREDIT_LIMIT, t1.CUSTOMER_RANK, t1.DATE, t1.DEBIT_LIMIT, t1.DISPLAY_NAME, t1.EMAIL, t1.EMPLOYEE, t1.FUNCTION AS IBIZFUNCTION, t1.ID, t1.INDUSTRY_ID, t141.NAME AS INDUSTRY_ID_TEXT, t1.INVOICE_WARN, t1.INVOICE_WARN_MSG, t1.IS_COMPANY, t1.IS_PUBLISHED, t1.LANG, t1.LAST_TIME_ENTRIES_CHECKED, t1.MESSAGE_BOUNCE, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MOBILE, t1.NAME, t1.PARENT_ID, t91.NAME AS PARENT_NAME, t1.PARTNER_GID, t1.PARTNER_SHARE, t1.PHONE, t1.PICKING_WARN, t1.PICKING_WARN_MSG, t1.PURCHASE_WARN, t1.PURCHASE_WARN_MSG, t1.REF, t1.SALE_WARN, t1.SALE_WARN_MSG, t1.SIGNUP_EXPIRATION, t1.SIGNUP_TOKEN, t1.SIGNUP_TYPE, t1.STATE_ID, t71.NAME AS STATE_ID_TEXT, t1.STREET, t1.STREET2, t1.SUPPLIER_RANK, t1.TEAM_ID, t151.NAME AS TEAM_ID_TEXT, t1.TITLE, t31.NAME AS TITLE_TEXT, t1.TYPE, t1.TZ, t1.USER_ID, t111.NAME AS USER_ID_TEXT, t1.VAT, t1.WEBSITE, t1.WEBSITE_DESCRIPTION, t1.WEBSITE_ID, t1.WEBSITE_META_DESCRIPTION, t1.WEBSITE_META_KEYWORDS, t1.WEBSITE_META_OG_IMG, t1.WEBSITE_META_TITLE, t1.WEBSITE_SHORT_DESCRIPTION, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT, t1.ZIP FROM RES_PARTNER 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_PARTNER_TITLE t31 ON t1.TITLE = t31.ID LEFT JOIN RES_COMPANY t41 ON t1.COMPANY_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_COUNTRY t61 ON t1.COUNTRY_ID = t61.ID LEFT JOIN RES_COUNTRY_STATE t71 ON t1.STATE_ID = t71.ID LEFT JOIN RES_PARTNER t81 ON t1.COMMERCIAL_PARTNER_ID = t81.ID LEFT JOIN RES_PARTNER t91 ON t1.PARENT_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.USER_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN RES_USERS t121 ON t1.CREATE_UID = t121.ID LEFT JOIN RES_PARTNER t131 ON t121.PARTNER_ID = t131.ID LEFT JOIN RES_PARTNER_INDUSTRY t141 ON t1.INDUSTRY_ID = t141.ID LEFT JOIN CRM_TEAM t151 ON t1.TEAM_ID = t151.ID ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Res_partnerResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner" autoMapping="true">
<id property="id" column="id" /><!--主键字段映射-->
<result property="paymentTokenIds" column="payment_token_ids" />
<result property="invoiceIds" column="invoice_ids" />
<result property="meetingCount" column="meeting_count" />
<result property="supplierInvoiceCount" column="supplier_invoice_count" />
<result property="companyName" column="company_name" />
<result property="websitePublished" column="website_published" />
<result property="lastTimeEntriesChecked" column="last_time_entries_checked" />
<result property="messageUnread" column="message_unread" />
<result property="totalInvoiced" column="total_invoiced" />
<result property="posOrderCount" column="pos_order_count" />
<result property="contactAddress" column="contact_address" />
<result property="invoiceWarn" column="invoice_warn" />
<result property="bankIds" column="bank_ids" />
<result property="signupExpiration" column="signup_expiration" />
<result property="purchaseOrderCount" column="purchase_order_count" />
<result property="hasUnreconciledEntries" column="has_unreconciled_entries" />
<result property="websiteDescription" column="website_description" />
<result property="messageMainAttachmentId" column="message_main_attachment_id" />
<result property="meetingIds" column="meeting_ids" />
<result property="displayName" column="display_name" />
<result property="childIds" column="child_ids" />
<result property="websiteMetaDescription" column="website_meta_description" />
<result property="isBlacklisted" column="is_blacklisted" />
<result property="propertyProductPricelist" column="property_product_pricelist" />
<result property="activityDateDeadline" column="activity_date_deadline" />
<result property="activityTypeId" column="activity_type_id" />
<result property="signupToken" column="signup_token" />
<result property="refCompanyIds" column="ref_company_ids" />
<result property="isCompany" column="is_company" />
<result property="createDate" column="create_date" />
<result property="eventCount" column="event_count" />
<result property="messageHasError" column="message_has_error" />
<result property="calendarLastNotifAck" column="calendar_last_notif_ack" />
<result property="messageChannelIds" column="message_channel_ids" />
<result property="signupType" column="signup_type" />
<result property="emailFormatted" column="email_formatted" />
<result property="websiteMessageIds" column="website_message_ids" />
<result property="partnerShare" column="partner_share" />
<result property="paymentTokenCount" column="payment_token_count" />
<result property="partnerGid" column="partner_gid" />
<result property="signupValid" column="signup_valid" />
<result property="websiteMetaOgImg" column="website_meta_og_img" />
<result property="imageSmall" column="image_small" />
<result property="bankAccountCount" column="bank_account_count" />
<result property="saleWarn" column="sale_warn" />
<result property="messageBounce" column="message_bounce" />
<result property="messageNeedactionCounter" column="message_needaction_counter" />
<result property="messageFollowerIds" column="message_follower_ids" />
<result property="opportunityCount" column="opportunity_count" />
<result property="LastUpdate" column="__last_update" />
<result property="messagePartnerIds" column="message_partner_ids" />
<result property="imStatus" column="im_status" />
<result property="writeDate" column="write_date" />
<result property="messageHasErrorCounter" column="message_has_error_counter" />
<result property="invoiceWarnMsg" column="invoice_warn_msg" />
<result property="messageNeedaction" column="message_needaction" />
<result property="pickingWarn" column="picking_warn" />
<result property="contractIds" column="contract_ids" />
<result property="currencyId" column="currency_id" />
<result property="messageAttachmentCount" column="message_attachment_count" />
<result property="propertyPaymentTermId" column="property_payment_term_id" />
<result property="userIds" column="user_ids" />
<result property="websiteMetaKeywords" column="website_meta_keywords" />
<result property="channelIds" column="channel_ids" />
<result property="purchaseWarn" column="purchase_warn" />
<result property="journalItemCount" column="journal_item_count" />
<result property="propertyStockSupplier" column="property_stock_supplier" />
<result property="propertyAccountPayableId" column="property_account_payable_id" />
<result property="websiteShortDescription" column="website_short_description" />
<result property="saleWarnMsg" column="sale_warn_msg" />
<result property="activityState" column="activity_state" />
<result property="activityIds" column="activity_ids" />
<result property="messageIsFollower" column="message_is_follower" />
<result property="propertySupplierPaymentTermId" column="property_supplier_payment_term_id" />
<result property="propertyStockCustomer" column="property_stock_customer" />
<result property="taskIds" column="task_ids" />
<result property="messageUnreadCounter" column="message_unread_counter" />
<result property="purchaseWarnMsg" column="purchase_warn_msg" />
<result property="websiteMetaTitle" column="website_meta_title" />
<result property="tzOffset" column="tz_offset" />
<result property="companyType" column="company_type" />
<result property="activitySummary" column="activity_summary" />
<result property="taskCount" column="task_count" />
<result property="creditLimit" column="credit_limit" />
<result property="propertyAccountReceivableId" column="property_account_receivable_id" />
<result property="propertyPurchaseCurrencyId" column="property_purchase_currency_id" />
<result property="pickingWarnMsg" column="picking_warn_msg" />
<result property="signupUrl" column="signup_url" />
<result property="messageIds" column="message_ids" />
<result property="propertyAccountPositionId" column="property_account_position_id" />
<result property="websiteId" column="website_id" />
<result property="isPublished" column="is_published" />
<result property="activityUserId" column="activity_user_id" />
<result property="saleOrderCount" column="sale_order_count" />
<result property="imageMedium" column="image_medium" />
<result property="additionalInfo" column="additional_info" />
<result property="opportunityIds" column="opportunity_ids" />
<result property="contractsCount" column="contracts_count" />
<result property="debitLimit" column="debit_limit" />
<result property="websiteUrl" column="website_url" />
<result property="saleOrderIds" column="sale_order_ids" />
<result property="lastWebsiteSoId" column="last_website_so_id" />
<result property="isSeoOptimized" column="is_seo_optimized" />
<result property="commercialCompanyName" column="commercial_company_name" />
<result property="writeUidText" column="write_uid_text" />
<result property="titleText" column="title_text" />
<result property="companyIdText" column="company_id_text" />
<result property="countryIdText" column="country_id_text" />
<result property="stateIdText" column="state_id_text" />
<result property="commercialPartnerIdText" column="commercial_partner_id_text" />
<result property="parentName" column="parent_name" />
<result property="userIdText" column="user_id_text" />
<result property="createUidText" column="create_uid_text" />
<result property="industryIdText" column="industry_id_text" />
<result property="teamIdText" column="team_id_text" />
<result property="teamId" column="team_id" />
<result property="stateId" column="state_id" />
<result property="userId" column="user_id" />
<result property="createUid" column="create_uid" />
<result property="parentId" column="parent_id" />
<result property="title" column="title" />
<result property="writeUid" column="write_uid" />
<result property="commercialPartnerId" column="commercial_partner_id" />
<result property="industryId" column="industry_id" />
<result property="companyId" column="company_id" />
<result property="countryId" column="country_id" />
<result property="supplierRank" column="supplier_rank" />
<result property="customerRank" column="customer_rank" />
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooTeam" javaType="cn.ibizlab.businesscentral.core.odoo_crm.domain.Crm_team" column="team_id" select="cn.ibizlab.businesscentral.core.odoo_crm.mapper.Crm_teamMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooCompany" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_company" column="company_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_companyMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooState" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country_state" column="state_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_country_stateMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooCountry" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_country" column="country_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_countryMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooIndustry" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_industry" column="industry_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partner_industryMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooTitle" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner_title" column="title" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partner_titleMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooCommercialPartner" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner" column="commercial_partner_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partnerMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooParent" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_partner" column="parent_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_partnerMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooCreate" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_users" column="create_uid" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_usersMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooUser" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_users" column="user_id" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_usersMapper.selectById" fetchType="lazy"></association>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="odooWrite" javaType="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_users" column="write_uid" select="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_usersMapper.selectById" fetchType="lazy"></association>
</resultMap>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__CRM_TEAM__TEAM_ID] -->
<select id="selectByTeamId" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where team_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__RES_COMPANY__COMPANY_ID] -->
<select id="selectByCompanyId" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where company_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__RES_COUNTRY_STATE__STATE_ID] -->
<select id="selectByStateId" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where state_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__RES_COUNTRY__COUNTRY_ID] -->
<select id="selectByCountryId" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where country_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__RES_PARTNER_INDUSTRY__INDUSTRY_ID] -->
<select id="selectByIndustryId" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where industry_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__RES_PARTNER_TITLE__TITLE] -->
<select id="selectByTitle" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where title=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__RES_PARTNER__COMMERCIAL_PARTNER_ID] -->
<select id="selectByCommercialPartnerId" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where commercial_partner_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__RES_PARTNER__PARENT_ID] -->
<select id="selectByParentId" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where parent_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__RES_USERS__CREATE_UID] -->
<select id="selectByCreateUid" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where create_uid=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__RES_USERS__USER_ID] -->
<select id="selectByUserId" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where user_id=#{id}
</select>
<!--关系实体暴露select方法供主实体通过外键查询关系实体数据[实体关系名称:DER1N_RES_PARTNER__RES_USERS__WRITE_UID] -->
<select id="selectByWriteUid" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
) t1
where write_uid=#{id}
</select>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_partnerSearchContext" resultMap="Res_partnerResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.ADDITIONAL_INFO, t1.BARCODE, t1.CALENDAR_LAST_NOTIF_ACK, t1.CITY, t1.COLOR, t1.COMMERCIAL_COMPANY_NAME, t1.COMMERCIAL_PARTNER_ID, t81.NAME AS COMMERCIAL_PARTNER_ID_TEXT, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.COMPANY_NAME, t1.COUNTRY_ID, t61.NAME AS COUNTRY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t131.NAME AS CREATE_UID_TEXT, t1.CREDIT_LIMIT, t1.CUSTOMER_RANK, t1.DATE, t1.DEBIT_LIMIT, t1.DISPLAY_NAME, t1.EMAIL, t1.EMPLOYEE, t1.FUNCTION AS IBIZFUNCTION, t1.ID, t1.INDUSTRY_ID, t141.NAME AS INDUSTRY_ID_TEXT, t1.INVOICE_WARN, t1.IS_COMPANY, t1.IS_PUBLISHED, t1.LANG, t1.LAST_TIME_ENTRIES_CHECKED, t1.MESSAGE_BOUNCE, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MOBILE, t1.NAME, t1.PARENT_ID, t91.NAME AS PARENT_NAME, t1.PARTNER_GID, t1.PARTNER_SHARE, t1.PHONE, t1.PICKING_WARN, t1.PURCHASE_WARN, t1.REF, t1.SALE_WARN, t1.SIGNUP_EXPIRATION, t1.SIGNUP_TOKEN, t1.SIGNUP_TYPE, t1.STATE_ID, t71.NAME AS STATE_ID_TEXT, t1.STREET, t1.STREET2, t1.SUPPLIER_RANK, t1.TEAM_ID, t151.NAME AS TEAM_ID_TEXT, t1.TITLE, t31.NAME AS TITLE_TEXT, t1.TYPE, t1.TZ, t1.USER_ID, t111.NAME AS USER_ID_TEXT, t1.VAT, t1.WEBSITE, t1.WEBSITE_ID, t1.WEBSITE_META_KEYWORDS, t1.WEBSITE_META_OG_IMG, t1.WEBSITE_META_TITLE, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT, t1.ZIP FROM RES_PARTNER 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_PARTNER_TITLE t31 ON t1.TITLE = t31.ID LEFT JOIN RES_COMPANY t41 ON t1.COMPANY_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_COUNTRY t61 ON t1.COUNTRY_ID = t61.ID LEFT JOIN RES_COUNTRY_STATE t71 ON t1.STATE_ID = t71.ID LEFT JOIN RES_PARTNER t81 ON t1.COMMERCIAL_PARTNER_ID = t81.ID LEFT JOIN RES_PARTNER t91 ON t1.PARENT_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.USER_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN RES_USERS t121 ON t1.CREATE_UID = t121.ID LEFT JOIN RES_PARTNER t131 ON t121.PARTNER_ID = t131.ID LEFT JOIN RES_PARTNER_INDUSTRY t141 ON t1.INDUSTRY_ID = t141.ID LEFT JOIN CRM_TEAM t151 ON t1.TEAM_ID = t151.ID
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.ADDITIONAL_INFO, t1.BARCODE, t1.CALENDAR_LAST_NOTIF_ACK, t1.CITY, t1.COLOR, t1.COMMENT, t1.COMMERCIAL_COMPANY_NAME, t1.COMMERCIAL_PARTNER_ID, t81.NAME AS COMMERCIAL_PARTNER_ID_TEXT, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.COMPANY_NAME, t1.COUNTRY_ID, t61.NAME AS COUNTRY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t131.NAME AS CREATE_UID_TEXT, t1.CREDIT_LIMIT, t1.CUSTOMER_RANK, t1.DATE, t1.DEBIT_LIMIT, t1.DISPLAY_NAME, t1.EMAIL, t1.EMPLOYEE, t1.FUNCTION AS IBIZFUNCTION, t1.ID, t1.INDUSTRY_ID, t141.NAME AS INDUSTRY_ID_TEXT, t1.INVOICE_WARN, t1.INVOICE_WARN_MSG, t1.IS_COMPANY, t1.IS_PUBLISHED, t1.LANG, t1.LAST_TIME_ENTRIES_CHECKED, t1.MESSAGE_BOUNCE, t1.MESSAGE_MAIN_ATTACHMENT_ID, t1.MOBILE, t1.NAME, t1.PARENT_ID, t91.NAME AS PARENT_NAME, t1.PARTNER_GID, t1.PARTNER_SHARE, t1.PHONE, t1.PICKING_WARN, t1.PICKING_WARN_MSG, t1.PURCHASE_WARN, t1.PURCHASE_WARN_MSG, t1.REF, t1.SALE_WARN, t1.SALE_WARN_MSG, t1.SIGNUP_EXPIRATION, t1.SIGNUP_TOKEN, t1.SIGNUP_TYPE, t1.STATE_ID, t71.NAME AS STATE_ID_TEXT, t1.STREET, t1.STREET2, t1.SUPPLIER_RANK, t1.TEAM_ID, t151.NAME AS TEAM_ID_TEXT, t1.TITLE, t31.NAME AS TITLE_TEXT, t1.TYPE, t1.TZ, t1.USER_ID, t111.NAME AS USER_ID_TEXT, t1.VAT, t1.WEBSITE, t1.WEBSITE_DESCRIPTION, t1.WEBSITE_ID, t1.WEBSITE_META_DESCRIPTION, t1.WEBSITE_META_KEYWORDS, t1.WEBSITE_META_OG_IMG, t1.WEBSITE_META_TITLE, t1.WEBSITE_SHORT_DESCRIPTION, t1.WRITE_DATE, t1.WRITE_UID, t21.NAME AS WRITE_UID_TEXT, t1.ZIP FROM RES_PARTNER 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_PARTNER_TITLE t31 ON t1.TITLE = t31.ID LEFT JOIN RES_COMPANY t41 ON t1.COMPANY_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t41.PARTNER_ID = t51.ID LEFT JOIN RES_COUNTRY t61 ON t1.COUNTRY_ID = t61.ID LEFT JOIN RES_COUNTRY_STATE t71 ON t1.STATE_ID = t71.ID LEFT JOIN RES_PARTNER t81 ON t1.COMMERCIAL_PARTNER_ID = t81.ID LEFT JOIN RES_PARTNER t91 ON t1.PARENT_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.USER_ID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID LEFT JOIN RES_USERS t121 ON t1.CREATE_UID = t121.ID LEFT JOIN RES_PARTNER t131 ON t121.PARTNER_ID = t131.ID LEFT JOIN RES_PARTNER_INDUSTRY t141 ON t1.INDUSTRY_ID = t141.ID LEFT JOIN CRM_TEAM t151 ON t1.TEAM_ID = t151.ID
]]>
</sql>
</mapper>
!!!!模版产生代码错误:----
Tip: It's the step after the last dot that caused this error, not those before it.
----
Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign der = defield.getPSDER1N() [in template "CODETEMPL_en_US" at line 261, column 9]
----
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.ibizlab.businesscentral.core.odoo_base.mapper.Res_supplierMapper">
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select id="selectById" resultMap="Res_supplierResultMap" databaseId="postgresql">
<![CDATA[select t1.* from (SELECT (SELECT array_to_json(array_agg(t.*)) FROM (SELECT m1.CATEGORY_ID as srfkey, m2.NAME AS srfmajortext FROM res_partner_res_partner_category_rel m1 LEFT JOIN RES_PARTNER_CATEGORY m2 ON m1.CATEGORY_ID = m2.ID where m1.partner_id =t1.id ) t) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1 ) t1 where id=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="Res_supplierResultMap" type="cn.ibizlab.businesscentral.core.odoo_base.domain.Res_supplier" autoMapping="true">
<id property="id" column="id" /><!--主键字段映射-->
<result property="companyType" column="company_type" />
<result property="websiteUrl" column="website_url" />
</resultMap>
<!--数据集合[Default]-->
<select id="searchDefault" parameterType="cn.ibizlab.businesscentral.core.odoo_base.filter.Res_supplierSearchContext" resultMap="Res_supplierResultMap">
select t1.* from (
<include refid="Default" />
)t1
<where><if test="ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere">${ew.sqlSegment}</if></where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">${ew.sqlSegment}</if>
</select>
<!--数据查询[Default]-->
<sql id="Default" databaseId="postgresql">
<![CDATA[ SELECT t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1
]]>
</sql>
<!--数据查询[View]-->
<sql id="View" databaseId="postgresql">
<![CDATA[ SELECT (SELECT array_to_json(array_agg(t.*)) FROM (SELECT m1.CATEGORY_ID as srfkey, m2.NAME AS srfmajortext FROM res_partner_res_partner_category_rel m1 LEFT JOIN RES_PARTNER_CATEGORY m2 ON m1.CATEGORY_ID = m2.ID where m1.partner_id =t1.id ) t) AS CATEGORY_ID, t1.EMAIL, t1.FUNCTION, t1.ID, t1.MOBILE, t1.NAME, t1.PHONE, t1.TYPE, t1.VAT FROM RES_PARTNER t1
]]>
</sql>
</mapper>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册