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.
gym/ConfigServiceImpl.java

27 lines
1.3 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.impl; // 定义服务实现类所在的包
import java.util.Map; // 导入Map集合接口
import org.springframework.stereotype.Service; // Spring服务组件注解
import com.baomidou.mybatisplus.mapper.EntityWrapper; // MyBatis-Plus条件构造器
import com.baomidou.mybatisplus.plugins.Page; // MyBatis-Plus分页组件
import com.baomidou.mybatisplus.service.impl.ServiceImpl; // MyBatis-Plus服务实现基类
import com.dao.ConfigDao; // 导入配置数据访问接口
import com.entity.ConfigEntity; // 导入配置实体类
import com.service.ConfigService; // 导入配置服务接口
import com.utils.PageUtils; // 导入分页工具类
import com.utils.Query; // 导入查询工具类
@Service("configService") // 声明为Spring服务组件指定bean名称
public class ConfigServiceImpl extends ServiceImpl<ConfigDao, ConfigEntity> implements ConfigService {
@Override // 重写接口方法
public PageUtils queryPage(Map<String, Object> params) {
// 调用父类分页查询方法
Page<ConfigEntity> page = this.selectPage(
new Query<ConfigEntity>(params).getPage(), // 创建分页参数
new EntityWrapper<ConfigEntity>() // 创建空条件构造器
);
// 返回自定义分页结果
return new PageUtils(page);
}
}