From 25d0b36cc39f51c7b03f28f30cfc6ed5a10769d3 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期日, 12 十月 2025 17:51:46 +0800
Subject: [PATCH] 修改了大量的代码块
---
archiveManager/src/main/java/com/ruoyi/mapper/ArchiverecordstouserMapper.java | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/archiveManager/src/main/java/com/ruoyi/mapper/ArchiverecordstouserMapper.java b/archiveManager/src/main/java/com/ruoyi/mapper/ArchiverecordstouserMapper.java
index 2a24e07..7730a27 100644
--- a/archiveManager/src/main/java/com/ruoyi/mapper/ArchiverecordstouserMapper.java
+++ b/archiveManager/src/main/java/com/ruoyi/mapper/ArchiverecordstouserMapper.java
@@ -2,11 +2,14 @@
import java.util.List;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.domain.ArchiveRecords;
import com.ruoyi.domain.Archiverecordstouser;
+import com.ruoyi.domain.vo.RecordToUserCount;
import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
@@ -16,7 +19,23 @@
* @date 2025-07-20
*/
@Mapper
-public interface ArchiverecordstouserMapper extends BaseMapper<Archiverecordstouser>
-{
+public interface ArchiverecordstouserMapper extends BaseMapper<Archiverecordstouser> {
-}
+ @Select("select ad.user_id, user_name, count(*) as cnt, (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
+ " record_status='鏈綍鍏�') as swlr,\n" +
+ " (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
+ " record_status='鏈笂浼犻檮浠�') as wlrf,\n" +
+ " (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
+ " record_status='寰呬慨鏀�') as dxg,\n" +
+ " (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
+ " record_status='褰曞叆瀹屾垚') as ylr from archiverecordstouser as ad, sys_user as sy,archive_records as ard where ad.user_id=sy.user_id and ard.id=ad.archive_records_id ${ew.customSqlSegment} group by user_id, user_name")
+ Page<RecordToUserCount> selectRecordToUserPage(Page<RecordToUserCount> page, @Param("ew") LambdaQueryWrapper<RecordToUserCount> queryWrapper);
+
+
+ @Select("select ad.user_id, user_name, count(*) as cnt, (select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.record_id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
+ " record_status='鏈綍鍏�') as swlr,(select count(*) from archive_records as ar,archiverecordstouser as ats, sys_user as su where ar.record_id= ats.archive_records_id and ats.user_id=su.user_id and su.user_id=sy.user_id and\n" +
+ " record_status='褰曞叆瀹屾垚') as ylr from archiverecordstouser as ad, sys_user as sy,archive_records as ard where ad.user_id=sy.user_id and ard.record_id=ad.archive_records_id group by user_id, user_name\n" +
+ " ")
+ List<RecordToUserCount> selectRecordToUserAll();
+
+}
\ No newline at end of file
--
Gitblit v1.9.1