AdministrativeInfoMapper.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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.boman.web.core.mapper.AdministrativeInfoMapper">
  6. <resultMap type="AdministrativeInfo" id="AdministrativeInfoResult">
  7. <result property="id" column="id" />
  8. <result property="parentId" column="parent_id" />
  9. <result property="administrativeName" column="administrative_name" />
  10. <result property="status" column="status" />
  11. <result property="orderNum" column="order_num" />
  12. <result property="createBy" column="create_by" />
  13. <result property="createTime" column="create_time" />
  14. <result property="updateBy" column="update_by" />
  15. <result property="updateTime" column="update_time" />
  16. <result property="isDel" column="is_del" />
  17. <result property="remark" column="remark" />
  18. </resultMap>
  19. <sql id="selectAdministrativeInfoVo">
  20. select id,parent_id, dept_name as administrative_name, status, create_by, create_time, update_by, update_time from sys_dept
  21. </sql>
  22. <select id="selectAdministrativeInfoList" parameterType="com.boman.web.core.domain.AdministrativeInfo" resultMap="AdministrativeInfoResult">
  23. <include refid="selectAdministrativeInfoVo"/>
  24. <where>
  25. del_flag = '0'
  26. <if test="parentId != null and parentId != 0">
  27. AND parent_id = #{parentId}
  28. </if>
  29. <if test="administrativeName != null and administrativeName != ''">
  30. AND dept_name like concat('%', #{administrativeName}, '%')
  31. </if>
  32. <if test="status != null and status != ''">
  33. AND status = #{status}
  34. </if>
  35. </where>
  36. order by parent_id, order_num
  37. </select>
  38. </mapper>