|
@@ -108,14 +108,15 @@
|
|
delete from cm_brand_product_type where id = #{productTypeId}
|
|
delete from cm_brand_product_type where id = #{productTypeId}
|
|
</delete>
|
|
</delete>
|
|
<select id="getProductList" resultType="com.caimei.model.vo.ProductListVo">
|
|
<select id="getProductList" resultType="com.caimei.model.vo.ProductListVo">
|
|
- select id as productId,p.name as productName,snCode,p.status,p.auditStatus,p.createTime,cu.name as createBy,
|
|
|
|
|
|
+ select p.id as productId,t.name as productName,snCode,p.status,p.auditStatus,p.createTime,cu.name as createBy,
|
|
au.name as auditBy,p.auditTime,p.invalidReason
|
|
au.name as auditBy,p.auditTime,p.invalidReason
|
|
from cm_brand_auth_product p
|
|
from cm_brand_auth_product p
|
|
|
|
+ left join cm_brand_product_type t on p.productTypeId = t.id
|
|
left join cm_brand_auth_user cu on p.createBy = cu.authUserId
|
|
left join cm_brand_auth_user cu on p.createBy = cu.authUserId
|
|
left join cm_brand_auth_user au on p.auditBy = au.authUserId
|
|
left join cm_brand_auth_user au on p.auditBy = au.authUserId
|
|
where authId = #{authId}
|
|
where authId = #{authId}
|
|
<if test="productName != null and productName != ''">
|
|
<if test="productName != null and productName != ''">
|
|
- and p.name like CONCAT('%',#{productName},'%')
|
|
|
|
|
|
+ and t.name like CONCAT('%',#{productName},'%')
|
|
</if>
|
|
</if>
|
|
<if test="snCode != null and snCode != ''">
|
|
<if test="snCode != null and snCode != ''">
|
|
and snCode like CONCAT('%',#{snCode},'%')
|
|
and snCode like CONCAT('%',#{snCode},'%')
|
|
@@ -186,8 +187,9 @@
|
|
from cm_brand_auth_product
|
|
from cm_brand_auth_product
|
|
</select>
|
|
</select>
|
|
<select id="getWxProductList" resultType="com.caimei.model.vo.WxProductListVo">
|
|
<select id="getWxProductList" resultType="com.caimei.model.vo.WxProductListVo">
|
|
- select p.id as productId,p.authId, p.name as productName,p.snCode,p.image as productImage,a.authParty as clubName
|
|
|
|
|
|
+ select p.id as productId,p.authId, t.name as productName,p.snCode,p.image as productImage,a.authParty as clubName
|
|
from cm_brand_auth_product p
|
|
from cm_brand_auth_product p
|
|
|
|
+ left join cm_brand_product_type t on p.productTypeId = t.id
|
|
left join cm_brand_auth a on p.authId = a.id
|
|
left join cm_brand_auth a on p.authId = a.id
|
|
left join cm_brand_auth_user au on a.authUserId = au.authUserId
|
|
left join cm_brand_auth_user au on a.authUserId = au.authUserId
|
|
where p.productTypeId = #{productTypeId}
|
|
where p.productTypeId = #{productTypeId}
|
|
@@ -205,14 +207,15 @@
|
|
select id from cm_brand where name = #{brand}
|
|
select id from cm_brand where name = #{brand}
|
|
</select>
|
|
</select>
|
|
<select id="getAuthProductList" resultType="com.caimei.model.vo.ProductFormVo">
|
|
<select id="getAuthProductList" resultType="com.caimei.model.vo.ProductFormVo">
|
|
- select p.id as productId,p.name as productName,snCode,cb.name as brandName,image as productImage,certificateImage
|
|
|
|
|
|
+ select p.id as productId,t.name as productName,snCode,cb.name as brandName,image as productImage,certificateImage
|
|
from cm_brand_auth_product p
|
|
from cm_brand_auth_product p
|
|
|
|
+ left join cm_brand_product_type t on p.productTypeId = t.id
|
|
left join cm_brand cb on p.brandId = cb.id
|
|
left join cm_brand cb on p.brandId = cb.id
|
|
where authId = #{authId}
|
|
where authId = #{authId}
|
|
order by createTime desc
|
|
order by createTime desc
|
|
</select>
|
|
</select>
|
|
<select id="getAuthProductByProductId" resultType="com.caimei.module.base.entity.vo.AuthProductVo">
|
|
<select id="getAuthProductByProductId" resultType="com.caimei.module.base.entity.vo.AuthProductVo">
|
|
- select p.name as productName,
|
|
|
|
|
|
+ select t.name as productName,
|
|
p.snCode,
|
|
p.snCode,
|
|
p.pcImage,
|
|
p.pcImage,
|
|
p.appletsImage,
|
|
p.appletsImage,
|
|
@@ -234,6 +237,7 @@
|
|
i.statementLink,
|
|
i.statementLink,
|
|
i.statementImage
|
|
i.statementImage
|
|
from cm_brand_auth_product p
|
|
from cm_brand_auth_product p
|
|
|
|
+ left join cm_brand_product_type t on p.productTypeId = t.id
|
|
left join cm_brand_auth a on p.authId = a.id
|
|
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_user u on a.authUserId = u.authUserId
|
|
left join cm_brand_auth_shop_info i on u.authUserId = i.authUserId and p.brandId = i.brandId
|
|
left join cm_brand_auth_shop_info i on u.authUserId = i.authUserId and p.brandId = i.brandId
|
|
@@ -259,8 +263,9 @@
|
|
where productId = #{productId}
|
|
where productId = #{productId}
|
|
</select>
|
|
</select>
|
|
<select id="getClubProductList" resultType="com.caimei.model.vo.WxProductListVo">
|
|
<select id="getClubProductList" resultType="com.caimei.model.vo.WxProductListVo">
|
|
- select p.id as productId, p.name as productName, p.snCode
|
|
|
|
|
|
+ select p.id as productId, t.name as productName, p.snCode
|
|
from cm_brand_auth_product p
|
|
from cm_brand_auth_product p
|
|
|
|
+ left join cm_brand_product_type t on p.productTypeId = t.id
|
|
where p.authId = #{authId}
|
|
where p.authId = #{authId}
|
|
and p.status = 1
|
|
and p.status = 1
|
|
and p.auditStatus = 1
|
|
and p.auditStatus = 1
|