no message

This commit is contained in:
kuaifan 2022-01-06 15:24:54 +08:00
parent 713770a448
commit 6d026bbf42
5 changed files with 17 additions and 10 deletions

View File

@ -239,6 +239,7 @@ class Project extends AbstractModel
if ($archived_at === null) {
// 取消归档
$this->archived_at = null;
$this->archived_userid = User::userid();
$this->addLog("项目取消归档");
$this->pushMsg('add', $this);
ProjectTask::whereProjectId($this->id)->whereArchivedFollow(1)->update([

View File

@ -777,6 +777,7 @@ class ProjectTask extends AbstractModel
if ($archived_at === null) {
// 取消归档
$this->archived_at = null;
$this->archived_userid = User::userid();
$this->archived_follow = 0;
$this->addLog("任务取消归档:" . $this->name);
$this->pushMsg('add', [

View File

@ -30,16 +30,15 @@ class AutoArchivedTask extends AbstractTask
$archivedDay = min(100, $archivedDay);
$archivedTime = Carbon::now()->subDays($archivedDay);
//获取已完成未归档的任务
AbstractModel::transaction(function() use ($archivedTime) {
$taskLists = ProjectTask::whereNotNull('complete_at')
->where('complete_at', '<=', $archivedTime)
->whereNull('archived_at')
->take(100)
->get();
foreach ($taskLists AS $task) {
$task->archivedTask(Carbon::now(), true);
}
});
$taskLists = ProjectTask::whereNotNull('complete_at')
->where('complete_at', '<=', $archivedTime)
->where('archived_userid', 0)
->whereNull('archived_at')
->take(100)
->get();
foreach ($taskLists AS $task) {
$task->archivedTask(Carbon::now(), true);
}
}
}
}

View File

@ -83,6 +83,9 @@ export default {
key: 'archived_userid',
minWidth: 80,
render: (h, {row}) => {
if (!row.archived_userid) {
return h('Tag', this.$L('系统自动'));
}
return h('UserAvatar', {
props: {
userid: row.archived_userid,

View File

@ -74,6 +74,9 @@ export default {
key: 'archived_userid',
minWidth: 100,
render: (h, {row}) => {
if (!row.archived_userid) {
return h('Tag', this.$L('系统自动'));
}
return h('UserAvatar', {
props: {
userid: row.archived_userid,