潘志宝
2024-09-25 25019019f6495696ec1f3b7276ccb78f0f5905e8
point 分页
已修改5个文件
已重命名1个文件
39 ■■■■■ 文件已修改
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/controller/admin/DaPointController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/dao/DaPointDao.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/DaPointService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/vo/DaPointPageReqVO.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/controller/admin/DaPointController.java
@@ -40,9 +40,9 @@
    @PreAuthorize("@ss.hasPermission('data:point:query')")
    @GetMapping("page")
    public CommonResult<PageResult<DaPointRespVO>> page(@Valid DaPointPageReqVO reqVO){
        PageResult<DaPointEntity> page = daPointService.queryPage(reqVO);
        return success(BeanUtils.toBean(page, DaPointRespVO.class));
    public CommonResult<PageResult<DaPointDTO>> page(@Valid DaPointPageReqVO reqVO){
        PageResult<DaPointDTO> page = daPointService.queryPage(reqVO);
        return success(page);
    }
    @PreAuthorize("@ss.hasPermission('data:point:query')")
@@ -61,7 +61,7 @@
    }
    @PreAuthorize("@ss.hasPermission('data:point:create')")
    @PostMapping("/add")
    @PostMapping("/data:point")
    public CommonResult<Boolean> create(@RequestBody DaPointDTO daPointDTO){
        String id = UUID.randomUUID().toString();
        daPointDTO.setId(id);
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/dao/DaPointDao.java
@@ -23,7 +23,7 @@
@Mapper
public interface DaPointDao extends BaseMapperX<DaPointEntity> {
    IPage<DaPointDTO> getPageList(IPage<DaPointEntity> page, @Param("params") Map<String, Object> params);
    IPage<DaPointDTO> getPageList(IPage<DaPointEntity> page, @Param("params") DaPointPageReqVO reqVO);
    List<DaPointDTO> getConstantPoint(Map<String, Object> params);
@@ -31,10 +31,7 @@
    List<DaPointDTO> getMathPoint(Map<String, Object> params);
    default PageResult<DaPointEntity> selectPage(DaPointPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DaPointEntity>()
                .likeIfPresent(DaPointEntity::getPointNo, reqVO.getPointNo())
                .likeIfPresent(DaPointEntity::getPointName, reqVO.getPointName())
                .orderByDesc(DaPointEntity::getCreateTime));
    default IPage<DaPointDTO> selectPage(DaPointPageReqVO reqVO) {
        return getPageList(getPage(reqVO), reqVO);
    }
}
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/DaPointService.java
@@ -14,7 +14,7 @@
 * @createTime 2024年09月2日
 */
public interface DaPointService{
    PageResult<DaPointEntity> queryPage(DaPointPageReqVO reqVO);
    PageResult<DaPointDTO> queryPage(DaPointPageReqVO reqVO);
    DaPointDTO info(String id);
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/service/impl/DaPointServiceImpl.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSONArray;
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.framework.common.util.object.ConvertUtils;
@@ -48,8 +49,9 @@
    @Override
    public PageResult<DaPointEntity> queryPage(DaPointPageReqVO reqVO) {
        return daPointDao.selectPage(reqVO);
    public PageResult<DaPointDTO> queryPage(DaPointPageReqVO reqVO) {
        IPage<DaPointDTO> page = daPointDao.selectPage(reqVO);
        return new PageResult<DaPointDTO>(page.getRecords(), page.getTotal());
    }
    @Override
iailab-module-data/iailab-module-data-biz/src/main/java/com/iailab/module/data/point/vo/DaPointPageReqVO.java
@@ -11,7 +11,7 @@
 * @Description
 * @createTime 2024年09月2日
 */
@Schema(description = "数据平台 - DaPoint分页 Request VO")
@Schema(description = "数据平台 - 测点分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@@ -20,4 +20,14 @@
    private String pointNo;
    private String pointName;
    private String pointType;
    private String dataType;
    private String sourceName;
    private String tagNo;
    private Integer isEnable;
}
iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/point/DaPointDao.xml
文件名从 iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/da/DaPointDao.xml 修改
@@ -64,7 +64,7 @@
                and t1.is_enable = #{params.isEnable}
            </if>
        </where>
        order by t1.point_no desc
        order by t1.create_time desc
    </select>
    <select id="getConstantPoint" resultType="com.iailab.module.data.point.dto.DaPointDTO">