From 8b097af195e5b0056eaad06f199cd1d291821912 Mon Sep 17 00:00:00 2001
From: 佟明键 <tongmingjian@sinosoft.com.cn>
Date: 星期四, 24 二月 2022 12:39:28 +0800
Subject: [PATCH] update 优化随机数生成方式 避免容易生成两个相同随机数的问题

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDataScopeServiceImpl.java |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDataScopeServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDataScopeServiceImpl.java
index 8439958..2803a59 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDataScopeServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDataScopeServiceImpl.java
@@ -7,20 +7,19 @@
 import com.ruoyi.system.domain.SysRoleDept;
 import com.ruoyi.system.mapper.SysDeptMapper;
 import com.ruoyi.system.mapper.SysRoleDeptMapper;
-import com.ruoyi.system.service.SysDataScopeService;
-import org.springframework.beans.factory.annotation.Autowired;
+import com.ruoyi.system.service.ISysDataScopeService;
+import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
 import java.util.stream.Collectors;
 
+@RequiredArgsConstructor
 @Service("sdss")
-public class SysDataScopeServiceImpl implements SysDataScopeService {
+public class SysDataScopeServiceImpl implements ISysDataScopeService {
 
-    @Autowired
-    private SysRoleDeptMapper roleDeptMapper;
-    @Autowired
-    private SysDeptMapper deptMapper;
+    private final SysRoleDeptMapper roleDeptMapper;
+    private final SysDeptMapper deptMapper;
 
     @Override
     public String getRoleCustom(Long roleId) {

--
Gitblit v1.9.3