Merge pull request '超算置顶新闻查询条件修改' (#1173) from amypeng/microservices:master into master

This commit is contained in:
otto 2026-06-15 16:50:36 +08:00
commit d2d2f7368c
2 changed files with 2 additions and 16 deletions

View File

@ -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);
/**
* 查询用户在指定专区下的置顶文章
*

View File

@ -83,21 +83,16 @@
where zone_id = #{zoneId}
and user_id = #{userId}
and is_points_top = 1
and expiry_time >= NOW()
</select>
<!-- 更新文章的积分置顶状态 -->
<update id="updatePointsTopStatus">
update zone_points_doc
set is_points_top = #{isPointsTop}
where id = #{id}
</update>
<!-- 查询用户在指定专区下的置顶文章 -->
<select id="selectPointsTopByZoneIdAndUserId" resultMap="ZonePointsDocResult">
<include refid="selectZonePointsDocVo"/>
where zone_id = #{zoneId}
and user_id = #{userId}
and is_points_top = 1
and expiry_time &gt;= NOW()
limit 1
</select>