ProjectJudgeMapper.xml
1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?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="com.subsidy.mapper.ProjectJudgeMapper">
<select id="getProjectJudgePage" resultType="com.subsidy.vo.judge.ProjectJudgePageVO">
select
*
from project_judge
<where>
<if test="username != null and username != ''">
and username like concat('%', #{username}, '%')
</if>
<if test="status != null and status != ''">
and status = #{status}
</if>
and delete_date is null
</where>
</select>
<select id="projectJudgesAssigned" resultType="com.subsidy.vo.judge.ProjectJudgePageVO">
select
pj.*
from project_judge pj
left join project_review pr on pr.judge_id = pj.id
left join project p on p.id = pr.project_id
<where>
<if test="projectGroup != null and projectGroup != ''">
and p.project_group = #{projectGroup}
</if>
<if test="projectSchedule != null and projectSchedule != ''">
and p.project_schedule = #{projectSchedule}
</if>
and p.match_id = #{matchId}
and pj.status = 1
and p.delete_date is null
and pj.delete_date is null
and pr.delete_date is null
</where>
group by pj.id
</select>
<select id="projectCount" resultType="java.lang.Integer">
SELECT
count(0)
from project_review t1
LEFT JOIN project t2 on t1.project_id = t2.id
LEFT JOIN match_dict t3 on t2.match_id = t3.id
where t1.delete_date is NULL
and t2.delete_date is NULL
and t3.delete_date is NULL
and t3.`status` = 1
and t1.judge_id = #{judgeId}
</select>
</mapper>