Parcourir la source

拉黑后取消拉黑查询不到数据的BUG问题

zjy il y a 4 mois
Parent
commit
a77d35f81b

+ 2 - 2
alien-entity/src/main/resources/mapper/second/SecondGoodsInfoMapper.xml

@@ -163,7 +163,7 @@
         ) a where rn <![CDATA[ <= ]]> 2
     </select>
 
-    <!-- 分页查询推荐数据 -->
+    <!-- 分页查询新发数据 -->
     <select id="querySecondNewGoodsByPage" resultType="shop.alien.entity.second.vo.SecondGoodsRecommendVo">
         with shieldUser as (
             select g.id from life_blacklist lb inner join second_goods g
@@ -209,7 +209,7 @@
             left join life_collect lc on lc.business_id = g.id and lc.user_id = #{phoneId} and lc.delete_flag = 0 and lc.business_type = 1
         where g.delete_flag = 0
             and not exists (select 1 from shieldUser s where s.id = g.id)
-            and not exists (select 1 from second_shield s where s.user_id = #{userId} and s.shield_type = 1 and s.shield_id = g.id)
+            and not exists (select 1 from second_shield s where s.user_id = #{userId} and s.shield_type = 1 and s.shield_id = g.id and s.delete_flag = 0)
             and g.goods_status = 3
             and g.position != '' and g.position is not null
         order by g.release_time desc