Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
car-database-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
中汽研标准应用数据库
car-database-api
Commits
3c019e4b
Commit
3c019e4b
authored
Sep 05, 2024
by
yuanshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改获取评审人员列表接口/review/scene/change/task/getReviewerList
parent
f5906a79
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
104 additions
and
78 deletions
+104
-78
ReviewSceneChangeTaskServiceImpl.java
.../ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
+1
-2
SysDeptMapper.java
.../src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
+17
-14
SysPostMapper.java
.../src/main/java/com/ruoyi/system/mapper/SysPostMapper.java
+14
-12
SysRoleMapper.java
.../src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java
+15
-13
SysUserMapper.java
.../src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
+17
-13
SysUserPostMapper.java
.../main/java/com/ruoyi/system/mapper/SysUserPostMapper.java
+7
-5
ISysUserService.java
...c/main/java/com/ruoyi/system/service/ISysUserService.java
+2
-0
SysUserServiceImpl.java
...ava/com/ruoyi/system/service/impl/SysUserServiceImpl.java
+5
-0
SysUserMapper.xml
...system/src/main/resources/mapper/system/SysUserMapper.xml
+26
-19
No files found.
quality-review/src/main/java/com/ruoyi/service/impl/ReviewSceneChangeTaskServiceImpl.java
View file @
3c019e4b
...
...
@@ -522,9 +522,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
public
List
<
SysUser
>
getReviewList
()
{
// 获取用户ID列表
List
<
Long
>
reviewerIdList
=
sysUserRoleMapper
.
selectReviewerIdByRoleId
(
ReviewSceneChangeTask
.
REVIEW_ROLE_ID
);
System
.
out
.
println
(
reviewerIdList
+
"========"
);
// 获取用户列表
List
<
SysUser
>
reviewerList
=
sysUserService
.
selectUserListByIds
(
reviewerIdList
);
List
<
SysUser
>
reviewerList
=
sysUserService
.
selectUserListByIds
New
(
reviewerIdList
);
for
(
SysUser
user
:
reviewerList
){
user
.
setDept
(
iSysDeptService
.
selectDeptById
(
user
.
getDeptId
()));
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java
View file @
3c019e4b
package
com
.
ruoyi
.
system
.
mapper
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
com.ruoyi.common.core.domain.entity.SysDept
;
/**
* 部门管理 数据层
*
*
* @author ruoyi
*/
@Mapper
public
interface
SysDeptMapper
{
/**
* 查询部门管理数据
*
*
* @param dept 部门信息
* @return 部门信息集合
*/
...
...
@@ -21,7 +24,7 @@ public interface SysDeptMapper
/**
* 根据角色ID查询部门树信息
*
*
* @param roleId 角色ID
* @param deptCheckStrictly 部门树选择项是否关联显示
* @return 选中部门列表
...
...
@@ -30,7 +33,7 @@ public interface SysDeptMapper
/**
* 根据部门ID查询信息
*
*
* @param deptId 部门ID
* @return 部门信息
*/
...
...
@@ -38,7 +41,7 @@ public interface SysDeptMapper
/**
* 根据ID查询所有子部门
*
*
* @param deptId 部门ID
* @return 部门列表
*/
...
...
@@ -46,7 +49,7 @@ public interface SysDeptMapper
/**
* 根据ID查询所有子部门(正常状态)
*
*
* @param deptId 部门ID
* @return 子部门数
*/
...
...
@@ -54,7 +57,7 @@ public interface SysDeptMapper
/**
* 是否存在子节点
*
*
* @param deptId 部门ID
* @return 结果
*/
...
...
@@ -62,7 +65,7 @@ public interface SysDeptMapper
/**
* 查询部门是否存在用户
*
*
* @param deptId 部门ID
* @return 结果
*/
...
...
@@ -70,7 +73,7 @@ public interface SysDeptMapper
/**
* 校验部门名称是否唯一
*
*
* @param deptName 部门名称
* @param parentId 父部门ID
* @return 结果
...
...
@@ -79,7 +82,7 @@ public interface SysDeptMapper
/**
* 新增部门信息
*
*
* @param dept 部门信息
* @return 结果
*/
...
...
@@ -87,7 +90,7 @@ public interface SysDeptMapper
/**
* 修改部门信息
*
*
* @param dept 部门信息
* @return 结果
*/
...
...
@@ -95,14 +98,14 @@ public interface SysDeptMapper
/**
* 修改所在部门正常状态
*
*
* @param deptIds 部门ID组
*/
public
void
updateDeptStatusNormal
(
Long
[]
deptIds
);
/**
* 修改子元素关系
*
*
* @param depts 子元素
* @return 结果
*/
...
...
@@ -110,7 +113,7 @@ public interface SysDeptMapper
/**
* 删除部门管理信息
*
*
* @param deptId 部门ID
* @return 结果
*/
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java
View file @
3c019e4b
...
...
@@ -2,17 +2,19 @@ package com.ruoyi.system.mapper;
import
java.util.List
;
import
com.ruoyi.system.domain.SysPost
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 岗位信息 数据层
*
*
* @author ruoyi
*/
@Mapper
public
interface
SysPostMapper
{
/**
* 查询岗位数据集合
*
*
* @param post 岗位信息
* @return 岗位数据集合
*/
...
...
@@ -20,14 +22,14 @@ public interface SysPostMapper
/**
* 查询所有岗位
*
*
* @return 岗位列表
*/
public
List
<
SysPost
>
selectPostAll
();
/**
* 通过岗位ID查询岗位信息
*
*
* @param postId 岗位ID
* @return 角色对象信息
*/
...
...
@@ -35,7 +37,7 @@ public interface SysPostMapper
/**
* 根据用户ID获取岗位选择框列表
*
*
* @param userId 用户ID
* @return 选中岗位ID列表
*/
...
...
@@ -43,7 +45,7 @@ public interface SysPostMapper
/**
* 查询用户所属岗位组
*
*
* @param userName 用户名
* @return 结果
*/
...
...
@@ -51,7 +53,7 @@ public interface SysPostMapper
/**
* 删除岗位信息
*
*
* @param postId 岗位ID
* @return 结果
*/
...
...
@@ -59,7 +61,7 @@ public interface SysPostMapper
/**
* 批量删除岗位信息
*
*
* @param postIds 需要删除的岗位ID
* @return 结果
*/
...
...
@@ -67,7 +69,7 @@ public interface SysPostMapper
/**
* 修改岗位信息
*
*
* @param post 岗位信息
* @return 结果
*/
...
...
@@ -75,7 +77,7 @@ public interface SysPostMapper
/**
* 新增岗位信息
*
*
* @param post 岗位信息
* @return 结果
*/
...
...
@@ -83,7 +85,7 @@ public interface SysPostMapper
/**
* 校验岗位名称
*
*
* @param postName 岗位名称
* @return 结果
*/
...
...
@@ -91,7 +93,7 @@ public interface SysPostMapper
/**
* 校验岗位编码
*
*
* @param postCode 岗位编码
* @return 结果
*/
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java
View file @
3c019e4b
...
...
@@ -2,17 +2,19 @@ package com.ruoyi.system.mapper;
import
java.util.List
;
import
com.ruoyi.common.core.domain.entity.SysRole
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 角色表 数据层
*
*
* @author ruoyi
*/
@Mapper
public
interface
SysRoleMapper
{
/**
* 根据条件分页查询角色数据
*
*
* @param role 角色信息
* @return 角色数据集合信息
*/
...
...
@@ -20,7 +22,7 @@ public interface SysRoleMapper
/**
* 根据用户ID查询角色
*
*
* @param userId 用户ID
* @return 角色列表
*/
...
...
@@ -28,14 +30,14 @@ public interface SysRoleMapper
/**
* 查询所有角色
*
*
* @return 角色列表
*/
public
List
<
SysRole
>
selectRoleAll
();
/**
* 根据用户ID获取角色选择框列表
*
*
* @param userId 用户ID
* @return 选中角色ID列表
*/
...
...
@@ -43,7 +45,7 @@ public interface SysRoleMapper
/**
* 通过角色ID查询角色
*
*
* @param roleId 角色ID
* @return 角色对象信息
*/
...
...
@@ -51,7 +53,7 @@ public interface SysRoleMapper
/**
* 根据用户ID查询角色
*
*
* @param userName 用户名
* @return 角色列表
*/
...
...
@@ -59,7 +61,7 @@ public interface SysRoleMapper
/**
* 校验角色名称是否唯一
*
*
* @param roleName 角色名称
* @return 角色信息
*/
...
...
@@ -67,7 +69,7 @@ public interface SysRoleMapper
/**
* 校验角色权限是否唯一
*
*
* @param roleKey 角色权限
* @return 角色信息
*/
...
...
@@ -75,7 +77,7 @@ public interface SysRoleMapper
/**
* 修改角色信息
*
*
* @param role 角色信息
* @return 结果
*/
...
...
@@ -83,7 +85,7 @@ public interface SysRoleMapper
/**
* 新增角色信息
*
*
* @param role 角色信息
* @return 结果
*/
...
...
@@ -91,7 +93,7 @@ public interface SysRoleMapper
/**
* 通过角色ID删除角色
*
*
* @param roleId 角色ID
* @return 结果
*/
...
...
@@ -99,7 +101,7 @@ public interface SysRoleMapper
/**
* 批量删除角色信息
*
*
* @param roleIds 需要删除的角色ID
* @return 结果
*/
...
...
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
View file @
3c019e4b
...
...
@@ -5,19 +5,21 @@ import java.util.List;
import
com.ruoyi.system.domain.vo.SysUserVO
;
import
com.ruoyi.system.domain.vo.UserCountVo
;
import
com.ruoyi.system.request.InspectionRequest
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
com.ruoyi.common.core.domain.entity.SysUser
;
/**
* 用户表 数据层
*
*
* @author ruoyi
*/
@Mapper
public
interface
SysUserMapper
{
/**
* 根据条件分页查询用户列表
*
*
* @param sysUser 用户信息
* @return 用户信息集合信息
*/
...
...
@@ -25,7 +27,7 @@ public interface SysUserMapper
/**
* 根据条件分页查询已配用户角色列表
*
*
* @param user 用户信息
* @return 用户信息集合信息
*/
...
...
@@ -33,7 +35,7 @@ public interface SysUserMapper
/**
* 根据条件分页查询未分配用户角色列表
*
*
* @param user 用户信息
* @return 用户信息集合信息
*/
...
...
@@ -41,7 +43,7 @@ public interface SysUserMapper
/**
* 通过用户名查询用户
*
*
* @param userName 用户名
* @return 用户对象信息
*/
...
...
@@ -49,7 +51,7 @@ public interface SysUserMapper
/**
* 通过用户ID查询用户
*
*
* @param userId 用户ID
* @return 用户对象信息
*/
...
...
@@ -57,7 +59,7 @@ public interface SysUserMapper
/**
* 新增用户信息
*
*
* @param user 用户信息
* @return 结果
*/
...
...
@@ -65,7 +67,7 @@ public interface SysUserMapper
/**
* 修改用户信息
*
*
* @param user 用户信息
* @return 结果
*/
...
...
@@ -73,7 +75,7 @@ public interface SysUserMapper
/**
* 修改用户头像
*
*
* @param userName 用户名
* @param avatar 头像地址
* @return 结果
...
...
@@ -82,7 +84,7 @@ public interface SysUserMapper
/**
* 重置用户密码
*
*
* @param userName 用户名
* @param password 密码
* @return 结果
...
...
@@ -91,7 +93,7 @@ public interface SysUserMapper
/**
* 通过用户ID删除用户
*
*
* @param userId 用户ID
* @return 结果
*/
...
...
@@ -99,7 +101,7 @@ public interface SysUserMapper
/**
* 批量删除用户信息
*
*
* @param userIds 需要删除的用户ID
* @return 结果
*/
...
...
@@ -107,7 +109,7 @@ public interface SysUserMapper
/**
* 校验用户名称是否唯一
*
*
* @param userName 用户名称
* @return 结果
*/
...
...
@@ -161,4 +163,6 @@ public interface SysUserMapper
* @return
*/
List
<
SysUserVO
>
getInspection
();
List
<
SysUser
>
selectUserListByIdsNew
(
@Param
(
"ids"
)
List
<
Long
>
ids
);
}
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java
View file @
3c019e4b
...
...
@@ -2,17 +2,19 @@ package com.ruoyi.system.mapper;
import
java.util.List
;
import
com.ruoyi.system.domain.SysUserPost
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 用户与岗位关联表 数据层
*
*
* @author ruoyi
*/
@Mapper
public
interface
SysUserPostMapper
{
/**
* 通过用户ID删除用户和岗位关联
*
*
* @param userId 用户ID
* @return 结果
*/
...
...
@@ -20,7 +22,7 @@ public interface SysUserPostMapper
/**
* 通过岗位ID查询岗位使用数量
*
*
* @param postId 岗位ID
* @return 结果
*/
...
...
@@ -28,7 +30,7 @@ public interface SysUserPostMapper
/**
* 批量删除用户和岗位关联
*
*
* @param ids 需要删除的数据ID
* @return 结果
*/
...
...
@@ -36,7 +38,7 @@ public interface SysUserPostMapper
/**
* 批量新增用户岗位信息
*
*
* @param userPostList 用户岗位列表
* @return 结果
*/
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java
View file @
3c019e4b
...
...
@@ -239,4 +239,6 @@ public interface ISysUserService
* @return
*/
List
<
SysUserVO
>
getInspection
();
List
<
SysUser
>
selectUserListByIdsNew
(
List
<
Long
>
ids
);
}
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
View file @
3c019e4b
...
...
@@ -621,6 +621,11 @@ public class SysUserServiceImpl implements ISysUserService
return
deduplicatedList
;
}
@Override
public
List
<
SysUser
>
selectUserListByIdsNew
(
List
<
Long
>
ids
)
{
return
userMapper
.
selectUserListByIdsNew
(
ids
);
}
// 辅助方法,用于去重
private
static
<
T
>
java
.
util
.
function
.
Predicate
<
T
>
distinctByKey
(
java
.
util
.
function
.
Function
<?
super
T
,
?>
keyExtractor
)
{
java
.
util
.
Map
<
Object
,
Boolean
>
seen
=
new
java
.
util
.
concurrent
.
ConcurrentHashMap
<>();
...
...
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
3c019e4b
...
...
@@ -27,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<association
property=
"dept"
javaType=
"SysDept"
resultMap=
"deptResult"
/>
<collection
property=
"roles"
javaType=
"java.util.List"
resultMap=
"RoleResult"
/>
</resultMap>
<resultMap
id=
"deptResult"
type=
"SysDept"
>
<id
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"parentId"
column=
"parent_id"
/>
...
...
@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"leader"
column=
"leader"
/>
<result
property=
"status"
column=
"dept_status"
/>
</resultMap>
<resultMap
id=
"RoleResult"
type=
"SysRole"
>
<id
property=
"roleId"
column=
"role_id"
/>
<result
property=
"roleName"
column=
"role_name"
/>
...
...
@@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"dataScope"
column=
"data_scope"
/>
<result
property=
"status"
column=
"role_status"
/>
</resultMap>
<sql
id=
"selectUserVo"
>
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.signature_picture,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
...
...
@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
</sql>
<select
id=
"selectUserList"
parameterType=
"SysUser"
resultMap=
"SysUserResult"
>
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
...
...
@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
<select
id=
"selectAllocatedList"
parameterType=
"SysUser"
resultMap=
"SysUserResult"
>
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
from sys_user u
...
...
@@ -102,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
<select
id=
"selectUnallocatedList"
parameterType=
"SysUser"
resultMap=
"SysUserResult"
>
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
from sys_user u
...
...
@@ -120,25 +120,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 -->
${params.dataScope}
</select>
<select
id=
"selectUserByUserName"
parameterType=
"String"
resultMap=
"SysUserResult"
>
<include
refid=
"selectUserVo"
/>
where u.user_name = #{userName} and u.del_flag = '0'
</select>
<select
id=
"selectUserById"
parameterType=
"Long"
resultMap=
"SysUserResult"
>
<include
refid=
"selectUserVo"
/>
where u.user_id = #{userId}
</select>
<select
id=
"checkUserNameUnique"
parameterType=
"String"
resultMap=
"SysUserResult"
>
select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1
</select>
<select
id=
"checkPhoneUnique"
parameterType=
"String"
resultMap=
"SysUserResult"
>
select user_id, phonenumber from sys_user where phonenumber = #{phonenumber} and del_flag = '0' limit 1
</select>
<select
id=
"checkEmailUnique"
parameterType=
"String"
resultMap=
"SysUserResult"
>
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
</select>
...
...
@@ -149,6 +149,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{userId}
</foreach>
</select>
<select
id=
"selectUserListByIdsNew"
resultType=
"com.ruoyi.common.core.domain.entity.SysUser"
>
select * from sys_user u
where u.del_flag = '0' and u.user_id in
<foreach
collection=
"ids"
item=
"userId"
open=
"("
separator=
","
close=
")"
>
#{userId}
</foreach>
</select>
<select
id=
"selectUserListByRoleId"
resultMap=
"SysUserResult"
>
SELECT u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
LEFT JOIN sys_dept d ON u.dept_id = d.dept_id
...
...
@@ -188,7 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sysdate()
)
</insert>
<update
id=
"updateUser"
parameterType=
"SysUser"
>
update sys_user
<set>
...
...
@@ -210,28 +217,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</set>
where user_id = #{userId}
</update>
<update
id=
"updateUserStatus"
parameterType=
"SysUser"
>
update sys_user set status = #{status} where user_id = #{userId}
</update>
<update
id=
"updateUserAvatar"
parameterType=
"SysUser"
>
update sys_user set avatar = #{avatar} where user_name = #{userName}
</update>
<update
id=
"resetUserPwd"
parameterType=
"SysUser"
>
update sys_user set password = #{password} where user_name = #{userName}
</update>
<delete
id=
"deleteUserById"
parameterType=
"Long"
>
update sys_user set del_flag = '2' where user_id = #{userId}
</delete>
<delete
id=
"deleteUserByIds"
parameterType=
"Long"
>
update sys_user set del_flag = '2' where user_id in
<foreach
collection=
"array"
item=
"userId"
open=
"("
separator=
","
close=
")"
>
#{userId}
</foreach>
</foreach>
</delete>
<select
id=
"countTaskByUserId"
resultType=
"com.ruoyi.system.domain.vo.UserCountVo"
>
select count(*) countNum, tr.user_id userId, s.nick_name nikeName
...
...
@@ -261,4 +268,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and u.del_flag = '0'
</select>
</mapper>
\ No newline at end of file
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment