Commit 3c019e4b authored by yuanshuo's avatar yuanshuo

修改获取评审人员列表接口/review/scene/change/task/getReviewerList

parent f5906a79
...@@ -522,9 +522,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha ...@@ -522,9 +522,8 @@ public class ReviewSceneChangeTaskServiceImpl extends ServiceImpl<ReviewSceneCha
public List<SysUser> getReviewList() { public List<SysUser> getReviewList() {
// 获取用户ID列表 // 获取用户ID列表
List<Long> reviewerIdList = sysUserRoleMapper.selectReviewerIdByRoleId(ReviewSceneChangeTask.REVIEW_ROLE_ID); List<Long> reviewerIdList = sysUserRoleMapper.selectReviewerIdByRoleId(ReviewSceneChangeTask.REVIEW_ROLE_ID);
System.out.println(reviewerIdList + "========");
// 获取用户列表 // 获取用户列表
List<SysUser> reviewerList = sysUserService.selectUserListByIds(reviewerIdList); List<SysUser> reviewerList = sysUserService.selectUserListByIdsNew(reviewerIdList);
for (SysUser user : reviewerList){ for (SysUser user : reviewerList){
user.setDept(iSysDeptService.selectDeptById(user.getDeptId())); user.setDept(iSysDeptService.selectDeptById(user.getDeptId()));
......
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysDept;
...@@ -9,6 +11,7 @@ import com.ruoyi.common.core.domain.entity.SysDept; ...@@ -9,6 +11,7 @@ import com.ruoyi.common.core.domain.entity.SysDept;
* *
* @author ruoyi * @author ruoyi
*/ */
@Mapper
public interface SysDeptMapper public interface SysDeptMapper
{ {
/** /**
......
...@@ -2,12 +2,14 @@ package com.ruoyi.system.mapper; ...@@ -2,12 +2,14 @@ package com.ruoyi.system.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.SysPost; import com.ruoyi.system.domain.SysPost;
import org.apache.ibatis.annotations.Mapper;
/** /**
* 岗位信息 数据层 * 岗位信息 数据层
* *
* @author ruoyi * @author ruoyi
*/ */
@Mapper
public interface SysPostMapper public interface SysPostMapper
{ {
/** /**
......
...@@ -2,12 +2,14 @@ package com.ruoyi.system.mapper; ...@@ -2,12 +2,14 @@ package com.ruoyi.system.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.common.core.domain.entity.SysRole;
import org.apache.ibatis.annotations.Mapper;
/** /**
* 角色表 数据层 * 角色表 数据层
* *
* @author ruoyi * @author ruoyi
*/ */
@Mapper
public interface SysRoleMapper public interface SysRoleMapper
{ {
/** /**
......
...@@ -5,6 +5,7 @@ import java.util.List; ...@@ -5,6 +5,7 @@ import java.util.List;
import com.ruoyi.system.domain.vo.SysUserVO; import com.ruoyi.system.domain.vo.SysUserVO;
import com.ruoyi.system.domain.vo.UserCountVo; import com.ruoyi.system.domain.vo.UserCountVo;
import com.ruoyi.system.request.InspectionRequest; import com.ruoyi.system.request.InspectionRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
...@@ -13,6 +14,7 @@ import com.ruoyi.common.core.domain.entity.SysUser; ...@@ -13,6 +14,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
* *
* @author ruoyi * @author ruoyi
*/ */
@Mapper
public interface SysUserMapper public interface SysUserMapper
{ {
/** /**
...@@ -161,4 +163,6 @@ public interface SysUserMapper ...@@ -161,4 +163,6 @@ public interface SysUserMapper
* @return * @return
*/ */
List<SysUserVO> getInspection(); List<SysUserVO> getInspection();
List<SysUser> selectUserListByIdsNew(@Param("ids") List<Long> ids);
} }
...@@ -2,12 +2,14 @@ package com.ruoyi.system.mapper; ...@@ -2,12 +2,14 @@ package com.ruoyi.system.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.SysUserPost; import com.ruoyi.system.domain.SysUserPost;
import org.apache.ibatis.annotations.Mapper;
/** /**
* 用户与岗位关联表 数据层 * 用户与岗位关联表 数据层
* *
* @author ruoyi * @author ruoyi
*/ */
@Mapper
public interface SysUserPostMapper public interface SysUserPostMapper
{ {
/** /**
......
...@@ -239,4 +239,6 @@ public interface ISysUserService ...@@ -239,4 +239,6 @@ public interface ISysUserService
* @return * @return
*/ */
List<SysUserVO> getInspection(); List<SysUserVO> getInspection();
List<SysUser> selectUserListByIdsNew(List<Long> ids);
} }
...@@ -621,6 +621,11 @@ public class SysUserServiceImpl implements ISysUserService ...@@ -621,6 +621,11 @@ public class SysUserServiceImpl implements ISysUserService
return deduplicatedList; 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) { 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<>(); java.util.Map<Object, Boolean> seen = new java.util.concurrent.ConcurrentHashMap<>();
......
...@@ -149,6 +149,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -149,6 +149,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{userId} #{userId}
</foreach> </foreach>
</select> </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 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 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 LEFT JOIN sys_dept d ON u.dept_id = d.dept_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment