From ab53fa6ee05f39ad1acf7c58ca434a1222c61bba Mon Sep 17 00:00:00 2001 From: amypeng Date: Mon, 15 Jun 2026 16:43:24 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E7=BD=AE=E9=A1=B6=E6=96=87?= =?UTF-8?q?=E7=AB=A0=20=E6=9F=A5=E8=AF=A2=E5=A2=9E=E5=8A=A0=E8=BF=87?= =?UTF-8?q?=E6=9C=9F=E6=97=B6=E9=97=B4=E6=9D=A1=E4=BB=B6+=E5=8E=BB?= =?UTF-8?q?=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 积分置顶文章 查询增加过期时间条件+去除冗余代码 --- .../zone/member/mapper/ZonePointsDocMapper.java | 9 --------- .../main/resources/mapper/zone/ZonePointsDocMapper.xml | 9 ++------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/microservices-modules/microservices-modules-zone/src/main/java/com/microservices/zone/member/mapper/ZonePointsDocMapper.java b/microservices-modules/microservices-modules-zone/src/main/java/com/microservices/zone/member/mapper/ZonePointsDocMapper.java index 53792de42..9a15822a7 100644 --- a/microservices-modules/microservices-modules-zone/src/main/java/com/microservices/zone/member/mapper/ZonePointsDocMapper.java +++ b/microservices-modules/microservices-modules-zone/src/main/java/com/microservices/zone/member/mapper/ZonePointsDocMapper.java @@ -66,15 +66,6 @@ public interface ZonePointsDocMapper { */ int hasPointsTopByZoneIdAndUserId(@Param("zoneId") Long zoneId, @Param("userId") Long userId); - /** - * 更新文章的积分置顶状态 - * - * @param id 主键ID - * @param isPointsTop 是否置顶 - * @return 影响行数 - */ - int updatePointsTopStatus(@Param("id") Long id, @Param("isPointsTop") Boolean isPointsTop); - /** * 查询用户在指定专区下的置顶文章 * diff --git a/microservices-modules/microservices-modules-zone/src/main/resources/mapper/zone/ZonePointsDocMapper.xml b/microservices-modules/microservices-modules-zone/src/main/resources/mapper/zone/ZonePointsDocMapper.xml index d6c32b25a..74fc430a3 100644 --- a/microservices-modules/microservices-modules-zone/src/main/resources/mapper/zone/ZonePointsDocMapper.xml +++ b/microservices-modules/microservices-modules-zone/src/main/resources/mapper/zone/ZonePointsDocMapper.xml @@ -83,21 +83,16 @@ where zone_id = #{zoneId} and user_id = #{userId} and is_points_top = 1 + and expiry_time >= NOW() - - - update zone_points_doc - set is_points_top = #{isPointsTop} - where id = #{id} - -