OfficeDao.xml 796 B

12345678910111213141516171819202122
  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.jeesite.modules.sys.dao.OfficeDao">
  4. <!-- 查询数据(支持根据公司编码查询部门) -->
  5. <select id="findList" resultType="Office">
  6. SELECT ${sqlMap.column.toSql()}
  7. FROM ${sqlMap.table.toSql()}
  8. <if test="companyCode != null and companyCode != ''">
  9. JOIN ${_prefix}sys_company_office b ON a.office_code = b.office_code
  10. JOIN ${_prefix}sys_company c ON c.company_code = b.company_code
  11. </if>
  12. <where>
  13. ${sqlMap.where.toSql()}
  14. <if test="companyCode != null and companyCode != ''">
  15. AND b.company_code = #{companyCode}
  16. </if>
  17. </where>
  18. ORDER BY ${sqlMap.order.toSql()}
  19. </select>
  20. </mapper>