XjrUserMapper.xml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.xjrsoft.module.teacher.mapper.XjrUserMapper">
  6. <select id="getUserIdByClassId" parameterType="java.lang.Long"
  7. resultType="java.lang.Long">
  8. SELECT
  9. t.id
  10. FROM xjr_user t
  11. LEFT JOIN base_student_school_roll t1 ON (t1.user_id = t.id)
  12. WHERE t.delete_mark = 0 and t1.class_id = #{classId}
  13. order by t.id;
  14. </select>
  15. <select id="getTeacherDeptInfo" parameterType="com.xjrsoft.module.concat.dto.ConcatTreeDto" resultType="com.xjrsoft.module.teacher.entity.XjrUser">
  16. SELECT t1.id, t1.name,t1.mobile,t2.dept_id as parent_id,t1.gender FROM xjr_user t1
  17. INNER JOIN xjr_user_dept_relation t2 ON t1.id = t2.user_id
  18. inner join xjr_department t4 on t2.dept_id = t4.id
  19. INNER JOIN base_teacher t3 ON t1.id = t3.user_id
  20. WHERE t1.delete_mark = 0 and t4.delete_mark = 0
  21. <if test="dto.name != null and dto.name != ''">
  22. and t1.name like concat('%', #{dto.name}, '%')
  23. </if>
  24. <if test="dto.mobile != null and dto.mobile != ''">
  25. and t1.mobile like concat('%', #{dto.mobile}, '%')
  26. </if>
  27. </select>
  28. <select id="getAttendanceTeacherUser" parameterType="com.xjrsoft.module.attendance.dto.AddAttendanceRuleCategoryDto" resultType="com.xjrsoft.module.concat.vo.ConcatTreeVo">
  29. SELECT t.id, t.user_name, t.name, t.code, t.nick_name, t.password, t.gender, t.mobile, t.avatar, t.email, t.address,
  30. t.longitude, t.latitude, t.sort_code, t.remark, t.credential_type, t.credential_number, t.create_user_id, t.create_date,
  31. t.modify_user_id, t.modify_date, t.delete_mark, t.enabled_mark, t.open_id, t.union_id, t.sign_folder_id, t.sign_password FROM xjr_user t
  32. LEFT JOIN base_teacher t1 ON (t1.user_id = t.id)
  33. LEFT JOIN xjr_user_dept_relation t2 ON (t2.user_id = t.id) WHERE t.delete_mark = 0 AND t1.delete_mark = 0
  34. AND t1.delete_mark = 0
  35. <!--<if test="dto."></if>-->
  36. </select>
  37. </mapper>