From f984f785528bb3c97e41d483dc214e844993df35 Mon Sep 17 00:00:00 2001 From: fei <791364011@qq.com> Date: 星期四, 28 八月 2025 23:22:16 +0800 Subject: [PATCH] 修改了代码 --- archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java b/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java index ec7c9ba..977d0f6 100644 --- a/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java +++ b/archiveManager/src/main/java/com/ruoyi/mapper/DocumentMaterialsMapper.java @@ -12,8 +12,8 @@ @Mapper public interface DocumentMaterialsMapper extends BaseMapper<DocumentMaterials> { - @Select("update document_materials SET url = #{url},file_number=#{fileNumber},page_order=#{pageOrder},width=#{width},height=#{height},file_size=#{fileSize}, format=#{format} where page_number = #{pageNumber}") - Long updateInfoByPageNumber(@Param("pageNumber") Long pageNumber,@Param("fileNumber") Long fileNumber,@Param("pageOrder") Long pageOrder,@Param("width") int width, @Param("height") int height, @Param("fileSize") Double fileSize,@Param("url") String url,@Param("format") String format); + @Select("update document_materials SET url = #{url},file_number=#{fileNumber},page_order=#{pageOrder},width=#{width},height=#{height},horizontal_resolution=#{horizontalResolution},vertical_resolution=#{verticalResolution},file_size=#{fileSize}, format=#{format} where page_number = #{pageNumber}") + Long updateInfoByPageNumber(@Param("pageNumber") Long pageNumber,@Param("fileNumber") Long fileNumber,@Param("pageOrder") Long pageOrder,@Param("width") int width, @Param("height") int height, @Param("horizontalResolution") int horizontalResolution, @Param("verticalResolution") int verticalResolution, @Param("fileSize") Double fileSize,@Param("url") String url,@Param("format") String format); //鏍规嵁棰樺悕鎷垮埌鏈�澶х殑pageOrder @@ -25,11 +25,11 @@ Long getFileNumber(@Param("pageNumber") Long pageNumber); //鏌ヨ鍗峰唴鐩綍 - @Select("select creator,title, date, page_number,remarks from document_materials\n" + - "WHERE page_number IN (\n" + - " SELECT MIN(page_number)\n" + - " FROM document_materials where record_id=#{recordId}\n" + - " GROUP BY stage, title\n" + - ") order by page_number ;") - List<DocumentMaterialsVo> getArchiveMatInfo(@Param("recordId") String recordId); + @Select( + "select ROW_NUMBER() OVER (ORDER BY page_number) AS num, document_number, creator,title, date, page_number,dm.remarks, ar.record_id, publicity from document_materials as dm, archive_records as ar \n" + + " WHERE ar.id = dm.record_id and page_number IN (\n" + + " SELECT MIN(page_number)\n" + + " FROM document_materials where record_id=#{recordId}\n" + + " GROUP BY stage, title) and ar.id =#{recordId} order by page_number ;") + List<DocumentMaterialsVo> getArchiveMatInfo(@Param("recordId") int recordId); } -- Gitblit v1.9.1