xiangpei
2024-05-17 f4f84ef25ce94e59dfe57961fcbb3c81f738ebb8
src/main/resources/mapper/ExamPaperMapper.xml
@@ -449,4 +449,23 @@
    order by create_time desc
    </select>
    <select id="selectStudent" resultType="com.mindskip.xzs.domain.vo.UserVO" parameterType="com.mindskip.xzs.domain.vo.UserVO">
      SELECT
        a.id, a.real_name
      FROM
        t_user a
          left join t_user_tag b on a.id = b.user_id
          left join t_user_department c on a.id = c.user_id
      where
          user_name != 'admin'
          <if test="tagId != null and tagId != ''">
             and b.tag_id = #{tagId}
          </if>
          <if test="deptId != null and deptId != ''">
            and c.department_id = #{deptId}
          </if>
      group by a.id, a.real_name
      order by a.id
    </select>
</mapper>