You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hotels/back/src/main/java/com/service/NewsService.java

48 lines
2.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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);
}