mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-18 09:36:08 +08:00
core: problemStat: ignore void submissions
This commit is contained in:
1 parent
013ae1172b
commit
5a934d8a2f
1 file changed
+8
-4
@@ -6,12 +6,11 @@ import * as document from '../model/document';
|
||||
import db from '../service/db';
|
||||
|
||||
const sumStatus = (status) => ({ $sum: { $cond: [{ $eq: ['$status', status] }, 1, 0] } });
|
||||
const $match = { contest: { $ne: new ObjectID('000000000000000000000000') } };
|
||||
|
||||
export async function udoc(report) {
|
||||
report({ message: 'Udoc' });
|
||||
const pipeline = [
|
||||
{ $match },
|
||||
{ $match: { contest: { $ne: new ObjectID('000000000000000000000000') } } },
|
||||
{
|
||||
$group: {
|
||||
_id: { domainId: '$domainId', pid: '$pid', uid: '$uid' },
|
||||
@@ -50,7 +49,7 @@ export async function udoc(report) {
|
||||
export async function psdoc(report) {
|
||||
report({ message: 'Psdoc' });
|
||||
const pipeline = [
|
||||
{ $match },
|
||||
{ $match: { contest: { $ne: new ObjectID('000000000000000000000000') } } },
|
||||
{
|
||||
$group: {
|
||||
_id: { domainId: '$domainId', pid: '$pid', uid: '$uid' },
|
||||
@@ -67,7 +66,12 @@ export async function psdoc(report) {
|
||||
export async function pdoc(report) {
|
||||
report({ message: 'Pdoc' });
|
||||
const pipeline = [
|
||||
{ $match },
|
||||
{
|
||||
$match: {
|
||||
contest: { $ne: new ObjectID('000000000000000000000000') },
|
||||
status: { $ne: STATUS.STATUS_CANCELED },
|
||||
},
|
||||
},
|
||||
{
|
||||
$group: {
|
||||
_id: { domainId: '$domainId', pid: '$pid', uid: '$uid' },
|
||||
|
||||
Reference in new issue
Block a user