master
cody 4 months ago
parent a6f8bc8dbc
commit 7ff7fc89cd

@ -60,7 +60,7 @@ class UpdateCompany extends Command
$users = User::where('id', $user_id)->get(); $users = User::where('id', $user_id)->get();
} else { } else {
// 批量更新 // 批量更新
$users = User::whereDoesntHave('company')->get(); $users = User::whereDoesntHave('company')->whereNotNull('company_name')->get();
} }
$YuanheRepository = new YuanheRepository(); $YuanheRepository = new YuanheRepository();
foreach ($users as $user) { foreach ($users as $user) {

@ -191,6 +191,7 @@ class CourseController extends BaseController
* @OA\Parameter(name="total", in="query", @OA\Schema(type="integer"), description="开课人数"), * @OA\Parameter(name="total", in="query", @OA\Schema(type="integer"), description="开课人数"),
* @OA\Parameter(name="class", in="query", @OA\Schema(type="string"), description="所在班级"), * @OA\Parameter(name="class", in="query", @OA\Schema(type="string"), description="所在班级"),
* @OA\Parameter(name="price", in="query", @OA\Schema(type="string"), description="价格"), * @OA\Parameter(name="price", in="query", @OA\Schema(type="string"), description="价格"),
* @OA\Parameter(name="url", in="query", @OA\Schema(type="string"), description="过期后链接"),
* @OA\Parameter(name="supply_wechat_pay", in="query", @OA\Schema(type="string"), description="是否支持微信支付0否1是"), * @OA\Parameter(name="supply_wechat_pay", in="query", @OA\Schema(type="string"), description="是否支持微信支付0否1是"),
* @OA\Parameter(name="is_arrange", in="query", @OA\Schema(type="integer"), description="是否排课-0否1是"), * @OA\Parameter(name="is_arrange", in="query", @OA\Schema(type="integer"), description="是否排课-0否1是"),
* @OA\Parameter(name="is_fee", in="query", @OA\Schema(type="integer"), description="是否缴费-0否1是"), * @OA\Parameter(name="is_fee", in="query", @OA\Schema(type="integer"), description="是否缴费-0否1是"),

@ -41,9 +41,9 @@ class OtherController extends CommonController
public function home() public function home()
{ {
// 校友总数 // 校友总数
$schoolmate['schoolmate_total'] = User::where('is_schoolmate', 1)->count(); $schoolmate['schoolmate_total'] = User::where('is_schoolmate', 1)->groupBy('mobile')->count();
// 2025年校友数 // 2025年校友数
$schoolmate['schoolmate_year'] = User::where('is_schoolmate', 1)->where('created_at', 'like', '%' . date('Y') . '%')->count(); $schoolmate['schoolmate_year'] = User::where('is_schoolmate', 1)->where('created_at', 'like', '%' . date('Y') . '%')->groupBy('mobile')->count();
// 上市企业总市值 // 上市企业总市值
$company['company_market'] = Company::where('company_market', 1)->sum('market_value'); $company['company_market'] = Company::where('company_market', 1)->sum('market_value');
// 校友企业总融资额 // 校友企业总融资额

@ -50,7 +50,6 @@ class YuanheRepository
$header = $this->getHeader(); $header = $this->getHeader();
try { try {
$result = httpCurl($url, 'POST', $params, $header); $result = httpCurl($url, 'POST', $params, $header);
dd($url,json_encode($params),$result);
$result = json_decode($result, true); $result = json_decode($result, true);
if ($result['code'] == 200) { if ($result['code'] == 200) {
return $result['data']; return $result['data'];

@ -0,0 +1,32 @@
<?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('courses', function (Blueprint $table) {
// 过期后链接
$table->string('url')->nullable()->comment('过期后链接');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('courses', function (Blueprint $table) {
//
});
}
};
Loading…
Cancel
Save