|
|
@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|