Răsfoiți Sursa

Merge remote-tracking branch 'origin/red' into red

zhangxin 2 ani în urmă
părinte
comite
8143fee23c

+ 5 - 10
ruoyi-post/src/main/resources/mapper/PostCollectionMapper.xml

@@ -32,19 +32,14 @@
                start_time,
                end_time,
                series_name,
-               del_flag,
-               create_by,
-               create_time,
-               update_by,
-               update_time,
-               remark
+               del_flag
         from post_collection
+        where del_flag = '0'
     </sql>
     <!--查询藏品列表-->
     <select id="selectPostCollectionList" parameterType="PostCollection" resultMap="PostCollectionResult">
         <include refid="selectPostCollectionVo"/>
         <where>
-            and del_flag = '0'
             <if test="collectionName != null  and collectionName != ''">and collection_name like concat('%',
                 #{collectionName}, '%')
             </if>
@@ -63,7 +58,7 @@
     <!--    ID查询藏品-->
     <select id="selectPostCollectionByCollectionId" parameterType="Long" resultMap="PostCollectionResult">
         <include refid="selectPostCollectionVo"/>
-        where collection_id = #{collectionId}
+        and collection_id = #{collectionId}
     </select>
     <!--        添加藏品-->
     <insert id="insertPostCollection" parameterType="PostCollection" useGeneratedKeys="true" keyProperty="collectionId">
@@ -125,13 +120,13 @@
     <!--ID删除藏品-->
     <update id="deletePostCollectionByCollectionId" parameterType="Long">
         update
-        post_collection
+            post_collection
         set del_flag = '1'
         where collection_id = #{collectionId}
     </update>
     <!--批量删除-->
     <update id="deletePostCollectionByCollectionIds" parameterType="String">
-        update  post_collection  set del_flag = '1'  where collection_id in
+        update post_collection set del_flag = '1' where collection_id in
         <foreach item="collectionId" collection="array" open="(" separator="," close=")">
             #{collectionId}
         </foreach>

+ 21 - 15
ruoyi-post/src/main/resources/mapper/PostPublisherMapper.xml

@@ -30,13 +30,9 @@
                publisher_phonenumber,
                status,
                publisher_address,
-               del_flag,
-               create_by,
-               create_time,
-               update_by,
-               update_time,
-               remark
+               del_flag
         from post_publisher
+        where del_flag = '0'
     </sql>
     <!--查询发行方列表-->
     <select id="selectPostPublisherList" parameterType="PostPublisher" resultMap="PostPublisherResult">
@@ -60,7 +56,7 @@
     <!--查询单个用户-->
     <select id="selectPostPublisherByPublisherId" parameterType="Long" resultMap="PostPublisherResult">
         <include refid="selectPostPublisherVo"/>
-        where publisher_id = #{publisherId}
+        and publisher_id = #{publisherId}
     </select>
     <!--添加发行方信息-->
     <insert id="insertPostPublisher" parameterType="PostPublisher" useGeneratedKeys="true" keyProperty="publisherId">
@@ -118,23 +114,33 @@
     </update>
     <!--发行方ID删除-->
     <delete id="deletePostPublisherByPublisherId" parameterType="Long">
-        delete
-        from post_publisher
-        where publisher_id = #{publisherId}
+        --         delete
+--         from post_publisher
+--         where publisher_id = #{publisherId}
+        update post_publisher
+        set del_flag = '1'
+        where user_id = #{userId}
     </delete>
     <!--批量删除-->
     <delete id="deletePostPublisherByPublisherIds" parameterType="String">
-        delete from post_publisher where publisher_id in
+        -- delete from post_publisher where publisher_id in
+        update post_publisher
+        set del_flag = '1'
+        where publisher_id in
         <foreach item="publisherId" collection="array" open="(" separator="," close=")">
             #{publisherId}
         </foreach>
     </delete>
-<!--    账号是否重复-->
+    <!--    账号是否重复-->
     <select id="checkPublisherNameUnique" parameterType="String" resultMap="PostPublisherResult">
-        select publisher_id,publisher_name from post_publisher where publisher_name = #{publisherName} limit 1
+        select publisher_id, publisher_name
+        from post_publisher
+        where publisher_name = #{publisherName} limit 1
     </select>
-<!--    头像是否重复-->
+    <!--    头像是否重复-->
     <select id="checkImageUnique" parameterType="String" resultMap="PostPublisherResult">
-        select publisher_id, publisher_image from post_publisher where publisher_image = #{publisherImage} limit 1
+        select publisher_id, publisher_image
+        from post_publisher
+        where publisher_image = #{publisherImage} limit 1
     </select>
 </mapper>

+ 4 - 9
ruoyi-post/src/main/resources/mapper/PostSeriesMapper.xml

@@ -28,19 +28,14 @@
                exchange_status,
                start_time,
                end_time,
-               del_flag,
-               create_by,
-               create_time,
-               update_by,
-               update_time,
-               remark
+               del_flag
         from post_series
+        where del_flag = '0'
     </sql>
     <!--查询套系列表-->
     <select id="selectPostSeriesList" parameterType="PostSeries" resultMap="PostSeriesResult">
         <include refid="selectPostSeriesVo"/>
         <where>
-            and del_flag = '0'
             <if test="seriesName != null  and seriesName != ''">and series_name like concat('%', #{seriesName}, '%')
             </if>
             <if test="collectionCounts != null ">and collection_counts = #{collectionCounts}</if>
@@ -53,7 +48,7 @@
     <!--套系ID查询-->
     <select id="selectPostSeriesBySeriesId" parameterType="Long" resultMap="PostSeriesResult">
         <include refid="selectPostSeriesVo"/>
-        where series_id = #{seriesId}
+        and series_id = #{seriesId}
     </select>
     <!--添加套系信息-->
     <insert id="insertPostSeries" parameterType="PostSeries" useGeneratedKeys="true" keyProperty="seriesId">
@@ -114,7 +109,7 @@
     </update>
     <!--批量删除-->
     <update id="deletePostSeriesBySeriesIds" parameterType="String">
-        update  post_series  set del_flag = '1'  where series_id in
+        update post_series set del_flag = '1' where series_id in
         <foreach item="seriesId" collection="array" open="(" separator="," close=")">
             #{seriesId}
         </foreach>