mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: 计量尝试人数而非提交量
suggested by @Menci
This commit is contained in:
1 parent
e5d715d02b
commit
e49ffa9f7b
17 files changed
+102
-138
No files matched your search
@@ -353,10 +353,12 @@ export class ContestDetailProblemSubmitHandler extends ContestProblemHandler {
|
||||
type: document.TYPE_CONTEST,
|
||||
tid,
|
||||
});
|
||||
const pdomainId = typeof pid === 'string' ? pid.split(':')[0] : domainId;
|
||||
const ppid = typeof pid === 'number' ? pid : +pid.split(':')[1];
|
||||
const rdoc = await record.get(domainId, rid);
|
||||
if (!pretest) {
|
||||
await Promise.all([
|
||||
problem.inc(domainId, pid, 'nSubmit', 1),
|
||||
(this.tsdoc.journal || []).filter((i) => i.pid === pid).length ? Promise.resolve() : problem.inc(pdomainId, ppid, 'nSubmit', 1),
|
||||
domain.incUserInDomain(domainId, this.user._id, 'nSubmit'),
|
||||
contest.updateStatus(domainId, tid, this.user._id, rid, pid),
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user