ym923 | 977239c | 2025-06-06 17:36:14 +0800 | [diff] [blame] | 1 | package com.pt5.pthouduan.mapper; |
| 2 | |
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 4 | import com.pt5.pthouduan.entity.Activity; |
| 5 | import org.apache.ibatis.annotations.Mapper; |
| 6 | import org.apache.ibatis.annotations.Param; |
| 7 | |
| 8 | import java.util.List; |
| 9 | |
| 10 | /** |
| 11 | * <p> |
| 12 | * 活动 Mapper 接口 |
| 13 | * </p> |
| 14 | * |
| 15 | * 功能:增、删、改、查(按是否展示) |
| 16 | * |
| 17 | * 作者:杨蔓 |
| 18 | * @since 2025-05-16 |
| 19 | */ |
| 20 | @Mapper |
| 21 | public interface ActivityMapper extends BaseMapper<Activity> { |
| 22 | |
| 23 | // 根据是否展示状态查询活动列表(0:展示,1:隐藏) |
| 24 | List<Activity> selectByIsShow(@Param("is_show") Integer isShow); |
| 25 | |
| 26 | // 插入新的活动 |
| 27 | int insert(Activity activity); |
| 28 | |
| 29 | // 根据活动ID删除活动 |
| 30 | int deleteById(@Param("activityid") Integer activityid); |
| 31 | |
| 32 | // 根据活动ID更新活动内容 |
| 33 | int updateById(Activity activity); |
| 34 | |
| 35 | // ✅ 新增:根据活动ID查询活动详情 |
| 36 | Activity selectById(@Param("activityid") Integer activityid); |
| 37 | |
| 38 | } |