优化
This commit is contained in:
@ -31,9 +31,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="appQueryPageList" resultType="com.ruoyi.fbs.domain.vo.AppTaskVO">
|
||||
select fpt.id,
|
||||
fpt.project_id,
|
||||
fpt.section_id,
|
||||
fpt.sub_id,
|
||||
fpt.task_name,
|
||||
fpt.task_staff_num,
|
||||
fpt.task_amount,
|
||||
fpt.task_begin_time,
|
||||
fpt.task_end_time,
|
||||
zp.project_name,
|
||||
fpt.task_describe,
|
||||
fpt.task_address,
|
||||
@ -43,13 +48,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from fbs_project_task fpt
|
||||
left join zbf_project zp on fpt.project_id = zp.id
|
||||
<where>
|
||||
<if test="dto.taskIds != null and dto.taskIds.size() > 0">
|
||||
and fpt.id IN
|
||||
<foreach item="item" index="index" collection="dto.taskIds"
|
||||
open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<choose>
|
||||
<when test="dto.myTask">
|
||||
<if test="dto.taskIds != null and dto.taskIds.size() > 0">
|
||||
and fpt.id IN
|
||||
<foreach item="item" index="index" collection="dto.taskIds"
|
||||
open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="dto.taskIds != null and dto.taskIds.size() > 0">
|
||||
and fpt.id not IN
|
||||
<foreach item="item" index="index" collection="dto.taskIds"
|
||||
open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
<if test="dto.taskName != null and dto.taskName != '' ">
|
||||
and fpt.task_name like concat('%', #{dto.taskName}, '%')
|
||||
</if>
|
||||
|
Reference in New Issue
Block a user