<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="org.springblade.modules.workreport.mapper.WorkReportMapper">
|
|
<!--工作汇报分页信息-->
|
<select id="selectWorkReportPage" resultType="org.springblade.modules.workreport.vo.WorkReportVo">
|
SELECT
|
swr.*,bu.real_name realName,bt.dept_name AS deptName
|
FROM
|
sys_work_report swr
|
left join
|
blade_user bu
|
on
|
bu.id = swr.user_id
|
LEFT JOIN
|
blade_dept bt
|
ON
|
swr.dept_id = bt.id
|
WHERE
|
1=1
|
<if test="workReport.realName!=null and workReport.realName!=''">
|
and bu.real_name like concat('%', #{workReport.realName},'%')
|
</if>
|
<if test="workReport.type!=null">
|
and swr.type = #{workReport.type}
|
</if>
|
<if test="workReport.userId!=null">
|
and swr.user_id = #{workReport.userId}
|
</if>
|
<if test="workReport.category!=null">
|
and swr.category = #{workReport.category}
|
</if>
|
</select>
|
|
<!--工作汇报分页信息-->
|
<select id="selectWorkReplyPage" resultType="org.springblade.modules.workreport.vo.WorkReportVo">
|
SELECT
|
swr.*,bu.real_name realName,bt.dept_name AS deptName
|
FROM
|
sys_work_report swr
|
left join
|
blade_user bu
|
on
|
bu.id = swr.user_id
|
LEFT JOIN
|
blade_dept bt
|
ON
|
swr.dept_id = bt.id
|
WHERE
|
1=1
|
<if test="workReport.realName!=null and workReport.realName!=''">
|
and bu.real_name like concat('%', #{workReport.realName},'%')
|
</if>
|
<if test="workReport.type!=null">
|
and swr.type = #{workReport.type}
|
</if>
|
<if test="workReport.userId!=null">
|
and swr.received_ids like concat('%', #{workReport.userId},'%')
|
</if>
|
<if test="workReport.category!=null">
|
and swr.category = #{workReport.category}
|
</if>
|
</select>
|
|
|
|
<!--工作汇报详情信息-->
|
<select id="selectWorkReportInfo" resultType="org.springblade.modules.workreport.vo.WorkReportVo">
|
SELECT
|
swr.*,bu.real_name realName,bt.dept_name AS deptName
|
FROM
|
sys_work_report swr
|
left join
|
blade_user bu
|
on
|
bu.id = swr.user_id
|
LEFT JOIN
|
blade_dept bt
|
ON
|
swr.dept_id = bt.id
|
WHERE
|
1=1
|
<if test="workReport.id!=null">
|
and swr.id = #{workReport.id}
|
</if>
|
</select>
|
</mapper>
|