记得上下班打卡 | git大法好,push需谨慎

Commit 568d09bb authored by 胡佳晨's avatar 胡佳晨

修改 志愿者列表sql

parent 910b1824
......@@ -63,8 +63,11 @@
},
{
field: 'all',
title: '报名人数'
field: 'unAudit',
title: '报名人数',
formatter: function (value, row, index) {
return row.unAudit + row.audit + row.refuse
}
},
{
field: 'unAudit',
......@@ -90,16 +93,16 @@
field: 'timeStart',
title: '活动时间',
formatter: function (value, row, index) {
return row.timeStart.split("T")[0] +" 至 "+row.timeEnd.split("T")[0]
return row.timeStart.split("T")[0] + " 至 " + row.timeEnd.split("T")[0]
}
},
{
field: 'timeStatus',
title: '活动状态',
formatter: function (value, row, index) {
if(value===1){
if (value === 1) {
return "活动中"
}else{
} else {
return "已结束";
}
}
......@@ -133,7 +136,7 @@
});
function f(a1, a2) {
$.post(smilePrefix +"/project/status", {projectId: a1, status: a2}, function (res) {
$.post(smilePrefix + "/project/status", {projectId: a1, status: a2}, function (res) {
alert(res.msg);
location.reload();
});
......
......@@ -37,14 +37,14 @@
a.created_at,
a.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.project_id) as 'un_audit',
count(b1.project_id) as 'audit',
count(b2.project_id) as 'refuse'
-- count(b0.project_id) + count(b1.project_id) + count(b2.project_id) 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',
(select count(0) as 'count'from smile_volunteers as b0 where a.project_id = b0.project_id and b0.status = 1) 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'
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 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
-- LEFT JOIN smile_volunteers as b0 on a.project_id = b0.project_id and b0.status = 0
-- 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>
<if test="title!='' and title !=null">
AND title Like concat('%',#{title},'%')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment