From 4581db487ca237dca8eb31415135e800b9982929 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期一, 04 八月 2025 21:44:05 +0800 Subject: [PATCH] 增加了相关代码 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiverecordstouserController.java | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiverecordstouserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiverecordstouserController.java index e024e87..285a545 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiverecordstouserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiverecordstouserController.java @@ -3,6 +3,8 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.domain.Archiverecordstouser; import com.ruoyi.service.IArchiverecordstouserService; import org.springframework.security.access.prepost.PreAuthorize; @@ -23,6 +25,9 @@ import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; +import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; +import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; + /** * 銆愯濉啓鍔熻兘鍚嶇О銆慍ontroller * @@ -36,16 +41,25 @@ @Autowired private IArchiverecordstouserService archiverecordstouserService; + + @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:edit')") + + @PutMapping("/authUserToArchive") + public AjaxResult selectRecordToUser(String recordId, Long[] userIds) + { + return toAjax(archiverecordstouserService.insertRecordToUsers(recordId, userIds)); + } /** * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛� */ @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:list')") @GetMapping("/list") - public TableDataInfo list(Archiverecordstouser archiverecordstouser) + public AjaxResult list(Archiverecordstouser archiverecordstouser) { - startPage(); - List<Archiverecordstouser> list = archiverecordstouserService.selectArchiverecordstouserList(archiverecordstouser); - return getDataTable(list); + Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); + Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); + return archiverecordstouserService.selectDataList(archiverecordstouser, pageNum, pageSize); + } /** -- Gitblit v1.9.1