|
|
@ -2,14 +2,13 @@
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
|
|
|
|
|
|
|
|
<mapper namespace="com.glxp.api.dao.basic.CompanyProductRelevanceDao">
|
|
|
|
<mapper namespace="com.glxp.api.dao.basic.CompanyProductRelevanceDao">
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertCompanyProductRelevance"
|
|
|
|
<insert id="insertCompanyProductRelevance"
|
|
|
|
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
|
|
|
|
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
|
|
|
|
replace
|
|
|
|
replace
|
|
|
|
INTO company_product_relevance(customerId, productId, enterpriseId, registrationId,
|
|
|
|
INTO company_product_relevance(customerId, productId, enterpriseId, registrationId,
|
|
|
|
createTime,updateTime,auditStatus,productUuid,udiRlIdFk,unitFk,price) values
|
|
|
|
createTime, updateTime, auditStatus, productUuid, udiRlIdFk, unitFk,
|
|
|
|
(
|
|
|
|
price)
|
|
|
|
#{customerId},
|
|
|
|
values (#{customerId},
|
|
|
|
#{productId},
|
|
|
|
#{productId},
|
|
|
|
#{enterpriseId},
|
|
|
|
#{enterpriseId},
|
|
|
|
#{registrationId},
|
|
|
|
#{registrationId},
|
|
|
@ -18,8 +17,7 @@
|
|
|
|
#{auditStatus},
|
|
|
|
#{auditStatus},
|
|
|
|
#{productUuid},
|
|
|
|
#{productUuid},
|
|
|
|
#{udiRlIdFk},
|
|
|
|
#{udiRlIdFk},
|
|
|
|
#{unitFk},#{price}
|
|
|
|
#{unitFk}, #{price})
|
|
|
|
)
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -27,9 +25,9 @@
|
|
|
|
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
|
|
|
|
parameterType="com.glxp.api.entity.basic.CompanyProductRelevanceEntity">
|
|
|
|
replace
|
|
|
|
replace
|
|
|
|
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
|
|
|
|
INTO company_product_relevance(id, customerId, productId, enterpriseId, registrationId,
|
|
|
|
create_time,update_time,auditStatus,productUuid,udiRlIdFk,unitFk,price) values
|
|
|
|
create_time, update_time, auditStatus, productUuid, udiRlIdFk, unitFk,
|
|
|
|
(
|
|
|
|
price)
|
|
|
|
#{id},
|
|
|
|
values (#{id},
|
|
|
|
#{customerId},
|
|
|
|
#{customerId},
|
|
|
|
#{productId},
|
|
|
|
#{productId},
|
|
|
|
#{enterpriseId},
|
|
|
|
#{enterpriseId},
|
|
|
@ -39,8 +37,7 @@
|
|
|
|
#{auditStatus},
|
|
|
|
#{auditStatus},
|
|
|
|
#{productUuid},
|
|
|
|
#{productUuid},
|
|
|
|
#{udiRlIdFk},
|
|
|
|
#{udiRlIdFk},
|
|
|
|
#{unitFk},#{price}
|
|
|
|
#{unitFk}, #{price})
|
|
|
|
)
|
|
|
|
|
|
|
|
</insert>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
<delete id="deleteById" parameterType="Map">
|
|
|
|
<delete id="deleteById" parameterType="Map">
|
|
|
@ -58,8 +55,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<select id="filterUdiGp" parameterType="com.glxp.api.req.basic.CompanyProductRelevanceRequest"
|
|
|
|
<select id="filterUdiGp" parameterType="com.glxp.api.req.basic.CompanyProductRelevanceRequest"
|
|
|
|
resultType="com.glxp.api.res.basic.CompanyProductRelevanceResponse">
|
|
|
|
resultType="com.glxp.api.res.basic.CompanyProductRelevanceResponse">
|
|
|
|
SELECT
|
|
|
|
SELECT company_product_relevance.id,
|
|
|
|
company_product_relevance.id,
|
|
|
|
|
|
|
|
company_product_relevance.customerId,
|
|
|
|
company_product_relevance.customerId,
|
|
|
|
company_product_relevance.auditStatus,
|
|
|
|
company_product_relevance.auditStatus,
|
|
|
|
basic_udirel.thirdId,
|
|
|
|
basic_udirel.thirdId,
|
|
|
@ -120,8 +116,7 @@
|
|
|
|
basic_products.basicPrductRemak6,
|
|
|
|
basic_products.basicPrductRemak6,
|
|
|
|
basic_products.basicPrductRemak7,
|
|
|
|
basic_products.basicPrductRemak7,
|
|
|
|
basic_products.basicPrductRemak8
|
|
|
|
basic_products.basicPrductRemak8
|
|
|
|
FROM
|
|
|
|
FROM company_product_relevance
|
|
|
|
company_product_relevance
|
|
|
|
|
|
|
|
INNER JOIN basic_udirel ON company_product_relevance.udiRlIdFk = basic_udirel.id
|
|
|
|
INNER JOIN basic_udirel ON company_product_relevance.udiRlIdFk = basic_udirel.id
|
|
|
|
INNER JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
|
|
|
|
INNER JOIN basic_products ON basic_udirel.uuid = basic_products.uuid
|
|
|
|
INNER JOIN customer_info ON customer_info.customerId = company_product_relevance.customerId
|
|
|
|
INNER JOIN customer_info ON customer_info.customerId = company_product_relevance.customerId
|
|
|
@ -175,19 +170,24 @@
|
|
|
|
AND basic_products.originUuid is NULL
|
|
|
|
AND basic_products.originUuid is NULL
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="filterType != null and filterType == 3">
|
|
|
|
<if test="filterType != null and filterType == 3">
|
|
|
|
AND mainId is NULL and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
AND mainId is NULL
|
|
|
|
|
|
|
|
and basic_products.originUuid <![CDATA[<>]]> ''
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="filterType != null and filterType == 4">
|
|
|
|
<if test="filterType != null and filterType == 4">
|
|
|
|
AND thirdId1 is NULL and basic_products.flbm <![CDATA[<>]]> ''
|
|
|
|
AND thirdId1 is NULL
|
|
|
|
|
|
|
|
and basic_products.flbm <![CDATA[<>]]> ''
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="filterType != null and filterType == 5">
|
|
|
|
<if test="filterType != null and filterType == 5">
|
|
|
|
AND thirdId2 is NULL and basic_products.flbm <![CDATA[<>]]> ''
|
|
|
|
AND thirdId2 is NULL
|
|
|
|
|
|
|
|
and basic_products.flbm <![CDATA[<>]]> ''
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="filterType != null and filterType == 6">
|
|
|
|
<if test="filterType != null and filterType == 6">
|
|
|
|
AND thirdId3 is NULL and basic_products.flbm <![CDATA[<>]]> ''
|
|
|
|
AND thirdId3 is NULL
|
|
|
|
|
|
|
|
and basic_products.flbm <![CDATA[<>]]> ''
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="filterType != null and filterType == 7">
|
|
|
|
<if test="filterType != null and filterType == 7">
|
|
|
|
AND thirdId4 is NULL and basic_products.flbm <![CDATA[<>]]> ''
|
|
|
|
AND thirdId4 is NULL
|
|
|
|
|
|
|
|
and basic_products.flbm <![CDATA[<>]]> ''
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="filterType != null and filterType == 10">
|
|
|
|
<if test="filterType != null and filterType == 10">
|
|
|
|
AND basic_udirel.updateTime is NULL
|
|
|
|
AND basic_udirel.updateTime is NULL
|
|
|
@ -214,11 +214,13 @@
|
|
|
|
<if test="unitFk != null and unitFk != ''">
|
|
|
|
<if test="unitFk != null and unitFk != ''">
|
|
|
|
and unitFk = #{unitFk}
|
|
|
|
and unitFk = #{unitFk}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="originUuid != null and originUuid != ''">
|
|
|
|
|
|
|
|
and originUuid = #{originUuid}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
<if test="isDisable == false">
|
|
|
|
<if test="isDisable == false">
|
|
|
|
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false)
|
|
|
|
AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false)
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
ORDER BY company_product_relevance.updateTime DESC
|
|
|
|
ORDER BY company_product_relevance.updateTime DESC
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|