From cdb822dfac8bffc26ac2e0ee35e32cb17d7082a9 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期一, 29 十二月 2025 22:33:34 +0800
Subject: [PATCH] 修改了对应代码
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiverecordstouserController.java | 45 ++++++++++++++++++++++++++++++---------------
1 files changed, 30 insertions(+), 15 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 1dc200c..42f7e37 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
@@ -34,7 +34,7 @@
import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE;
/**
- * 銆愯濉啓鍔熻兘鍚嶇О銆慍ontroller
+ * 銆愭。妗堝垎閰嶃�慍ontroller
*
* @author ruoyi
* @date 2025-07-20
@@ -46,11 +46,26 @@
@Autowired
private IArchiverecordstouserService archiverecordstouserService;
+ @PreAuthorize("@ss.hasPermi('system:archiverecordstouser:edit')")
+
+ @PutMapping("/authArchivesToSigleUser")
+ public AjaxResult insertArchivesToSingleUser(Long[] recordIds, Long[] userIds)
+ {
+ for(Long recordId: recordIds)
+ {
+ //鍒ゆ柇鏄惁鎺堟潈缁欏埆浜轰簡
+ if(archiverecordstouserService.selectArchiveRecordUsers(recordId))
+ continue;
+ archiverecordstouserService.insertRecordToUsers(recordId, userIds);
+ }
+ return toAjax(200);
+
+ }
@PreAuthorize("@ss.hasPermi('system:archiverecordstouser:edit')")
@PutMapping("/authUserToArchive")
- public AjaxResult selectRecordToUser(String recordId, Long[] userIds)
+ public AjaxResult selectRecordToUser(Long recordId, Long[] userIds)
{
for(Long userId:userIds)
{
@@ -66,7 +81,7 @@
return toAjax(200);
}
/**
- * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛�
+ * 鏌ヨ銆愭。妗堝垎閰嶃�戝垪琛�
*/
@PreAuthorize("@ss.hasPermi('system:archiverecordstouser:list')")
@GetMapping("/list")
@@ -99,20 +114,20 @@
util.exportExcel(response, list, "瀵煎嚭缁熻淇℃伅");
}
/**
- * 瀵煎嚭銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛�
+ * 瀵煎嚭銆愭。妗堝垎閰嶃�戝垪琛�
*/
@PreAuthorize("@ss.hasPermi('system:archiverecordstouser:export')")
- @Log(title = "銆愯濉啓鍔熻兘鍚嶇О銆�", businessType = BusinessType.EXPORT)
+ @Log(title = "銆愭。妗堝垎閰嶃��", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Archiverecordstouser archiverecordstouser)
{
List<Archiverecordstouser> list = archiverecordstouserService.selectArchiverecordstouserList(archiverecordstouser);
ExcelUtil<Archiverecordstouser> util = new ExcelUtil<Archiverecordstouser>(Archiverecordstouser.class);
- util.exportExcel(response, list, "銆愯濉啓鍔熻兘鍚嶇О銆戞暟鎹�");
+ util.exportExcel(response, list, "銆愭。妗堝垎閰嶃�戞暟鎹�");
}
/**
- * 鑾峰彇銆愯濉啓鍔熻兘鍚嶇О銆戣缁嗕俊鎭�
+ * 鑾峰彇銆愭。妗堝垎閰嶃�戣缁嗕俊鎭�
*/
@PreAuthorize("@ss.hasPermi('system:archiverecordstouser:query')")
@GetMapping(value = "/{id}")
@@ -122,10 +137,10 @@
}
/**
- * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆�
+ * 鏂板銆愭。妗堝垎閰嶃��
*/
@PreAuthorize("@ss.hasPermi('system:archiverecordstouser:add')")
- @Log(title = "銆愯濉啓鍔熻兘鍚嶇О銆�", businessType = BusinessType.INSERT)
+ @Log(title = "銆愭。妗堝垎閰嶃��", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Archiverecordstouser archiverecordstouser)
{
@@ -133,10 +148,10 @@
}
/**
- * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆�
+ * 淇敼銆愭。妗堝垎閰嶃��
*/
@PreAuthorize("@ss.hasPermi('system:archiverecordstouser:edit')")
- @Log(title = "銆愯濉啓鍔熻兘鍚嶇О銆�", businessType = BusinessType.UPDATE)
+ @Log(title = "銆愭。妗堝垎閰嶃��", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Archiverecordstouser archiverecordstouser)
{
@@ -144,10 +159,10 @@
}
/**
- * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
+ * 鍒犻櫎銆愭。妗堝垎閰嶃��
*/
@PreAuthorize("@ss.hasPermi('system:archiverecordstouser:remove')")
- @Log(title = "銆愯濉啓鍔熻兘鍚嶇О銆�", businessType = BusinessType.DELETE)
+ @Log(title = "銆愭。妗堝垎閰嶃��", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@@ -158,7 +173,7 @@
*/
@PreAuthorize("@ss.hasPermi('system:archiverecordstouser:remove')")
@DeleteMapping("/deleteByRidUid")
- public AjaxResult removeByRecordIdAndUserId(String recordId, Long userId)
+ public AjaxResult removeByRecordIdAndUserId(Long recordId, Long userId)
{
return toAjax(archiverecordstouserService.deleteArchiverecordstouserByRecordId(recordId, userId));
}
@@ -166,7 +181,7 @@
@PreAuthorize("@ss.hasPermi('system:archiverecordstouser:query')")
@GetMapping("/getByRidUid")
- public AjaxResult getByRecordIdAndUserId(String recordId, Long userId)
+ public AjaxResult getByRecordIdAndUserId(Long recordId, Long userId)
{
return toAjax(archiverecordstouserService.queryArchiverecordstouserByRecordId(recordId, userId));
}
--
Gitblit v1.9.1