suochencheng 6 anni fa
parent
commit
5454d361b5

+ 2 - 15
src/main/java/com/izouma/awesomeadmin/dao/OrderAlbumMapper.xml

@@ -723,22 +723,13 @@
         where
         del_flag = 'N'
         and order_id = #{orderId}
-        <if test="baseRepairId != null and !&quot;&quot;.equals(baseRepairId)">
-            AND status_flag = 2
-            and id in ( SELECT image_id FROM order_album_repair_detail WHERE del_flag='N' and repair_id =
-            #{baseRepairId})
-        </if>
         ) as need_num,
         (select
-        COUNT(1) AS total_num
+        album_quantity AS user_order
         from order_album
         where
         del_flag = 'N'
-        and order_id = #{orderId}
-        <if test="baseRepairId != null and !&quot;&quot;.equals(baseRepairId)">
-            and id in ( SELECT image_id FROM order_album_repair_detail WHERE del_flag='N' and repair_id =
-            #{baseRepairId})
-        </if>
+        and id = #{orderId}
         ) as total_num
     </select>
     <select id="checkRepairAlbumNum" parameterType="java.util.Map"
@@ -765,10 +756,6 @@
         where
         del_flag = 'N'
         and order_id = #{orderId}
-        <if test="baseRepairId != null and !&quot;&quot;.equals(baseRepairId)">
-            and id in ( SELECT image_id FROM order_album_repair_detail WHERE del_flag='N' and repair_id =
-            #{baseRepairId})
-        </if>
         ) as total_num
     </select>