|
|
package com.service; // 声明该类所属的包为com.service
|
|
|
|
|
|
// 导入MyBatis-Plus的Wrapper类,用于构建查询条件
|
|
|
import com.baomidou.mybatisplus.mapper.Wrapper;
|
|
|
// 导入MyBatis-Plus的IService接口,为通用的服务层接口,提供了基本的CRUD操作
|
|
|
import com.baomidou.mybatisplus.service.IService;
|
|
|
// 导入自定义的分页工具类,用于处理分页查询的结果
|
|
|
import com.utils.PageUtils;
|
|
|
// 导入酒店公告实体类,对应数据库中的酒店公告表
|
|
|
import com.entity.NewsEntity;
|
|
|
// 导入List接口,用于存储多个元素的集合
|
|
|
import java.util.List;
|
|
|
// 导入Map接口,用于存储键值对,通常作为查询参数
|
|
|
import java.util.Map;
|
|
|
// 导入酒店公告的值对象类,用于封装特定视图展示所需的数据
|
|
|
import com.entity.vo.NewsVO;
|
|
|
// 导入MyBatis的@Param注解,用于在Mapper方法中指定参数名称
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
// 导入酒店公告的视图类,用于封装特定视图展示所需的数据
|
|
|
import com.entity.view.NewsView;
|
|
|
|
|
|
/**
|
|
|
* 酒店公告
|
|
|
*
|
|
|
* @author
|
|
|
* @email
|
|
|
* @date 2022-04-04 00:20:04
|
|
|
*/
|
|
|
// 定义酒店公告服务接口,继承自IService<NewsEntity>,具备对酒店公告实体的基本CRUD操作能力
|
|
|
public interface NewsService extends IService<NewsEntity> {
|
|
|
// 根据传入的参数进行分页查询酒店公告数据,返回包含分页信息和查询结果的PageUtils对象
|
|
|
PageUtils queryPage(Map<String, Object> params);
|
|
|
|
|
|
// 根据传入的查询条件Wrapper,查询符合条件的酒店公告VO列表,返回一个List集合
|
|
|
List<NewsVO> selectListVO(Wrapper<NewsEntity> wrapper);
|
|
|
|
|
|
// 根据传入的查询条件Wrapper,查询符合条件的单个酒店公告VO对象,@Param注解指定参数名为"ew"
|
|
|
NewsVO selectVO(@Param("ew") Wrapper<NewsEntity> wrapper);
|
|
|
|
|
|
// 根据传入的查询条件Wrapper,查询符合条件的酒店公告View列表,返回一个List集合
|
|
|
List<NewsView> selectListView(Wrapper<NewsEntity> wrapper);
|
|
|
|
|
|
// 根据传入的查询条件Wrapper,查询符合条件的单个酒店公告View对象,@Param注解指定参数名为"ew"
|
|
|
NewsView selectView(@Param("ew") Wrapper<NewsEntity> wrapper);
|
|
|
|
|
|
// 根据传入的参数和查询条件Wrapper进行分页查询酒店公告数据,返回包含分页信息和查询结果的PageUtils对象
|
|
|
PageUtils queryPage(Map<String, Object> params, Wrapper<NewsEntity> wrapper);
|
|
|
} |