no message

This commit is contained in:
kuaifan 2024-11-23 13:30:03 +08:00
parent a813809fc6
commit e983677e57
9 changed files with 44 additions and 81 deletions

View File

@ -130,7 +130,7 @@ class UsersController extends AbstractController
return $retError('帐号或密码错误'); return $retError('帐号或密码错误');
} }
// //
if (in_array('disable', $user->identity)) { if ($user->isDisable()) {
return $retError('帐号已停用...'); return $retError('帐号已停用...');
} }
Cache::forget("code::" . $email); Cache::forget("code::" . $email);
@ -928,7 +928,7 @@ class UsersController extends AbstractController
if ($transferUser->userid === $userInfo->userid) { if ($transferUser->userid === $userInfo->userid) {
return Base::retError('不能移交给自己'); return Base::retError('不能移交给自己');
} }
if (in_array('disable', $transferUser->identity)) { if ($transferUser->isDisable()) {
return Base::retError('交接人已离职,请选择另一个交接人'); return Base::retError('交接人已离职,请选择另一个交接人');
} }
break; break;

View File

@ -8,6 +8,7 @@ use Request;
use Redirect; use Redirect;
use Response; use Response;
use App\Models\File; use App\Models\File;
use App\Models\User;
use App\Models\UserTransfer; use App\Models\UserTransfer;
use App\Module\Doo; use App\Module\Doo;
use App\Module\Base; use App\Module\Base;
@ -261,27 +262,6 @@ class IndexController extends InvokeController
return "success"; return "success";
} }
/**
* 迁移辅助路由
* @return array
*/
public function migration__userdialog()
{
if (Request::header('app-key') !== env('APP_KEY')) {
return Base::retError("key error");
}
go(function() {
Coroutine::sleep(3);
UserTransfer::orderBy('id')->chunkById(10, function ($transfers) {
/** @var UserTransfer $transfer */
foreach ($transfers as $transfer) {
$transfer->exitDialog();
}
});
});
return Base::retSuccess('success');
}
/** /**
* 桌面客户端发布 * 桌面客户端发布
*/ */
@ -520,6 +500,36 @@ class IndexController extends InvokeController
return Redirect::to($redirectUrl, 301); return Redirect::to($redirectUrl, 301);
} }
/**
* 修复操作离职后续操作(todo 临时,后期删除)
* @return array
*/
public function migration__userdialog()
{
if (Request::header('app-key') !== env('APP_KEY')) {
return Base::retError("key error");
}
go(function() {
Coroutine::sleep(3);
$handled = [];
UserTransfer::orderBy('id')->chunkById(10, function ($transfers) use ($handled) {
/** @var UserTransfer $transfer */
foreach ($transfers as $transfer) {
if (in_array($transfer->original_userid, $handled)) {
continue;
}
$handled[] = $transfer->original_userid;
//
$user = User::find($transfer->original_userid);
if ($user?->isDisable()) {
$transfer->exitDialog();
}
}
});
});
return Base::retSuccess('success');
}
/** /**
* 保存配置 (todo 已废弃) * 保存配置 (todo 已废弃)
* @return string * @return string

View File

@ -421,7 +421,7 @@ class User extends AbstractModel
throw new ApiException('请登录后继续...', [], -1); throw new ApiException('请登录后继续...', [], -1);
} }
} }
if (in_array('disable', $user->identity)) { if ($user->isDisable()) {
throw new ApiException('帐号已停用...', [], -1); throw new ApiException('帐号已停用...', [], -1);
} }
if ($identity) { if ($identity) {

View File

@ -79,7 +79,7 @@ class WebSocketDialog extends AbstractModel
} }
/** /**
* 获取对话成员(剔除离职 * 获取对话成员(连表查
* @param $addField * @param $addField
* @return User|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder * @return User|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder
*/ */

View File

@ -1,36 +0,0 @@
<?php
use App\Models\UserTransfer;
use Illuminate\Database\Migrations\Migration;
class ProcessUserTransferDialog extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (UserTransfer::count() === 0) {
return;
}
try {
\App\Module\Ihttp::ihttp_request('http://127.0.0.1:' . config('laravels.listen_port') . '/migration/userdialog', [], [
'app-key' => env('APP_KEY')
], 10);
} catch (\Throwable $e) {
info($e);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}

View File

@ -243,7 +243,6 @@ ID、名称、描述...
添加协助人员 添加协助人员
点击加入会议 点击加入会议
点击复制链接 点击复制链接
自动归档任务
获取会话失败 获取会话失败
请输入昵称! 请输入昵称!
请输入验证码 请输入验证码
@ -1825,3 +1824,5 @@ WiFi签到延迟时长为±1分钟。
今天下班前 今天下班前
明天下班前 明天下班前
自动归档

View File

@ -3659,18 +3659,6 @@
"id": "Klik untuk menyalin tautan", "id": "Klik untuk menyalin tautan",
"ru": "Нажмите, чтобы скопировать ссылку" "ru": "Нажмите, чтобы скопировать ссылку"
}, },
{
"key": "自动归档任务",
"zh": "",
"zh-CHT": "自動歸檔任務",
"en": "Automatically archive tasks",
"ko": "작업 자동 보관",
"ja": "タスクを自動アーカイブ",
"de": "Aufgaben automatisch archivieren",
"fr": "Archiver automatiquement les tâches",
"id": "Arsipkan tugas secara otomatis",
"ru": "Автоматически архивировать задачи"
},
{ {
"key": "请输入昵称!", "key": "请输入昵称!",
"zh": "", "zh": "",

View File

@ -75,7 +75,12 @@
</RadioGroup> </RadioGroup>
<div v-if="formDatum.project_invite == 'open'" class="form-tip">{{$L('开启项目管理员可生成链接邀请成员加入项目')}}</div> <div v-if="formDatum.project_invite == 'open'" class="form-tip">{{$L('开启项目管理员可生成链接邀请成员加入项目')}}</div>
</FormItem> </FormItem>
<FormItem :label="$L('自动归档任务')" prop="autoArchived"> </div>
</div>
<div class="block-setting-box">
<h3>{{ $L('任务相关') }}</h3>
<div class="form-box">
<FormItem :label="$L('自动归档')" prop="autoArchived">
<RadioGroup :value="formDatum.auto_archived" @on-change="formArchived"> <RadioGroup :value="formDatum.auto_archived" @on-change="formArchived">
<Radio label="open">{{$L('开启')}}</Radio> <Radio label="open">{{$L('开启')}}</Radio>
<Radio label="close">{{$L('关闭')}}</Radio> <Radio label="close">{{$L('关闭')}}</Radio>
@ -90,11 +95,6 @@
<div slot="content">{{$L('任务完成 (*) 天后自动归档。', formDatum.archived_day)}}</div> <div slot="content">{{$L('任务完成 (*) 天后自动归档。', formDatum.archived_day)}}</div>
</ETooltip> </ETooltip>
</FormItem> </FormItem>
</div>
</div>
<div class="block-setting-box">
<h3>{{ $L('任务相关') }}</h3>
<div class="form-box">
<FormItem :label="$L('可见性选项')" prop="taskVisible"> <FormItem :label="$L('可见性选项')" prop="taskVisible">
<RadioGroup v-model="formDatum.task_visible"> <RadioGroup v-model="formDatum.task_visible">
<Radio label="open">{{$L('保持')}}</Radio> <Radio label="open">{{$L('保持')}}</Radio>

@ -1 +1 @@
Subproject commit c0bbd08866ecb00f3022ab3ece29df56848c7a48 Subproject commit 9d4d2a3189fa2454b25af9f7f2ab64f776d40b53