记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
27e934f6
Commit
27e934f6
authored
Jun 21, 2022
by
胡佳晨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
偷摸 优化志愿者sql
parent
128cf2bd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
16 deletions
+14
-16
SmileVolunteersProjectMapper.xml
...net/service/smile/mapper/SmileVolunteersProjectMapper.xml
+14
-16
No files found.
liquidnet-bus-do/liquidnet-service-smile-do/src/main/resources/com/liquidnet/service/smile/mapper/SmileVolunteersProjectMapper.xml
View file @
27e934f6
...
@@ -36,15 +36,13 @@
...
@@ -36,15 +36,13 @@
a.time_end,
a.time_end,
a.created_at,
a.created_at,
a.status,
a.status,
IF(now() >time_end,2,1)
as 'time_status',
IF(now() > time_end, 2, 1)
as 'time_status',
-- count(b0.project_id) + count(b1.project_id) + count(b2.project_id
) as 'all',
count(b0.status
) as 'all',
(select count(0) as 'count'from smile_volunteers as b0 where a.project_id = b0.project_id and b0.status = 0
) as 'un_audit',
sum(IF(b0.status = 0, 1, 0)
) as 'un_audit',
(select count(0) as 'count'from smile_volunteers as b0 where a.project_id = b0.project_id and b0.status = 1
) as 'audit',
sum(IF(b0.status = 1, 1, 0)
) as 'audit',
(select count(0) as 'count'from smile_volunteers as b0 where a.project_id = b0.project_id and b0.status = 2
) as 'refuse'
sum(IF(b0.status = 2, 1, 0)
) as 'refuse'
from smile_volunteers_project as a
from smile_volunteers_project as a
-- LEFT JOIN smile_volunteers as b0 on a.project_id = b0.project_id and b0.status = 0
LEFT JOIN smile_volunteers as b0 on a.project_id = b0.project_id
-- LEFT JOIN smile_volunteers as b1 on a.project_id = b1.project_id and b1.status = 1
-- LEFT JOIN smile_volunteers as b2 on a.project_id = b2.project_id and b2.status = 2
<where>
<where>
<if
test=
"title!='' and title !=null"
>
<if
test=
"title!='' and title !=null"
>
AND title Like concat('%',#{title},'%')
AND title Like concat('%',#{title},'%')
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment