SysDeptMapper.xml 824 B

1234567891011121314151617181920212223
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.jzg.organization.mapper.SysDeptMapper">
  4. <select id="getMaxId" resultType="java.lang.String">
  5. SELECT IFNULL(MAX(id), 0) maxid
  6. FROM `sys_dept`
  7. WHERE parent_id = #{deptId}
  8. <if test='comLevel != null and comLevel != ""'>
  9. and comlevel = #{comlevel}
  10. </if>
  11. </select>
  12. <select id="selectDeptList" resultType="com.jzg.organization.entity.po.SysDept">
  13. select
  14. <if test="ew.getSqlSelect != null">
  15. ${ew.getSqlSelect}
  16. </if>
  17. <if test="ew.getSqlSelect == null">
  18. *
  19. </if>
  20. from sys_dept ${ew.getCustomSqlSegment}
  21. </select>
  22. </mapper>