|
@@ -3,12 +3,12 @@
|
|
|
<mapper namespace="com.caimei365.user.mapper.BaikeProductMapper">
|
|
|
|
|
|
<insert id="insertBaikeProduct" parameterType="com.caimei365.user.model.po.BaikeProductPo" keyProperty="productId" useGeneratedKeys="true">
|
|
|
- insert into cm_baike_product (commodityType, name, alias, discription, seoKeyword, image,
|
|
|
+ insert into cm_baike_product (commodityType, publishSource, shopId, name, alias, discription, seoKeyword, image,
|
|
|
authLink,authQrCode, advantage,disadvantage, principle, brand,
|
|
|
producePlace, marketTime,company, nmpaTime, adaptiveMan,
|
|
|
unAdaptiveMan, aroundOperation,basePv, actualPv, typeId,
|
|
|
topPosition, status,addTime)
|
|
|
- VALUES (#{commodityType}, #{name}, #{alias}, #{discription}, #{seoKeyword}, #{image},
|
|
|
+ VALUES (#{commodityType}, #{publishSource}, #{shopId}, #{name}, #{alias}, #{discription}, #{seoKeyword}, #{image},
|
|
|
#{authLink},#{authQrCode}, #{advantage},#{disadvantage}, #{principle}, #{brand},
|
|
|
#{producePlace}, #{marketTime},#{company}, #{nmpaTime}, #{adaptiveMan},
|
|
|
#{unAdaptiveMan}, #{aroundOperation},#{basePv}, #{actualPv}, #{typeId}, null,
|
|
@@ -89,10 +89,10 @@
|
|
|
typeId,
|
|
|
status
|
|
|
from cm_baike_product
|
|
|
- where id = #{productId}
|
|
|
+ where id = #{productId} and delFlag = 0
|
|
|
</select>
|
|
|
<select id="getBaikeProductTypeList" resultType="com.caimei365.user.model.vo.BaikeProductTypeVo">
|
|
|
- select id as typeId, name as typeName from cm_baike_type where status = 1 order by sort desc,addTime desc
|
|
|
+ select id as typeId, name as typeName from cm_baike_type where status = 1 and typeSort = #{commodityType} order by sort desc,addTime desc
|
|
|
</select>
|
|
|
<select id="getBaikeProductList" resultType="com.caimei365.user.model.vo.BaikeProductListVo">
|
|
|
select p.id as productId,
|
|
@@ -105,7 +105,7 @@
|
|
|
p.status
|
|
|
from cm_baike_product p
|
|
|
left join cm_baike_type cbt on p.typeId = cbt.id
|
|
|
- where shopId = #{shopId} and publishSource = 2
|
|
|
+ where shopId = #{shopId} and publishSource = 2 and commodityType = #{commodityType} and delFlag = 0
|
|
|
<if test="productId != null">
|
|
|
and p.id = #{productId}
|
|
|
</if>
|
|
@@ -121,14 +121,14 @@
|
|
|
order by p.addTime desc
|
|
|
</select>
|
|
|
<select id="getParamList" resultType="com.caimei365.user.model.po.BaikeProductParamPo">
|
|
|
- select productId, name, content from cm_baike_product_param where productId = #{id}
|
|
|
+ select name, content from cm_baike_product_param where productId = #{productId}
|
|
|
</select>
|
|
|
<select id="getImageList" resultType="java.lang.String">
|
|
|
select image from cm_baike_product_image where productId = #{productId} and type = #{imageType}
|
|
|
</select>
|
|
|
<select id="getQuestionList" resultType="com.caimei365.user.model.po.BaikeProductQuestionPo">
|
|
|
- select productId, question, answer
|
|
|
+ select question, answer
|
|
|
from cm_baike_product_question
|
|
|
- where productId = #{id}
|
|
|
+ where productId = #{productId}
|
|
|
</select>
|
|
|
</mapper>
|