修复bug

This commit is contained in:
wulin 2020-11-26 18:10:18 +08:00
parent 90fd42b7f6
commit 11eed02309

View File

@ -265,6 +265,7 @@
<if test="name != null and name != ''">
and staff.name like concat('%',#{name},'%')
</if>
group by staff.id
) as staffinfo join lz_staff_occupation as occ on occ.staff_id = staffinfo.id
where occ.is_delete=0 and occ.staff_status=#{staffStatus} order by department_leader desc
limit #{startIndex}, #{pageLimit}
@ -274,17 +275,18 @@
select count(staffinfo.id)
from
(
select staff.id as id, staff.name as name, relate.is_leader as is_leader
from lz_staff staff join lz_departments_staff_relate relate on staff.id=relate.staff_id
where staff.is_delete=0 and relate.is_delete=0
<if test="departmentId != null and departmentId != ''">
and relate.department_id=#{departmentId}
</if>
<if test="name != null and name != ''">
and staff.name like concat('%',#{name},'%')
</if>
select staff.id as id, staff.name as name, relate.is_leader as is_leader
from lz_staff staff join lz_departments_staff_relate relate on staff.id=relate.staff_id
where staff.is_delete=0 and relate.is_delete=0
<if test="departmentId != null and departmentId != ''">
and relate.department_id=#{departmentId}
</if>
<if test="name != null and name != ''">
and staff.name like concat('%',#{name},'%')
</if>
group by staff.id
) as staffinfo join lz_staff_occupation as occ on occ.staff_id = staffinfo.id
where occ.is_delete=0 and occ.staff_status=#{staffStatus} order by department_leader desc
where occ.is_delete=0 and occ.staff_status=#{staffStatus}
</select>
<select id="getBaseInfo" resultType="com.lz.modules.app.dto.StaffBaseInfoDto">