Commit dc74ac4e authored by 宋源硕's avatar 宋源硕

Merge branch 'songyuanshuo' into 'master'

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

See merge request !6
parents f5906a79 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.selectUserListByIdsNew(reviewerIdList);
for (SysUser user : reviewerList){
user.setDept(iSysDeptService.selectDeptById(user.getDeptId()));
......
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;
......@@ -9,6 +11,7 @@ import com.ruoyi.common.core.domain.entity.SysDept;
*
* @author ruoyi
*/
@Mapper
public interface SysDeptMapper
{
/**
......
......@@ -2,12 +2,14 @@ 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
{
/**
......
......@@ -2,12 +2,14 @@ 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
{
/**
......
......@@ -5,6 +5,7 @@ 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;
......@@ -13,6 +14,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
*
* @author ruoyi
*/
@Mapper
public interface SysUserMapper
{
/**
......@@ -161,4 +163,6 @@ public interface SysUserMapper
* @return
*/
List<SysUserVO> getInspection();
List<SysUser> selectUserListByIdsNew(@Param("ids") List<Long> ids);
}
......@@ -2,12 +2,14 @@ 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
{
/**
......
......@@ -239,4 +239,6 @@ public interface ISysUserService
* @return
*/
List<SysUserVO> getInspection();
List<SysUser> selectUserListByIdsNew(List<Long> ids);
}
......@@ -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<>();
......
......@@ -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
......
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