feat(pocket): 实现工厂状态数据分页查询功能
- 为Klptcm1ProPlantStateCurrent实体补充VALUE1至VALUE99字段定义及注释 - 更新Klptcm1ProPlantStateCurrentMapper.xml,完善所有VALUE字段的resultMap和column list映射- 修改IKlptcm1ProPlantStateCurrentService接口,将selectAll方法改为支持分页查询- 调整Klptcm1ProPlantStateCurrentController控制器,继承BaseController并支持分页参数- 新增Klptcm1ProPlantStateDefine相关组件(domain、controller、service、mapper),实现状态定义表的分页查询能力- 引入PageQuery与TableDataInfo等通用分页工具类,统一前后端分页交互格式 - 更新Mapper XML配置文件,优化SQL结构并确保大数据量下的查询性能
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
package com.klp.pocket.service;
|
||||
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.pocket.domain.Klptcm1ProPlantStateCurrent;
|
||||
import java.util.List;
|
||||
|
||||
public interface IKlptcm1ProPlantStateCurrentService {
|
||||
|
||||
List<Klptcm1ProPlantStateCurrent> selectAll();
|
||||
TableDataInfo<Klptcm1ProPlantStateCurrent> selectAll(PageQuery pageQuery);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.klp.pocket.service;
|
||||
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.pocket.domain.Klptcm1ProPlantStateDefine;
|
||||
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工厂状态定义表Service接口
|
||||
* 封装业务逻辑,对外提供数据操作能力
|
||||
*/
|
||||
public interface IKlptcm1ProPlantStateDefineService {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询状态定义
|
||||
* @param pageQuery 分页查询参数(含页码、每页条数)
|
||||
* @return 分页表格数据(符合前端TableDataInfo格式)
|
||||
*/
|
||||
TableDataInfo<Klptcm1ProPlantStateDefine> getDefinePage(PageQuery pageQuery);
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.klp.pocket.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.pocket.domain.Klptcm1ProPlantStateCurrent;
|
||||
import com.klp.pocket.mapper.Klptcm1ProPlantStateCurrentMapper;
|
||||
import com.klp.pocket.service.IKlptcm1ProPlantStateCurrentService;
|
||||
@@ -17,8 +20,9 @@ public class Klptcm1ProPlantStateCurrentServiceImpl implements IKlptcm1ProPlantS
|
||||
|
||||
|
||||
@Override
|
||||
public List<Klptcm1ProPlantStateCurrent> selectAll() {
|
||||
return klptcm1ProPlantStateCurrentMapper.selectAll();
|
||||
public TableDataInfo<Klptcm1ProPlantStateCurrent> selectAll(PageQuery pageQuery) {
|
||||
Page<Klptcm1ProPlantStateCurrent> result = klptcm1ProPlantStateCurrentMapper.selectAll(pageQuery.build());
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.klp.pocket.service.impl;
|
||||
|
||||
import com.klp.common.core.domain.PageQuery;
|
||||
import com.klp.common.core.page.TableDataInfo;
|
||||
import com.klp.pocket.domain.Klptcm1ProPlantStateCurrent;
|
||||
import com.klp.pocket.domain.Klptcm1ProPlantStateDefine;
|
||||
import com.klp.pocket.mapper.Klptcm1ProPlantStateDefineMapper;
|
||||
import com.klp.pocket.service.IKlptcm1ProPlantStateDefineService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工厂状态定义表Service实现类
|
||||
* 具体业务逻辑实现,依赖Mapper操作数据库
|
||||
*/
|
||||
@Service
|
||||
public class Klptcm1ProPlantStateDefineServiceImpl implements IKlptcm1ProPlantStateDefineService {
|
||||
|
||||
@Resource
|
||||
private Klptcm1ProPlantStateDefineMapper defineMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public TableDataInfo<Klptcm1ProPlantStateDefine> getDefinePage(PageQuery pageQuery) {
|
||||
// 构建分页对象(当前页码、每页条数)
|
||||
Page<Klptcm1ProPlantStateDefine> result =defineMapper.selectPage(pageQuery.build());
|
||||
// 调用Mapper分页查询
|
||||
return TableDataInfo.build(result);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user