feat: 限制个人最多500个未完成任务
This commit is contained in:
parent
840374c48c
commit
6b3513c1c4
@ -281,7 +281,7 @@ class ProjectTask extends AbstractModel
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询自己参与或负责的任务
|
||||
* 查询自己负责或参与的任务
|
||||
* @param self $query
|
||||
* @param null $userid
|
||||
* @param null $owner
|
||||
@ -379,6 +379,12 @@ class ProjectTask extends AbstractModel
|
||||
if (!ProjectUser::whereProjectId($project_id)->whereUserid($uid)->exists()) {
|
||||
throw new ApiException($retPre . '负责人填写错误');
|
||||
}
|
||||
if (ProjectTask::authData($uid)
|
||||
->whereNull('project_tasks.complete_at')
|
||||
->whereNull('project_tasks.archived_at')
|
||||
->count() > 500) {
|
||||
throw new ApiException(User::userid2nickname($uid) . '负责或参与的任务超过500个未完成');
|
||||
}
|
||||
$tmpArray[] = $uid;
|
||||
}
|
||||
$owner = $tmpArray;
|
||||
|
Loading…
x
Reference in New Issue
Block a user