|
@@ -593,23 +593,39 @@
|
|
|
from bigtype
|
|
|
where bigTypeID = #{bigTypeID}
|
|
|
</select>
|
|
|
- <select id="findAuthProductDetailsByProductId" resultType="com.caimei.module.base.entity.vo.AuthProductVo">
|
|
|
- select bap.name,bap.snCode,bap.image,bap.certificateImage,cb.authLogo,cb.name as brandName,c.name as productionPlace,
|
|
|
- ba.id as authId,ba.securityLink,ba.agentFlag,ba.agentName,ba.statementType,ba.statementContent,
|
|
|
- ba.statementLink,ba.statementImage,ba.authParty
|
|
|
- from cm_brand_auth_product bap
|
|
|
- left join cm_brand_auth ba on bap.authId = ba.id
|
|
|
- left join cm_brand cb on ba.brandId = cb.id
|
|
|
- left join country c on ba.countryId = c.countryId
|
|
|
- where bap.id = #{productId}
|
|
|
+ <select id="findAuthProductByProductId" resultType="com.caimei.module.base.entity.vo.AuthProductVo">
|
|
|
+ select p.name as productName,
|
|
|
+ p.snCode,
|
|
|
+ p.image as productImage,
|
|
|
+ p.certificateImage,
|
|
|
+ b.authLogo,
|
|
|
+ b.name as brandName,
|
|
|
+ c.name as productionPlace,
|
|
|
+ a.id as authId,
|
|
|
+ a.authParty,
|
|
|
+ u.authUserId as authUserId,
|
|
|
+ u.name as shopName,
|
|
|
+ i.securityLink,
|
|
|
+ i.type as shopType,
|
|
|
+ i.statementType,
|
|
|
+ i.statementContent,
|
|
|
+ i.statementLink,
|
|
|
+ i.statementImage
|
|
|
+ from cm_brand_auth_product p
|
|
|
+ left join cm_brand_auth a on p.authId = a.id
|
|
|
+ left join cm_brand_auth_user u on a.authUserId = u.authUserId
|
|
|
+ left join cm_brand_auth_shop_info i on u.authUserId = i.authUserId
|
|
|
+ left join cm_brand b on i.brandId = b.id
|
|
|
+ left join country c on i.countryId = c.countryId
|
|
|
+ where p.id = #{productId} and p.status = 1
|
|
|
</select>
|
|
|
<select id="getParamsByProductId" resultType="com.caimei.module.base.entity.po.CmBrandProductParamPo">
|
|
|
select name,content from cm_brand_product_param where productId = #{productId}
|
|
|
</select>
|
|
|
- <select id="findStatementFileByAuthId" resultType="com.caimei.module.base.entity.vo.StatementFileVo">
|
|
|
+ <select id="findStatementFileByAuthUserId" resultType="com.caimei.module.base.entity.vo.StatementFileVo">
|
|
|
select name,ossName,md5Hex,uploadTime
|
|
|
from cm_brand_auth_file
|
|
|
- where brandAuthId = #{authId}
|
|
|
+ where authUserId = #{authUserId}
|
|
|
limit 1
|
|
|
</select>
|
|
|
</mapper>
|