Skip to content

Commit 8fd14d4

Browse files
committed
Merge branch 'master' of github.com:elunez/eladmin
2 parents fdf82d2 + 5381ac3 commit 8fd14d4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static File toFile(MultipartFile multipartFile) {
9595
File file = null;
9696
try {
9797
// 用uuid作为文件名,防止生成的临时文件重复
98-
file = File.createTempFile(IdUtil.simpleUUID(), prefix);
98+
file = new File(SYS_TEM_DIR + IdUtil.simpleUUID() + prefix);
9999
// MultipartFile to File
100100
multipartFile.transferTo(file);
101101
} catch (IOException e) {

eladmin-system/src/main/java/me/zhengjie/modules/system/repository/UserRepository.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ public interface UserRepository extends JpaRepository<User, Long>, JpaSpecificat
8181

8282
/**
8383
* 根据角色中的部门查询
84-
* @param id /
84+
* @param deptId /
8585
* @return /
8686
*/
8787
@Query(value = "SELECT u.* FROM sys_user u, sys_users_roles r, sys_roles_depts d WHERE " +
88-
"u.user_id = r.user_id AND r.role_id = d.role_id AND r.role_id = ?1 group by u.user_id", nativeQuery = true)
89-
List<User> findByDeptRoleId(Long id);
88+
"u.user_id = r.user_id AND r.role_id = d.role_id AND d.dept_id = ?1 group by u.user_id", nativeQuery = true)
89+
List<User> findByRoleDeptId(Long deptId);
9090

9191
/**
9292
* 根据菜单查询

eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/DeptServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ private List<DeptDto> deduplication(List<DeptDto> list) {
273273
* @param id /
274274
*/
275275
public void delCaches(Long id){
276-
List<User> users = userRepository.findByDeptRoleId(id);
276+
List<User> users = userRepository.findByRoleDeptId(id);
277277
// 删除数据权限
278278
redisUtils.delByKeys(CacheKey.DATA_USER, users.stream().map(User::getId).collect(Collectors.toSet()));
279279
redisUtils.del(CacheKey.DEPT_ID + id);

0 commit comments

Comments
 (0)