|
@@ -5,10 +5,10 @@
|
|
<!--插入数据-->
|
|
<!--插入数据-->
|
|
<!--int insert(Product product);-->
|
|
<!--int insert(Product product);-->
|
|
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
|
- insert into product (product_name, market_time, company_name, tenant_id, product_explain,
|
|
|
|
- product_category_id, license_rate, create_person_id, create_person_name)
|
|
|
|
- values (#{productName}, #{marketTime}, #{companyName}, #{tenantId}, #{productExplain}, #{productCategoryId},
|
|
|
|
- #{licenseRate}, #{createPersonId}, #{createPersonName});
|
|
|
|
|
|
+ insert into product (product_name, market_time, company_name, tenant_id, create_person_tenant_id,
|
|
|
|
+ product_explain, product_category_id, license_rate, create_person_id, create_person_name)
|
|
|
|
+ values (#{productName}, #{marketTime}, #{companyName}, #{tenantId}, #{createPersonTenantId}, #{productExplain},
|
|
|
|
+ #{productCategoryId}, #{licenseRate}, #{createPersonId}, #{createPersonName});
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!--根据id删除产品-->
|
|
<!--根据id删除产品-->
|
|
@@ -24,13 +24,15 @@
|
|
<update id="updateById">
|
|
<update id="updateById">
|
|
update product
|
|
update product
|
|
<set>
|
|
<set>
|
|
-
|
|
|
|
product_name = #{productName},
|
|
product_name = #{productName},
|
|
market_time = #{marketTime},
|
|
market_time = #{marketTime},
|
|
company_name = #{companyName},
|
|
company_name = #{companyName},
|
|
<if test="tenantId != null">
|
|
<if test="tenantId != null">
|
|
tenant_id = #{tenantId},
|
|
tenant_id = #{tenantId},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="createPersonTenantId != null">
|
|
|
|
+ create_person_tenant_id = #{createPersonTenantId},
|
|
|
|
+ </if>
|
|
product_explain = #{productExplain},
|
|
product_explain = #{productExplain},
|
|
product_category_id = #{productCategoryId},
|
|
product_category_id = #{productCategoryId},
|
|
license_rate = #{licenseRate},
|
|
license_rate = #{licenseRate},
|
|
@@ -97,6 +99,7 @@
|
|
market_time,
|
|
market_time,
|
|
company_name,
|
|
company_name,
|
|
p.tenant_id,
|
|
p.tenant_id,
|
|
|
|
+ create_person_tenant_id,
|
|
product_explain,
|
|
product_explain,
|
|
product_category_id,
|
|
product_category_id,
|
|
p.license_rate,
|
|
p.license_rate,
|
|
@@ -120,7 +123,7 @@
|
|
'%${productCategoryName}%')
|
|
'%${productCategoryName}%')
|
|
</if>
|
|
</if>
|
|
<if test="true">
|
|
<if test="true">
|
|
- and p.tenant_id = #{tenantId}
|
|
|
|
|
|
+ and create_person_tenant_id = #{createPersonTenantId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
order by
|
|
order by
|
|
@@ -218,7 +221,7 @@
|
|
<select id="queryByGroupProductCategoryId" resultMap="queryByGroupProductCategoryIdMap">
|
|
<select id="queryByGroupProductCategoryId" resultMap="queryByGroupProductCategoryIdMap">
|
|
select product_category_id pci,
|
|
select product_category_id pci,
|
|
product_category_name,
|
|
product_category_name,
|
|
- p.tenant_id pTenantId,
|
|
|
|
|
|
+ p.create_person_tenant_id pCreatePersonTenantId,
|
|
ifnull(#{orderBy}, '') orderBy,
|
|
ifnull(#{orderBy}, '') orderBy,
|
|
ifnull(#{orderType}, '') orderType,
|
|
ifnull(#{orderType}, '') orderType,
|
|
ifnull(#{productName}, '') productName,
|
|
ifnull(#{productName}, '') productName,
|
|
@@ -247,7 +250,7 @@
|
|
'%${productCategoryName}%')
|
|
'%${productCategoryName}%')
|
|
</if>
|
|
</if>
|
|
<if test="true">
|
|
<if test="true">
|
|
- and p.tenant_id = #{tenantId}
|
|
|
|
|
|
+ and p.create_person_tenant_id = #{createPersonTenantId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
group by product_category_id
|
|
group by product_category_id
|
|
@@ -260,7 +263,7 @@
|
|
<collection property="products" ofType="cn.cslg.pas.common.model.vo.ProductVO"
|
|
<collection property="products" ofType="cn.cslg.pas.common.model.vo.ProductVO"
|
|
select="queryByGroupProductCategoryId2"
|
|
select="queryByGroupProductCategoryId2"
|
|
column="{pci=pci, orderBy=orderBy, orderType=orderType, productName=productName, companyName=companyName,
|
|
column="{pci=pci, orderBy=orderBy, orderType=orderType, productName=productName, companyName=companyName,
|
|
- patentNo=patentNo, productCategoryId=productCategoryId, productCategoryName=productCategoryName, pTenantId=pTenantId}">
|
|
|
|
|
|
+ patentNo=patentNo, productCategoryId=productCategoryId, productCategoryName=productCategoryName, pCreatePersonTenantId=pCreatePersonTenantId}">
|
|
</collection>
|
|
</collection>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
@@ -300,7 +303,7 @@
|
|
and product_category_id = #{pci}
|
|
and product_category_id = #{pci}
|
|
</if>
|
|
</if>
|
|
<if test="true">
|
|
<if test="true">
|
|
- and p.tenant_id = #{pTenantId}
|
|
|
|
|
|
+ and p.create_person_tenant_id = #{pCreatePersonTenantId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
order by
|
|
order by
|
|
@@ -318,7 +321,7 @@
|
|
<!--List<ProductGroupVO> queryByGroupCompanyName(ProductQueryPageDTO productQueryPageDTO);-->
|
|
<!--List<ProductGroupVO> queryByGroupCompanyName(ProductQueryPageDTO productQueryPageDTO);-->
|
|
<select id="queryByGroupCompanyName" resultMap="queryByGroupCompanyNameMap">
|
|
<select id="queryByGroupCompanyName" resultMap="queryByGroupCompanyNameMap">
|
|
select company_name cn,
|
|
select company_name cn,
|
|
- tenant_id pTenantId,
|
|
|
|
|
|
+ create_person_tenant_id CreatePersonTenantId,
|
|
ifnull(#{orderBy}, '') orderBy,
|
|
ifnull(#{orderBy}, '') orderBy,
|
|
ifnull(#{orderType}, '') orderType,
|
|
ifnull(#{orderType}, '') orderType,
|
|
ifnull(#{productName}, '') productName,
|
|
ifnull(#{productName}, '') productName,
|
|
@@ -349,7 +352,7 @@
|
|
and company_name is not null
|
|
and company_name is not null
|
|
</if>
|
|
</if>
|
|
<if test="true">
|
|
<if test="true">
|
|
- and tenant_id = #{tenantId}
|
|
|
|
|
|
+ and create_person_tenant_id = #{createPersonTenantId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
group by company_name
|
|
group by company_name
|
|
@@ -361,7 +364,7 @@
|
|
<collection property="products" ofType="cn.cslg.pas.common.model.vo.ProductVO"
|
|
<collection property="products" ofType="cn.cslg.pas.common.model.vo.ProductVO"
|
|
select="queryByGroupCompanyNameMap2"
|
|
select="queryByGroupCompanyNameMap2"
|
|
column="{cn=cn, orderBy=orderBy, orderType=orderType, productName=productName, companyName=companyName,
|
|
column="{cn=cn, orderBy=orderBy, orderType=orderType, productName=productName, companyName=companyName,
|
|
- patentNo=patentNo, productCategoryId=productCategoryId, productCategoryName=productCategoryName, pTenantId=pTenantId}">
|
|
|
|
|
|
+ patentNo=patentNo, productCategoryId=productCategoryId, productCategoryName=productCategoryName, CreatePersonTenantId=CreatePersonTenantId}">
|
|
</collection>
|
|
</collection>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
@@ -401,7 +404,7 @@
|
|
and company_name = #{cn}
|
|
and company_name = #{cn}
|
|
</if>
|
|
</if>
|
|
<if test="true">
|
|
<if test="true">
|
|
- and p.tenant_id = #{pTenantId}
|
|
|
|
|
|
+ and p.create_person_tenant_id = #{CreatePersonTenantId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
order by
|
|
order by
|