diff --git a/app/Http/Controllers/CommentController.php b/app/Http/Controllers/CommentController.php index b288ca7d..c824de78 100644 --- a/app/Http/Controllers/CommentController.php +++ b/app/Http/Controllers/CommentController.php @@ -11,7 +11,7 @@ class CommentController extends Controller /** * Display a listing of the resource. * - * @return \Illuminate\Http\Response + * @return array */ public function index(Request $request) { diff --git a/app/Http/Controllers/ExamController.php b/app/Http/Controllers/ExamController.php index 1beec140..6f40f67c 100644 --- a/app/Http/Controllers/ExamController.php +++ b/app/Http/Controllers/ExamController.php @@ -31,6 +31,9 @@ class ExamController extends Controller { $result = $this->repository->getList($request->all()); $resource = ExamResource::collection($result); + $resource->additional([ + 'page_title' => nexus_trans('exam.admin.list.page_title'), + ]); return $this->success($resource); } diff --git a/app/Http/Controllers/ExamUserController.php b/app/Http/Controllers/ExamUserController.php index c197fdf8..843bd697 100644 --- a/app/Http/Controllers/ExamUserController.php +++ b/app/Http/Controllers/ExamUserController.php @@ -30,6 +30,9 @@ class ExamUserController extends Controller { $result = $this->repository->listUser($request->all()); $resource = ExamUserResource::collection($result); + $resource->additional([ + 'page_title' => nexus_trans('exam-user.admin.list.page_title'), + ]); return $this->success($resource); } diff --git a/include/cleanup.php b/include/cleanup.php index 42103c91..ed1af063 100644 --- a/include/cleanup.php +++ b/include/cleanup.php @@ -1,5 +1,7 @@ nexus_trans($reasonKey, [], $user->locale), ]; } - \App\Models\User::query()->whereIn('id', $uidArr)->delete(); + $update = [ + 'enabled' => \App\Models\User::ENABLED_NO, + 'modcomment' => DB::raw("concat_ws('\n', '[CLEANUP] $reasonKey', modcomment)"), + ]; + \App\Models\User::query()->whereIn('id', $uidArr)->update($update); \App\Models\UserBanLog::query()->insert($userBanLogData); do_log("delete user($reasonKey): " . implode(', ', $uidArr)); return $uidArr; diff --git a/resources/lang/zh_CN/exam-user.php b/resources/lang/zh_CN/exam-user.php new file mode 100644 index 00000000..e1d1fb3f --- /dev/null +++ b/resources/lang/zh_CN/exam-user.php @@ -0,0 +1,9 @@ + [ + 'list' => [ + 'page_title' => '考核用户列表' + ] + ] +]; diff --git a/resources/lang/zh_CN/exam.php b/resources/lang/zh_CN/exam.php index 065973d9..2b50a728 100644 --- a/resources/lang/zh_CN/exam.php +++ b/resources/lang/zh_CN/exam.php @@ -19,4 +19,9 @@ return [ 'checkout_not_pass_message_content' => '你在规定时间内(:begin ~ :end)未完成考核::exam_name,账号已被禁用。', 'ban_log_reason' => '未完成考核::exam_name(:begin ~ :end)', 'ban_user_modcomment' => '未完成考核: :exam_name(:begin ~ :end), 被系统禁用.', + 'admin' => [ + 'list' => [ + 'page_title' => '考核列表' + ] + ] ]; diff --git a/resources/lang/zh_CN/user.php b/resources/lang/zh_CN/user.php index 75dd8a61..5e607de2 100644 --- a/resources/lang/zh_CN/user.php +++ b/resources/lang/zh_CN/user.php @@ -2,4 +2,9 @@ return [ 'edit_ban_reason' => '被管理人员禁用', + 'admin' => [ + 'list' => [ + 'page_title' => '用户列表' + ] + ] ];