zhijiezhao 2 年之前
父節點
當前提交
33a0b0743a

+ 388 - 352
src/main/resources/mappings/modules/baike/CmBaikeProductMapper.xml

@@ -2,8 +2,8 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei.modules.baike.dao.CmBaikeProductDao">
 
-	<sql id="cmBaikeProductColumns">
-		a.id AS "id",
+    <sql id="cmBaikeProductColumns">
+        a.id AS "id",
 		a.commodityType AS "commodityType",
 		a.publishSource,
 		s.name as "shopName",
@@ -40,62 +40,62 @@
 		a.recommendType,
 		cbt.name as "typeName",
 		a.labelIds as "labelIds"
-	</sql>
+    </sql>
 
-	<sql id="cmBaikeProductJoins">
-		left join cm_baike_type cbt on a.typeId = cbt.id
+    <sql id="cmBaikeProductJoins">
+        left join cm_baike_type cbt on a.typeId = cbt.id
 		left join shop s on a.shopId = s.shopID
-	</sql>
+    </sql>
 
-	<select id="get" resultType="CmBaikeProduct">
-		SELECT
-			<include refid="cmBaikeProductColumns"/>
-		FROM cm_baike_product a
-		<include refid="cmBaikeProductJoins"/>
-		WHERE a.id = #{id} and delFlag = 0
-	</select>
+    <select id="get" resultType="CmBaikeProduct">
+        SELECT
+        <include refid="cmBaikeProductColumns"/>
+        FROM cm_baike_product a
+        <include refid="cmBaikeProductJoins"/>
+        WHERE a.id = #{id} and delFlag = 0
+    </select>
 
-	<select id="findList" resultType="CmBaikeProduct">
-		SELECT
-			<include refid="cmBaikeProductColumns"/>
-		FROM cm_baike_product a
-		<include refid="cmBaikeProductJoins"/>
-		<where>
-			delFlag = 0
-			<if test="id != null and id != ''">
-				AND a.id = #{id}
-			</if>
-			<if test="name != null and name != ''">
-				AND a.name LIKE
-					<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
-					<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
-					<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
-			</if>
-			<if test="typeId != null and typeId != ''">
-				AND a.typeId = #{typeId}
-			</if>
-			<if test="topFlag != null">
-				<choose>
-					<when test='topFlag == 1'>
-						and topPosition is not null and topPosition != ''
-					</when>
-					<when test='topFlag == 0'>
-						and (topPosition is null or topPosition = '')
-					</when>
-				</choose>
-			</if>
-			<if test="topPosition != null">
-				and topPosition = #{topPosition}
-			</if>
-			<if test="status != null">
-				AND a.status = #{status}
-			</if>
-<!--			<if test="commodityType != null">-->
-<!--				and a.commodityType = #{commodityType}-->
-<!--			</if>-->
-			<if test="publishSource != null">
-				and a.publishSource = #{publishSource}
-			</if>
+    <select id="findList" resultType="CmBaikeProduct">
+        SELECT
+        <include refid="cmBaikeProductColumns"/>
+        FROM cm_baike_product a
+        <include refid="cmBaikeProductJoins"/>
+        <where>
+            delFlag = 0
+            <if test="id != null and id != ''">
+                AND a.id = #{id}
+            </if>
+            <if test="name != null and name != ''">
+                AND a.name LIKE
+                <if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
+                <if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
+                <if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
+            </if>
+            <if test="typeId != null and typeId != ''">
+                AND a.typeId = #{typeId}
+            </if>
+            <if test="topFlag != null">
+                <choose>
+                    <when test='topFlag == 1'>
+                        and topPosition is not null and topPosition != ''
+                    </when>
+                    <when test='topFlag == 0'>
+                        and (topPosition is null or topPosition = '')
+                    </when>
+                </choose>
+            </if>
+            <if test="topPosition != null">
+                and topPosition = #{topPosition}
+            </if>
+            <if test="status != null">
+                AND a.status = #{status}
+            </if>
+            <!--			<if test="commodityType != null">-->
+            <!--				and a.commodityType = #{commodityType}-->
+            <!--			</if>-->
+            <if test="publishSource != null">
+                and a.publishSource = #{publishSource}
+            </if>
             <if test="auditStatus != null">
                 and a.auditStatus = #{auditStatus}
             </if>
@@ -105,315 +105,351 @@
             <if test="shopName != null and shopName != ''">
                 AND s.name LIKE concat('%',#{shopName},'%')
             </if>
-			<if test="productIds != null and productIds != ''">
-				and a.id not in
-				<foreach item="productId" collection="productIds.split(',')" open="(" separator="," close=")">
-					#{productId}
-				</foreach>
-			</if>
-		</where>
-		<choose>
-			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
-				ORDER BY ${page.orderBy}
-			</when>
-			<otherwise>
-				order by a.addTime desc
-			</otherwise>
-		</choose>
-	</select>
+            <if test="productIds != null and productIds != ''">
+                and a.id not in
+                <foreach item="productId" collection="productIds.split(',')" open="(" separator="," close=")">
+                    #{productId}
+                </foreach>
+            </if>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+                order by a.addTime desc
+            </otherwise>
+        </choose>
+    </select>
 
-	<select id="findAllList" resultType="CmBaikeProduct">
-		SELECT
-			<include refid="cmBaikeProductColumns"/>
-		FROM cm_baike_product a
-		<include refid="cmBaikeProductJoins"/>
-		<where>
+    <select id="findAllList" resultType="CmBaikeProduct">
+        SELECT
+        <include refid="cmBaikeProductColumns"/>
+        FROM cm_baike_product a
+        <include refid="cmBaikeProductJoins"/>
+        <where>
 
-		</where>
-		<choose>
-			<when test="page !=null and page.orderBy != null and page.orderBy != ''">
-				ORDER BY ${page.orderBy}
-			</when>
-			<otherwise>
-			</otherwise>
-		</choose>
-	</select>
-	<select id="findParamList" resultType="com.caimei.modules.baike.entity.CmBaikeProductParam">
-		select productId, name, content from cm_baike_product_param where productId = #{id}
-	</select>
-	<select id="findImageList" resultType="java.lang.String">
-		select image from cm_baike_product_image where productId = #{productId} and type = #{imageType}
-	</select>
-	<select id="findQuestionList" resultType="com.caimei.modules.baike.entity.CmBaikeProductQuestion">
-		select productId, question, answer
-		from cm_baike_product_question
-		where productId = #{id}
-	</select>
-	<select id="findTopLength" resultType="java.lang.Integer">
-		select count(*) from cm_baike_product where topPosition is not null and topPosition != ''
-	</select>
+        </where>
+        <choose>
+            <when test="page !=null and page.orderBy != null and page.orderBy != ''">
+                ORDER BY ${page.orderBy}
+            </when>
+            <otherwise>
+            </otherwise>
+        </choose>
+    </select>
+    <select id="findParamList" resultType="com.caimei.modules.baike.entity.CmBaikeProductParam">
+        select productId, name, content
+        from cm_baike_product_param
+        where productId = #{id}
+    </select>
+    <select id="findImageList" resultType="java.lang.String">
+        select image
+        from cm_baike_product_image
+        where productId = #{productId}
+          and type = #{imageType}
+    </select>
+    <select id="findQuestionList" resultType="com.caimei.modules.baike.entity.CmBaikeProductQuestion">
+        select productId, question, answer
+        from cm_baike_product_question
+        where productId = #{id}
+    </select>
+    <select id="findTopLength" resultType="java.lang.Integer">
+        select count(*)
+        from cm_baike_product
+        where topPosition is not null
+          and topPosition != ''
+    </select>
     <select id="findShopList" resultType="com.caimei.modules.user.entity.NewCmShop">
-		select s.shopID,u.name from shop s
-						 LEFT JOIN user u ON u.userID = s.userID where s.status = 90 and u.userID is not null order by s.shopID desc;
-	</select>
+        select s.shopID, u.name
+        from shop s
+                 LEFT JOIN user u ON u.userID = s.userID
+        where s.status = 90
+          and u.userID is not null
+        order by s.shopID desc;
+    </select>
     <select id="checkFileName" resultType="java.lang.Integer">
-		select id from cm_baike_product_file
-		<where>
-			fileName = #{fileName}
-			<if test="productId != null || (fileIds != null and fileIds != '')">
-				and(
-				<if test="productId != null">
-					productId = #{productId}
-				</if>
-				<if test="fileIds != null and fileIds != ''">
-					or id in
-					<foreach collection="fileIds.split(',')" item="fileId" index="index" open="(" separator=","
-							 close=")">
-						#{fileId}
-					</foreach>
-				</if>
-				)
-			</if>
-		</where>
-	</select>
-	<select id="getProductFileById" resultType="com.caimei.modules.baike.entity.CmBaikeProductFile">
-		select productId, fileTitle, fileName, ossName
-		from cm_baike_product_file
-		where id = #{fileId}
-	</select>
-	<select id="findFileList" resultType="com.caimei.modules.baike.entity.CmBaikeProductFile">
-		select id, productId, fileTitle, fileName, ossName
-		from cm_baike_product_file
-		where productId = #{id}
-	</select>
+        select id from cm_baike_product_file
+        <where>
+            fileName = #{fileName}
+            <if test="productId != null || (fileIds != null and fileIds != '')">
+                and(
+                <if test="productId != null">
+                    productId = #{productId}
+                </if>
+                <if test="fileIds != null and fileIds != ''">
+                    or id in
+                    <foreach collection="fileIds.split(',')" item="fileId" index="index" open="(" separator=","
+                             close=")">
+                        #{fileId}
+                    </foreach>
+                </if>
+                )
+            </if>
+        </where>
+    </select>
+    <select id="getProductFileById" resultType="com.caimei.modules.baike.entity.CmBaikeProductFile">
+        select productId, fileTitle, fileName, ossName
+        from cm_baike_product_file
+        where id = #{fileId}
+    </select>
+    <select id="findFileList" resultType="com.caimei.modules.baike.entity.CmBaikeProductFile">
+        select id, productId, fileTitle, fileName, ossName
+        from cm_baike_product_file
+        where productId = #{id}
+    </select>
 
-	<insert id="insert" parameterType="CmBaikeProduct"  keyProperty="id" useGeneratedKeys="true">
-		INSERT INTO cm_baike_product(
-			commodityType,
-			name,
-            shopId,
-			productLink,
-			alias,
-			discription,
-			seoKeyword,
-			image,
-            authLink,
-            authQrCode,
-			advantage,
-			disadvantage,
-			principle,
-			brand,
-			producePlace,
-			marketTime,
-			company,
-			nmpaTime,
-			adaptiveMan,
-			unAdaptiveMan,
-			aroundOperation,
-			publishTime,
-			basePv,
-			actualPv,
-			typeId,
-			emptyNum,
-			status,
-			addTime,
-			labelIds,
-			relatedLabels
-		) VALUES (
-			#{commodityType},
-			#{name},
-			#{shopId},
-			#{productLink},
-			#{alias},
-			#{discription},
-			#{seoKeyword},
-			#{image},
-            #{authLink},
-            #{authQrCode},
-			#{advantage},
-			#{disadvantage},
-			#{principle},
-			#{brand},
-			#{producePlace},
-			#{marketTime},
-			#{company},
-			#{nmpaTime},
-			#{adaptiveMan},
-			#{unAdaptiveMan},
-			#{aroundOperation},
-			#{publishTime},
-			#{basePv},
-			0,
-			#{typeId},
-			#{emptyNum},
-			#{status},
-			NOW(),
-		    #{labelIds},
-			#{labelStr}
-		)
-	</insert>
-	<insert id="insertProductImage">
-		insert into cm_baike_product_image (productId, type, image)
-		values (#{produtId}, #{imageType}, #{authImage})
-	</insert>
-	<insert id="insertProductParam">
-		insert into cm_baike_product_param (productId, name, content)
-		values (#{productId}, #{name}, #{content})
-	</insert>
-	<insert id="insertProductQuestion">
-		insert into cm_baike_product_question (productId, question, answer)
-		values (#{productId}, #{question}, #{answer})
-	</insert>
+    <insert id="insert" parameterType="CmBaikeProduct" keyProperty="id" useGeneratedKeys="true">
+        INSERT INTO cm_baike_product(commodityType,
+                                     name,
+                                     shopId,
+                                     productLink,
+                                     alias,
+                                     discription,
+                                     seoKeyword,
+                                     image,
+                                     authLink,
+                                     authQrCode,
+                                     advantage,
+                                     disadvantage,
+                                     principle,
+                                     brand,
+                                     producePlace,
+                                     marketTime,
+                                     company,
+                                     nmpaTime,
+                                     adaptiveMan,
+                                     unAdaptiveMan,
+                                     aroundOperation,
+                                     publishTime,
+                                     basePv,
+                                     actualPv,
+                                     typeId,
+                                     emptyNum,
+                                     status,
+                                     addTime,
+                                     labelIds,
+                                     relatedLabels)
+        VALUES (#{commodityType},
+                #{name},
+                #{shopId},
+                #{productLink},
+                #{alias},
+                #{discription},
+                #{seoKeyword},
+                #{image},
+                #{authLink},
+                #{authQrCode},
+                #{advantage},
+                #{disadvantage},
+                #{principle},
+                #{brand},
+                #{producePlace},
+                #{marketTime},
+                #{company},
+                #{nmpaTime},
+                #{adaptiveMan},
+                #{unAdaptiveMan},
+                #{aroundOperation},
+                #{publishTime},
+                #{basePv},
+                0,
+                #{typeId},
+                #{emptyNum},
+                #{status},
+                NOW(),
+                #{labelIds},
+                #{labelStr})
+    </insert>
+    <insert id="insertProductImage">
+        insert into cm_baike_product_image (productId, type, image)
+        values (#{produtId}, #{imageType}, #{authImage})
+    </insert>
+    <insert id="insertProductParam">
+        insert into cm_baike_product_param (productId, name, content)
+        values (#{productId}, #{name}, #{content})
+    </insert>
+    <insert id="insertProductQuestion">
+        insert into cm_baike_product_question (productId, question, answer)
+        values (#{productId}, #{question}, #{answer})
+    </insert>
 
-	<insert id="insertProductFile" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
-		insert into cm_baike_product_file(fileTitle, fileName, ossName,ossUrl)
-		values (#{fileTitle}, #{fileName}, #{ossName},#{ossUrl})
-	</insert>
+    <insert id="insertProductFile" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
+        insert into cm_baike_product_file(fileTitle, fileName, ossName, ossUrl)
+        values (#{fileTitle}, #{fileName}, #{ossName}, #{ossUrl})
+    </insert>
 
-	<update id="update">
-		UPDATE cm_baike_product SET
-			name = #{name},
-            shopId = #{shopId},
-            productLink = #{productLink},
-			alias = #{alias},
-			discription = #{discription},
-			seoKeyword = #{seoKeyword},
-			image = #{image},
-            authLink = #{authLink},
-            authQrCode = #{authQrCode},
-			advantage = #{advantage},
-			disadvantage = #{disadvantage},
-			principle = #{principle},
-			brand = #{brand},
-			producePlace = #{producePlace},
-			marketTime = #{marketTime},
-			company = #{company},
-			nmpaTime = #{nmpaTime},
-			adaptiveMan = #{adaptiveMan},
-			unAdaptiveMan = #{unAdaptiveMan},
-			aroundOperation = #{aroundOperation},
-			publishTime = #{publishTime},
-			basePv = #{basePv},
-			typeId = #{typeId},
-			emptyNum = #{emptyNum},
-			<if test="auditFlag != null and auditFlag == 1">
-				<if test="auditStatus != null">
-					auditStatus = #{auditStatus},
-				</if>
-				<if test="onlineStatus != null">
-					onlineStatus = #{onlineStatus},
-				</if>
-				<if test="failReason != null and failReason != ''">
-					failReason = #{failReason},
-				</if>
-			</if>
-		    <if test="labelIds !=null and labelIds!=''">
-				labelIds = #{labelIds},
-			</if>
-		    <if test="labelStr !=null and labelStr !=''">
-				relatedLabels=#{labelStr},
-			</if>
-			status = #{status}
-		WHERE id = #{id}
-	</update>
-	<update id="updateStatus">
-		update cm_baike_product set status = #{status} where id = #{productId}
-	</update>
-	<update id="updateTopPosition">
-		update cm_baike_product set topPosition = #{topPosition} where id = #{id}
-	</update>
-	<update id="auditBaike">
-		update cm_baike_product
-		set auditStatus = #{auditStatus},
-		failReason  = #{failReason}
-		<if test="publishTime != null">
-			,publishTime = #{publishTime}
-		</if>
-		where id = #{id}
-	</update>
-	<update id="offline">
-		update cm_baike_product set onlineStatus = 3 where id = #{id}
-	</update>
-	<update id="updateEmptyNum">
-		update cm_baike_product set emptyNum = #{emptyNum} where id = #{id}
-	</update>
-	<update id="updateProductFile">
-		update cm_baike_product_file
-		set productId = #{productId}
-		where id = #{fileId}
-	</update>
-	<update id="updateRecommendType">
-		update cm_baike_product
-		set recommendType = #{recommendType}
-		where id = #{productId}
-	</update>
+    <update id="update">
+        UPDATE cm_baike_product SET
+        name = #{name},
+        shopId = #{shopId},
+        productLink = #{productLink},
+        alias = #{alias},
+        discription = #{discription},
+        seoKeyword = #{seoKeyword},
+        image = #{image},
+        authLink = #{authLink},
+        authQrCode = #{authQrCode},
+        advantage = #{advantage},
+        disadvantage = #{disadvantage},
+        principle = #{principle},
+        brand = #{brand},
+        producePlace = #{producePlace},
+        marketTime = #{marketTime},
+        company = #{company},
+        nmpaTime = #{nmpaTime},
+        adaptiveMan = #{adaptiveMan},
+        unAdaptiveMan = #{unAdaptiveMan},
+        aroundOperation = #{aroundOperation},
+        publishTime = #{publishTime},
+        basePv = #{basePv},
+        typeId = #{typeId},
+        emptyNum = #{emptyNum},
+        <if test="auditFlag != null and auditFlag == 1">
+            <if test="auditStatus != null">
+                auditStatus = #{auditStatus},
+            </if>
+            <if test="onlineStatus != null">
+                onlineStatus = #{onlineStatus},
+            </if>
+            <if test="failReason != null and failReason != ''">
+                failReason = #{failReason},
+            </if>
+        </if>
+        labelIds = #{labelIds},
+        relatedLabels=#{labelStr},
+        status = #{status}
+        WHERE id = #{id}
+    </update>
+    <update id="updateStatus">
+        update cm_baike_product
+        set status = #{status}
+        where id = #{productId}
+    </update>
+    <update id="updateTopPosition">
+        update cm_baike_product
+        set topPosition = #{topPosition}
+        where id = #{id}
+    </update>
+    <update id="auditBaike">
+        update cm_baike_product
+        set auditStatus = #{auditStatus},
+        failReason = #{failReason}
+        <if test="publishTime != null">
+            ,publishTime = #{publishTime}
+        </if>
+        where id = #{id}
+    </update>
+    <update id="offline">
+        update cm_baike_product
+        set onlineStatus = 3
+        where id = #{id}
+    </update>
+    <update id="updateEmptyNum">
+        update cm_baike_product
+        set emptyNum = #{emptyNum}
+        where id = #{id}
+    </update>
+    <update id="updateProductFile">
+        update cm_baike_product_file
+        set productId = #{productId}
+        where id = #{fileId}
+    </update>
+    <update id="updateRecommendType">
+        update cm_baike_product
+        set recommendType = #{recommendType}
+        where id = #{productId}
+    </update>
 
-	<delete id="delete">
-		DELETE FROM cm_baike_product
-		WHERE id = #{id}
-	</delete>
+    <delete id="delete">
+        DELETE
+        FROM cm_baike_product
+        WHERE id = #{id}
+    </delete>
     <delete id="deleteParamsByProductId">
-		delete from cm_baike_product_param where productId = #{id}
-	</delete>
-	<delete id="deleteImagesByProductId">
-		delete from cm_baike_product_image where productId = #{id}
-	</delete>
-	<delete id="deleteQuestionsByProductId">
-		delete from cm_baike_product_question where productId = #{id}
-	</delete>
-	<delete id="delMaterialinfoBYProductId">
-		delete from cm_baike_reference_info where productId=#{id}
-	</delete>
-	<delete id="delTextListByEntryId">
-		delete from cm_baike_text_info where productId=#{id}
-	</delete>
-	<delete id="deleteProductFile">
-		delete from cm_baike_product_file where id = #{fileId}
-	</delete>
-	<select id="getTextInfo" resultType="com.caimei.modules.baike.entity.CmBaikeTextInfo">
-		select * from cm_baike_text_info where productId=#{productId}
-	</select>
+        delete
+        from cm_baike_product_param
+        where productId = #{id}
+    </delete>
+    <delete id="deleteImagesByProductId">
+        delete
+        from cm_baike_product_image
+        where productId = #{id}
+    </delete>
+    <delete id="deleteQuestionsByProductId">
+        delete
+        from cm_baike_product_question
+        where productId = #{id}
+    </delete>
+    <delete id="delMaterialinfoBYProductId">
+        delete
+        from cm_baike_reference_info
+        where productId = #{id}
+    </delete>
+    <delete id="delTextListByEntryId">
+        delete
+        from cm_baike_text_info
+        where productId = #{id}
+    </delete>
+    <delete id="deleteProductFile">
+        delete
+        from cm_baike_product_file
+        where id = #{fileId}
+    </delete>
+    <select id="getTextInfo" resultType="com.caimei.modules.baike.entity.CmBaikeTextInfo">
+        select *
+        from cm_baike_text_info
+        where productId = #{productId}
+    </select>
 
-	<insert id="saveMaterialinfo">
-		insert into
-		    cm_baike_reference_info(referenceType, website, articleName,websiteName,publishTime,acitationTime,author,workName,publicationPlace,press,publicationYear,acitationWeb,referenceDescription,imageDescription,imageUrl,productId,productType,ctrlId)
-		values (#{referenceType}, #{website}, #{articleName},#{websiteName},#{publishTimeStr},#{acitationTimeStr},#{author},#{workName},#{publicationPlace},#{press},#{publicationYearStr},#{acitationWeb},#{referenceDescription},#{imageDescription},#{imageUrl},#{productId},#{productType},#{ctrlId})
-	</insert>
-	<update id="upMaterialinfo">
-		update cm_baike_reference_info
-		set
-			referenceType=#{referenceType},
-			website=#{website},
-			articleName=#{articleName},
-			websiteName=#{websiteName},
-			publishTime=#{publishTimeStr},
-			acitationTime=#{acitationTimeStr},
-			author=#{author},
-			workName=#{workName},
-			publicationPlace=#{publicationPlace},
-			press=#{press},
-			publicationYear=#{publicationYearStr},
-			acitationWeb=#{acitationWeb},
-			referenceDescription=#{referenceDescription},
-			imageDescription=#{imageDescription},
-			imageUrl=#{imageUrl}
-			where id=#{id}
-	</update>
+    <insert id="saveMaterialinfo">
+        insert into cm_baike_reference_info(referenceType, website, articleName, websiteName, publishTime,
+                                            acitationTime, author, workName, publicationPlace, press, publicationYear,
+                                            acitationWeb, referenceDescription, imageDescription, imageUrl, productId,
+                                            productType, ctrlId)
+        values (#{referenceType}, #{website}, #{articleName}, #{websiteName}, #{publishTimeStr}, #{acitationTimeStr},
+                #{author}, #{workName}, #{publicationPlace}, #{press}, #{publicationYearStr}, #{acitationWeb},
+                #{referenceDescription}, #{imageDescription}, #{imageUrl}, #{productId}, #{productType}, #{ctrlId})
+    </insert>
+    <update id="upMaterialinfo">
+        update cm_baike_reference_info
+        set referenceType=#{referenceType},
+            website=#{website},
+            articleName=#{articleName},
+            websiteName=#{websiteName},
+            publishTime=#{publishTimeStr},
+            acitationTime=#{acitationTimeStr},
+            author=#{author},
+            workName=#{workName},
+            publicationPlace=#{publicationPlace},
+            press=#{press},
+            publicationYear=#{publicationYearStr},
+            acitationWeb=#{acitationWeb},
+            referenceDescription=#{referenceDescription},
+            imageDescription=#{imageDescription},
+            imageUrl=#{imageUrl}
+        where id = #{id}
+    </update>
 
-	<insert id="insertText">
-		insert into cm_baike_text_info(textType,productId,dictionaryContent,referenceId,parentId,dictionaryType)
-		values(#{textType},#{productId},#{dictionaryContent},#{referenceId},#{parentId},#{dictionaryType})
-	</insert>
-	<select id="getMaterialInfo" resultType="com.caimei.modules.baike.entity.CmBaikeReferenceInfo">
-		select * from cm_baike_reference_info where productId=#{productId}
-	</select>
+    <insert id="insertText">
+        insert into cm_baike_text_info(textType, productId, dictionaryContent, referenceId, parentId, dictionaryType)
+        values (#{textType}, #{productId}, #{dictionaryContent}, #{referenceId}, #{parentId}, #{dictionaryType})
+    </insert>
+    <select id="getMaterialInfo" resultType="com.caimei.modules.baike.entity.CmBaikeReferenceInfo">
+        select *
+        from cm_baike_reference_info
+        where productId = #{productId}
+    </select>
 
-	<delete id="delMaterialinfo">
-		delete from cm_baike_reference_info where id=#{id}
-	</delete>
-	<select id="getMaterialinfo" resultType="com.caimei.modules.baike.entity.CmBaikeReferenceInfo">
-		select * from cm_baike_reference_info
+    <delete id="delMaterialinfo">
+        delete
+        from cm_baike_reference_info
+        where id = #{id}
+    </delete>
+    <select id="getMaterialinfo" resultType="com.caimei.modules.baike.entity.CmBaikeReferenceInfo">
+        select *
+        from cm_baike_reference_info
 
-		where id=#{id}
-	</select>
+        where id = #{id}
+    </select>
 </mapper>

+ 0 - 4
src/main/resources/mappings/modules/product/ProductMapper.xml

@@ -1714,12 +1714,8 @@
             <if test="qualificationLink !=null and qualificationLink!=''">
                 qualificationLink=#{qualificationLink},
             </if>
-            <if test="labelIds !=null and labelIds != ''">
                 labelIds=#{labelIds},
-            </if>
-            <if test="relatedLabels!=null and relatedLabels !=''">
                 relatedLabels=#{relatedLabels},
-            </if>
             newProductType=#{newProductType},
             showFlag=#{showFlag},
             announType=#{announType},

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/archive/cmProductArchiveForm.jsp

@@ -298,6 +298,7 @@
     function initLabelSelects(){
         var labelSelectBox = $('#labelSelectBox');
         labelSelectBox.selectpicker({
+            liveSearch: true,
             noneSelectedText: '请选择标签库',
             maxOptions: 6,
             maxOptionsText: '最多选取6个标签库'

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/baikePage/cmBaikeProductForm.jsp

@@ -1798,6 +1798,7 @@
 		console.log(cccc);
 		var labelSelectBox = $('#labelSelectBox');
 		labelSelectBox.selectpicker({
+			liveSearch: true,
 			noneSelectedText: '请选择标签库',
 			maxOptions: 6,
 			maxOptionsText: '最多选取6个标签库'

+ 1 - 0
src/main/webapp/WEB-INF/views/modules/info/infoForm.jsp

@@ -376,6 +376,7 @@
         });
         var labelSelectBox = $('#labelSelectBox');
         labelSelectBox.selectpicker({
+            liveSearch: true,
             noneSelectedText: '请选择标签库',
             maxOptions: 6,
             maxOptionsText: '最多选取6个标签库'

+ 3 - 0
src/main/webapp/WEB-INF/views/modules/product-new/productEdit.jsp

@@ -1114,6 +1114,7 @@
     function initLabelSelects(){
         var labelSelectBox = $('#labelSelectBox');
         labelSelectBox.selectpicker({
+            liveSearch: true,
             noneSelectedText: '请选择标签库',
             maxOptions: 6,
             maxOptionsText: '最多选取6个标签库'
@@ -1468,6 +1469,8 @@
         var serviceInfo = serviceInfoEditor.getData();
         $("#serviceInfo").val(serviceInfo);
         console.log(serviceInfo);
+        debugger
+        const array = $('#labelSelectBox').selectpicker('val')
     }