master
cody 5 months ago
parent 02709f7d06
commit dc02e19a85

@ -7,6 +7,8 @@ use App\Models\Admin;
use App\Models\Appointment;
use App\Models\AppointmentConfig;
use App\Models\CarparkLog;
use App\Models\CourseSign;
use App\Models\CourseType;
use App\Models\CustomFormField;
use App\Models\Department;
use App\Models\User;
@ -20,6 +22,35 @@ use Illuminate\Filesystem\Filesystem;
class OtherController extends CommonController
{
/**
* @OA\Get(
* path="/api/admin/other/home",
* tags={"其他"},
* summary="驾驶舱",
* description="",
* @OA\Parameter(name="token", in="query", @OA\Schema(type="string"), required=true, description="token"),
* @OA\Response(
* response="200",
* description="暂无"
* )
* )
*/
public function home()
{
// 校友总数
$schoolmateTotal = User::where('is_schoolmate', 1)->count();
// 2025年校友数
$schoolmateTotalYear = User::where('is_schoolmate', 1)->where('created_at', 'like', '%' . date('Y') . '%')->count();
// 课程统计
$courseTypes = CourseType::with('courses')->where('is_chart')->get();
foreach ($courseTypes as $courseType) {
$courseType->course_signs_total = CourseSign::where('course_id', $courseType->courses->pluck('id'))
->where('status', 1)
->count();
}
return $this->success(compact('courseTypes', 'schoolmateTotal', 'schoolmateTotalYear'));
}
/**
* @OA\Post(
* path="/api/admin/other/admin-user-list",

@ -19,7 +19,7 @@ return new class extends Migration {
// 企业名字
$table->string('company_name')->nullable()->comment('企业名字');
// 行业类型
$table->string('company_type')->nullable()->comment('行业类型');
$table->string('company_attribute')->nullable()->comment('行业类型');
// 标签
$table->string('company_tag')->nullable()->comment('标签');
// 企业规模
@ -32,6 +32,21 @@ return new class extends Migration {
$table->string('management_platform')->nullable()->comment('管理平台');
// 项目经理
$table->string('project_manager')->nullable()->comment('项目经理');
$table->bigInteger('market_value')->nullable()->comment('市值');
$table->bigInteger('company_fund')->nullable()->comment('公司融资情况');
$table->bigInteger('valuation')->nullable()->comment('估值');
$table->string('company_address')->nullable()->comment('公司地址');
$table->string('company_area')->nullable()->comment('公司区域');
$table->string('company_type')->nullable()->comment('公司性质-上市,拟上市');
$table->string('company_industry')->nullable()->comment('公司所属行业');
$table->string('company_need_fund')->nullable()->comment('公司是否需要融资-0否1是');
$table->text('company_introduce')->nullable()->comment('公司简介');
$table->string('company_other')->nullable()->comment('其他');
$table->text('company_product')->nullable()->comment('产品');
$table->string('overseas_experience')->nullable()->comment('海外经验');
$table->string('sales_volume')->nullable()->comment('销售额');
$table->timestamps();
$table->softDeletes();
});

@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('course_types', function (Blueprint $table) {
// 是否参与统计
$table->boolean('is_chart')->default(true)->comment('是否参与统计0否1是');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('course_types', function (Blueprint $table) {
//
});
}
};

@ -34,6 +34,8 @@ Route::group(["namespace" => "Admin", "prefix" => "admin"], function () {
Route::get('users/index', [\App\Http\Controllers\Admin\UserController::class, "index"]);
Route::get('other/table-fileds', [\App\Http\Controllers\Admin\OtherController::class, "tableFileds"]);
Route::get('other/home', [\App\Http\Controllers\Admin\OtherController::class, "home"]);
// 验证码登陆
Route::get('auth/sms-login', [\App\Http\Controllers\Admin\AuthController::class, "smsLogin"]);
Route::get('auth/send-sms', [\App\Http\Controllers\Admin\AuthController::class, "sendSms"]);

Loading…
Cancel
Save