From 29ec9c2a3fd1c1e0b1695edb6275dad765137e69 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期六, 11 十月 2025 21:07:50 +0800
Subject: [PATCH] 修改了大量的代码块

---
 archiveManager/src/main/java/com/ruoyi/service/impl/ArchiverecordstouserServiceImpl.java |   82 +++++++++++++++++++++++++++++------------
 1 files changed, 58 insertions(+), 24 deletions(-)

diff --git a/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiverecordstouserServiceImpl.java b/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiverecordstouserServiceImpl.java
index aa4d0cb..29c2849 100644
--- a/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiverecordstouserServiceImpl.java
+++ b/archiveManager/src/main/java/com/ruoyi/service/impl/ArchiverecordstouserServiceImpl.java
@@ -1,6 +1,7 @@
 package com.ruoyi.service.impl;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -13,7 +14,9 @@
 import com.ruoyi.common.utils.MapUtils;
 
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.domain.ArchiveRecords;
 import com.ruoyi.domain.Archiverecordstouser;
+import com.ruoyi.domain.vo.RecordToUserCount;
 import com.ruoyi.mapper.ArchiverecordstouserMapper;
 import com.ruoyi.service.IArchiverecordstouserService;
 import com.ruoyi.system.mapper.SysUserMapper;
@@ -23,7 +26,7 @@
 
 
 /**
- * 銆愯濉啓鍔熻兘鍚嶇О銆慡ervice涓氬姟灞傚鐞�
+ * 銆愭。妗堝垎閰嶃�慡ervice涓氬姟灞傚鐞�
  * 
  * @author ruoyi
  * @date 2025-07-20
@@ -37,7 +40,7 @@
   private ISysUserService iSysUserService;
     private LambdaQueryWrapper<Archiverecordstouser> buildCondition(Archiverecordstouser archiverecordstouser) {
         LambdaQueryWrapper<Archiverecordstouser> lqw = new LambdaQueryWrapper<>();
-        lqw.eq(!StringUtils.isEmpty(archiverecordstouser.getArchiveRecordsId()),Archiverecordstouser::getArchiveRecordsId, archiverecordstouser.getArchiveRecordsId());
+        lqw.eq(archiverecordstouser.getArchiveRecordsId()!=null,Archiverecordstouser::getArchiveRecordsId, archiverecordstouser.getArchiveRecordsId());
 
         //淇濆瓨鐩稿叧鐢ㄦ埛鐨剈serId
         List<Long> arr = new ArrayList<>();
@@ -59,7 +62,7 @@
 
 
     @Override
-    public int insertRecordToUsers(String recordId, Long[] userIds) {
+    public int insertRecordToUsers(Long recordId, Long[] userIds) {
         // 鏂板鐢ㄦ埛涓庢鍗疯褰�
         List<Archiverecordstouser> list = new ArrayList<Archiverecordstouser>();
         for (Long userId : userIds)
@@ -106,10 +109,10 @@
         return AjaxResult.success(data);    }
 
     /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆�
+     * 鏌ヨ銆愭。妗堝垎閰嶃��
      * 
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆�
+     * @param id 銆愭。妗堝垎閰嶃�戜富閿�
+     * @return 銆愭。妗堝垎閰嶃��
      */
     @Override
     public Archiverecordstouser selectArchiverecordstouserById(Long id)
@@ -118,30 +121,30 @@
     }
 
     @Override
-    public boolean selectArchiveRecordUsers(String recordId) {
+    public boolean selectArchiveRecordUsers(Long recordId) {
         LambdaQueryWrapper<Archiverecordstouser> lqw = new LambdaQueryWrapper<>();
-        lqw.eq(!StringUtils.isEmpty(recordId),Archiverecordstouser::getArchiveRecordsId, recordId);
+        lqw.eq(recordId!=null,Archiverecordstouser::getArchiveRecordsId, recordId);
         List<Archiverecordstouser> lis = list(lqw);
         return !lis.isEmpty();
     }
 
     @Override
     public List<Archiverecordstouser> selectArchiverecordstouserList(Archiverecordstouser archiverecordstouser) {
-        return null;
+        return this.list();
     }
 
     /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛�
+     * 鏌ヨ銆愭。妗堝垎閰嶃�戝垪琛�
      * 
-     * @param archiverecordstouser 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆�
+     * @param archiverecordstouser 銆愭。妗堝垎閰嶃��
+     * @return 銆愭。妗堝垎閰嶃��
      */
 
 
     /**
-     * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆�
+     * 鏂板銆愭。妗堝垎閰嶃��
      * 
-     * @param archiverecordstouser 銆愯濉啓鍔熻兘鍚嶇О銆�
+     * @param archiverecordstouser 銆愭。妗堝垎閰嶃��
      * @return 缁撴灉
      */
     @Override
@@ -151,9 +154,9 @@
     }
 
     /**
-     * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆�
+     * 淇敼銆愭。妗堝垎閰嶃��
      * 
-     * @param archiverecordstouser 銆愯濉啓鍔熻兘鍚嶇О銆�
+     * @param archiverecordstouser 銆愭。妗堝垎閰嶃��
      * @return 缁撴灉
      */
     @Override
@@ -163,9 +166,9 @@
     }
 
     /**
-     * 鎵归噺鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
+     * 鎵归噺鍒犻櫎銆愭。妗堝垎閰嶃��
      * 
-     * @param ids 闇�瑕佸垹闄ょ殑銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
+     * @param ids 闇�瑕佸垹闄ょ殑銆愭。妗堝垎閰嶃�戜富閿�
      * @return 缁撴灉
      */
     @Override
@@ -175,9 +178,9 @@
     }
 
     /**
-     * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆戜俊鎭�
+     * 鍒犻櫎銆愭。妗堝垎閰嶃�戜俊鎭�
      * 
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
+     * @param id 銆愭。妗堝垎閰嶃�戜富閿�
      * @return 缁撴灉
      */
     @Override
@@ -187,10 +190,10 @@
     }
 
     @Override
-    public int deleteArchiverecordstouserByRecordId(String recordId, Long userId) {
+    public int deleteArchiverecordstouserByRecordId(Long recordId, Long userId) {
 
         LambdaQueryWrapper<Archiverecordstouser> lqw = new LambdaQueryWrapper<>();
-        lqw.eq(!StringUtils.isEmpty(recordId), Archiverecordstouser::getArchiveRecordsId, recordId)
+        lqw.eq(recordId!=null, Archiverecordstouser::getArchiveRecordsId, recordId)
                 .eq(userId!=null, Archiverecordstouser::getUserId, userId);
         if(this.remove(lqw))
             return 1;
@@ -199,9 +202,9 @@
     }
 
     @Override
-    public int queryArchiverecordstouserByRecordId(String recordId, Long userId) {
+    public int queryArchiverecordstouserByRecordId(Long recordId, Long userId) {
         LambdaQueryWrapper<Archiverecordstouser> lqw = new LambdaQueryWrapper<>();
-        lqw.eq(!StringUtils.isEmpty(recordId), Archiverecordstouser::getArchiveRecordsId, recordId)
+        lqw.eq(recordId!=null, Archiverecordstouser::getArchiveRecordsId, recordId)
                 .eq(userId!=null, Archiverecordstouser::getUserId, userId);
 
         List<Archiverecordstouser> lis = list(lqw);
@@ -210,4 +213,35 @@
         else
             return 0;
     }
+
+    @Override
+    public AjaxResult countStatistic(String username, int pageNum, int pageSize) {
+        LambdaQueryWrapper<RecordToUserCount> lqw = new LambdaQueryWrapper<>();
+
+        if(username!=null)
+            lqw.like(!StringUtils.isEmpty(username), RecordToUserCount::getUserName, username);
+
+
+
+
+
+
+        Page<RecordToUserCount> page = new Page<>(pageNum, pageSize);
+
+        // 浣跨敤鑷畾涔夌殑鍒嗛〉鏌ヨ鏂规硶锛屽厛杩炴帴鍐嶅垎椤�
+        Page<RecordToUserCount> pageResult = this.baseMapper.selectRecordToUserPage(page, lqw);
+
+        List<RecordToUserCount> beanRecords = pageResult.getRecords();//寰楀埌鏌ヨ鍑烘潵鐨勬暟鎹�
+
+        HashMap<String, Object> data = MapUtils.getResult(pageResult, beanRecords);
+
+
+        return AjaxResult.success(data);
+
+    }
+
+    @Override
+    public List<RecordToUserCount> findAllRecordToUserCont() {
+        return this.baseMapper.selectRecordToUserAll();
+    }
 }

--
Gitblit v1.9.1