TaskMapper.xml 1.1 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.report.mapper.TaskMapper">
  4. <select id="queryTasks" resultType="cn.cslg.report.common.model.vo.TaskReportVO" >
  5. select a.* ,b.TYPE as reportType from TASK a left join REPORT b on a.REPORT_ID=b.ID
  6. <where>
  7. <if test="param.type !=null">
  8. and a.TYPE =#{param.type}
  9. </if>
  10. <if test="param.taskStatus !=null">
  11. and a.TASK_STATUS=#{param.taskStatus}
  12. </if>
  13. <if test="param.createName !=null">
  14. and a.CREATE_NAME like concat('%', #{param.createName}, '%')
  15. </if>
  16. <if test="param.taskName !=null">
  17. and a.TASK_NAME like concat('%', #{param.taskName}, '%')
  18. </if>
  19. <if test="param.roleInTask !=null and param.roleInTask == 0">
  20. and a.CREATE_ID=#{param.loginId}
  21. </if>
  22. <if test="param.roleInTask !=null and param.roleInTask == 1">
  23. and a.HANDLE_PERSON_ID=#{param.loginId}
  24. </if>
  25. </where>
  26. order by a.id desc
  27. </select>
  28. </mapper>