Commit ba287222 authored by nie'hong's avatar nie'hong

修改查找用户状态

No related merge requests found
...@@ -15,5 +15,6 @@ import java.util.List; ...@@ -15,5 +15,6 @@ import java.util.List;
*/ */
public interface WorkUserDeptMapper extends BaseMapper<WorkUserDept> { public interface WorkUserDeptMapper extends BaseMapper<WorkUserDept> {
List<Integer> listByDeptId(Integer deptId); // 根据部门主键查询在职的用户
List<Integer> listByDeptIdAndStatus(Integer deptId);
} }
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
id, user_id, dept_id id, user_id, dept_id
</sql> </sql>
<select id="listByDeptId" resultType="integer" parameterType="integer"> <select id="listByDeptIdAndStatus" resultType="integer" parameterType="integer">
select user_id select user_id
from <include refid="table"/> from <include refid="table"/>
where dept_id = #{deptId} where dept_id = #{deptId} and status = 1
</select> </select>
</mapper> </mapper>
...@@ -103,7 +103,7 @@ public class StatisticsServiceImpl implements StatisticsService { ...@@ -103,7 +103,7 @@ public class StatisticsServiceImpl implements StatisticsService {
// 分页获取部门下所有员工主键 // 分页获取部门下所有员工主键
PageHelper.startPage(param.getCurrentPage(), param.getSize()); PageHelper.startPage(param.getCurrentPage(), param.getSize());
List<Integer> userIds = workUserDeptMapper.listByDeptId(deptId); List<Integer> userIds = workUserDeptMapper.listByDeptIdAndStatus(deptId);
PageInfo pageInfo = new PageInfo(userIds); PageInfo pageInfo = new PageInfo(userIds);
// 获取用户姓名、部门名称 // 获取用户姓名、部门名称
List<StatisticsTableDto> statisticsTableDtos = workUserMapper.getStatisticsTableDtos(userIds); List<StatisticsTableDto> statisticsTableDtos = workUserMapper.getStatisticsTableDtos(userIds);
......
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