SortedDepartmentMapper.xml 1.3 KB

123456789101112131415161718192021222324252627282930
  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.dayou.mapper.SortedDepartmentMapper">
  4. <!-- 通用查询映射结果 -->
  5. <resultMap id="BaseResultMap" type="com.dayou.entity.SortedDepartment">
  6. <result column="id" property="id" />
  7. <result column="created" property="created" />
  8. <result column="modified" property="modified" />
  9. <result column="deleted" property="deleted" />
  10. <result column="department_id" property="departmentId" />
  11. <result column="business_type" property="businessType" />
  12. <result column="sorted_index" property="sortedIndex" />
  13. </resultMap>
  14. <!-- 通用查询结果列 -->
  15. <sql id="Base_Column_List">
  16. id,
  17. created,
  18. modified,
  19. deleted,
  20. department_id, business_type, sorted_index
  21. </sql>
  22. <select id="simpleAll" parameterType="java.lang.String" resultType="com.dayou.common.PullDownModel">
  23. select sd.department_id as id,d.name from sorted_department sd left join department d
  24. on d.id = sd.department_id where d.deleted =0 and sd.deleted = 0
  25. and sd.business_type = #{businessType}
  26. </select>
  27. </mapper>