ProjectFieldMapper.xml 1.3 KB

1234567891011121314151617181920212223242526272829
  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="cn.cslg.pas.mapper.ProjectFieldMapper">
  4. <select id="getPageList" parameterType="cn.cslg.pas.common.model.vo.ProjectFieldVO" resultType="cn.cslg.pas.domain.ProjectField">
  5. select a.id, a.name, a.ptype, a.type, a.status, a.remark, a.cid as create_by,
  6. a.createtime as create_time, c.name as create_name, d.id as project_id, d.name as project_name
  7. from os_patent_field a
  8. left join os_distribution c on c.id = a.cid
  9. left join os_thematic d on d.id = a.project_id
  10. <where>
  11. <if test="params.name != '' and params.name != null">
  12. and a.name like concat('%', #{params.name}, '%')
  13. </if>
  14. <if test="params.type != null">
  15. and a.type = #{params.type}
  16. </if>
  17. <if test="params.status != null">
  18. and a.status = #{params.status}
  19. </if>
  20. <if test="params.projectId != null">
  21. and a.project_id = #{params.projectId}
  22. </if>
  23. <if test="params.tenantId">
  24. and d.tenantId=#{params.tenantId}
  25. </if>
  26. </where>
  27. order by a.createtime ${params.order}
  28. </select>
  29. </mapper>