CadreDeptMapper.xml 912 B

12345678910111213141516171819202122
  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.student.mapper.CadreDeptMapper">
  6. <select id="getCadreDeptTree" parameterType="com.xjrsoft.module.student.dto.CadreDeptTreeDto"
  7. resultType="com.xjrsoft.module.student.vo.CadreDeptTreeVo">
  8. SELECT
  9. t.*,
  10. t1.name AS instructorUserIdCN
  11. FROM cadre_dept t
  12. LEFT JOIN xjr_user t1 ON (t1.id = t.instructor_user_id)
  13. WHERE t.delete_mark = 0
  14. <if test="dto.name != null and dto.name !=''">
  15. and t.name like concat('%', #{dto.name},'%')
  16. </if>
  17. <if test="dto.code != null and dto.code !=''">
  18. and t.code like concat('%', #{dto.code},'%')
  19. </if>
  20. ORDER BY t.id DESC
  21. </select>
  22. </mapper>