TaskMapper.xml 1.6 KB

123456789101112131415161718192021222324252627282930313233
  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.TaskMapper">
  4. <select id="getPageList" parameterType="cn.cslg.pas.common.model.vo.TaskVO" resultType="cn.cslg.pas.domain.Task">
  5. select a.id, a.type, a.uid as create_by, a.ctime as start_time, a.tid as project_id,
  6. a.mfields as field_num, a.mun as total, a.endtime as end_time, a.status, a.filename as file_name,
  7. a.filesize as file_size, a.downexcel as url, b.name as create_name, c.name as project_name, a.old_name
  8. from os_task a
  9. left join os_distribution b on a.uid = b.id
  10. left join os_thematic c on c.id = a.tid
  11. <where>
  12. <if test="params.createName != '' and params.createName != null">
  13. and b.name like concat('%', #{params.createName}, '%')
  14. </if>
  15. <if test="params.status != null">
  16. and a.status = #{params.status}
  17. </if>
  18. <if test="params.type != null">
  19. and a.type = #{params.type}
  20. </if>
  21. <if test="params.projectId != null">
  22. and a.tid = #{params.projectId}
  23. </if>
  24. <if test="params.productId != null">
  25. and a.product_id = #{params.productId}
  26. </if>
  27. <if test="params.projectName != '' and params.projectName != null">
  28. and c.name like concat('%', #{params.projectName}, '%')
  29. </if>
  30. </where>
  31. order by a.ctime ${params.order}
  32. </select>
  33. </mapper>