no message
This commit is contained in:
parent
713770a448
commit
6d026bbf42
@ -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([
|
||||
|
@ -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', [
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user