Skip to content

Commit

Permalink
调整文件目录结构
Browse files Browse the repository at this point in the history
  • Loading branch information
none committed Jun 28, 2023
1 parent d0dc014 commit 6fc9f5d
Show file tree
Hide file tree
Showing 31 changed files with 58 additions and 31 deletions.
2 changes: 1 addition & 1 deletion app/Console/Commands/AddonsProviderMapGenrator.php
Expand Up @@ -8,7 +8,7 @@

namespace App\Console\Commands;

use App\Meedu\Addons;
use App\Meedu\Core\Addons;
use Illuminate\Console\Command;
use Symfony\Component\Console\Command\Command as CommandAlias;

Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/MeEduUpgradeCommand.php
Expand Up @@ -9,7 +9,7 @@
namespace App\Console\Commands;

use App\Meedu\MeEdu;
use App\Meedu\Upgrade;
use App\Meedu\Core\Upgrade;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Artisan;
use Symfony\Component\Console\Command\Command as CommandAlias;
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Kernel.php
Expand Up @@ -26,7 +26,7 @@ class Kernel extends ConsoleKernel
\Illuminate\Foundation\Bootstrap\RegisterFacades::class,
\Illuminate\Foundation\Bootstrap\SetRequestForConsole::class,
\Illuminate\Foundation\Bootstrap\RegisterProviders::class,
\App\Meedu\AddonsProvider::class,
\App\Meedu\Core\AddonsProvider::class,
\Illuminate\Foundation\Bootstrap\BootProviders::class,
];

Expand Down
2 changes: 1 addition & 1 deletion app/Hooks/MpWechat/ScanEvtSubHook.php
Expand Up @@ -9,8 +9,8 @@
namespace App\Hooks\MpWechat;

use App\Bus\AuthBus;
use App\Meedu\Wechat;
use App\Bus\WechatScanBus;
use App\Meedu\Utils\Wechat;
use App\Meedu\Hooks\HookParams;
use App\Constant\FrontendConstant;
use App\Exceptions\ServiceException;
Expand Down
2 changes: 1 addition & 1 deletion app/Hooks/MpWechat/SubscribeHook.php
Expand Up @@ -9,9 +9,9 @@
namespace App\Hooks\MpWechat;

use App\Bus\AuthBus;
use App\Meedu\Wechat;
use App\Bus\WechatBindBus;
use App\Bus\WechatScanBus;
use App\Meedu\Utils\Wechat;
use App\Constant\CacheConstant;
use App\Meedu\Hooks\HookParams;
use App\Exceptions\ServiceException;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/V2/LoginController.php
Expand Up @@ -9,7 +9,7 @@
namespace App\Http\Controllers\Api\V2;

use App\Bus\AuthBus;
use App\Meedu\Wechat;
use App\Meedu\Utils\Wechat;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use App\Constant\CacheConstant;
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Api/V2/MemberController.php
Expand Up @@ -8,9 +8,9 @@

namespace App\Http\Controllers\Api\V2;

use App\Meedu\Verify;
use App\Meedu\Wechat;
use App\Bus\WechatBindBus;
use App\Meedu\Utils\Verify;
use App\Meedu\Utils\Wechat;
use Illuminate\Http\Request;
use App\Constant\ApiV2Constant;
use App\Businesses\BusinessState;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/V2/OtherController.php
Expand Up @@ -8,7 +8,7 @@

namespace App\Http\Controllers\Api\V2;

use App\Meedu\Addons;
use App\Meedu\Core\Addons;
use App\Services\Base\Services\ConfigService;
use App\Services\Base\Interfaces\ConfigServiceInterface;

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/V3/LoginController.php
Expand Up @@ -9,8 +9,8 @@
namespace App\Http\Controllers\Api\V3;

use App\Bus\AuthBus;
use App\Meedu\Wechat;
use App\Bus\WechatScanBus;
use App\Meedu\Utils\Wechat;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use App\Constant\CacheConstant;
Expand Down
25 changes: 25 additions & 0 deletions app/Http/Controllers/Api/V3/OrderController.php
@@ -0,0 +1,25 @@
<?php

/*
* This file is part of the Qsnh/meedu.
*
* (c) 杭州白书科技有限公司
*/

namespace App\Http\Controllers\Api\V3;

use Illuminate\Http\Request;
use App\Http\Controllers\Api\V2\BaseController;

class OrderController extends BaseController
{
public function create(Request $request)
{
$type = $request->input('type');
$id = (int)$request->input('id');
if (!$type || !$id) {
return $this->error(__('参数错误'));
}
return $this->data();
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/V3/SystemController.php
Expand Up @@ -8,7 +8,7 @@

namespace App\Http\Controllers\Api\V3;

use App\Meedu\Addons;
use App\Meedu\Core\Addons;
use App\Meedu\Cache\NavCache;
use App\Meedu\Cache\LinkCache;
use App\Meedu\Cache\ViewBlockH5IndexPageCache;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/Wechat/MpWechatController.php
Expand Up @@ -8,7 +8,7 @@

namespace App\Http\Controllers\Api\Wechat;

use App\Meedu\Wechat;
use App\Meedu\Utils\Wechat;
use App\Meedu\Hooks\HookRun;
use App\Meedu\Hooks\HookParams;
use App\Meedu\Hooks\Constant\PositionConstant;
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Backend/Api/V1/AddonsController.php
Expand Up @@ -9,10 +9,10 @@
namespace App\Http\Controllers\Backend\Api\V1;

use PhpZip\ZipFile;
use App\Meedu\Addons;
use GuzzleHttp\Client;
use App\Meedu\MeEduCloud;
use App\Meedu\Core\Addons;
use Illuminate\Http\Request;
use App\Meedu\Core\MeEduCloud;
use App\Models\AdministratorLog;

class AddonsController extends BaseController
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Backend/Api/V1/MpWechatController.php
Expand Up @@ -8,7 +8,7 @@

namespace App\Http\Controllers\Backend\Api\V1;

use App\Meedu\Wechat;
use App\Meedu\Utils\Wechat;
use Illuminate\Http\Request;
use App\Models\AdministratorLog;

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Backend/Api/V1/SettingController.php
Expand Up @@ -8,7 +8,7 @@

namespace App\Http\Controllers\Backend\Api\V1;

use App\Meedu\Setting;
use App\Meedu\Core\Setting;
use Illuminate\Http\Request;
use App\Models\AdministratorLog;
use App\Events\AppConfigSavedEvent;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Frontend/OrderController.php
Expand Up @@ -8,7 +8,7 @@

namespace App\Http\Controllers\Frontend;

use App\Meedu\Wechat;
use App\Meedu\Utils\Wechat;
use Illuminate\Http\Request;
use App\Meedu\Payment\PaymentHandler;
use App\Meedu\ServiceV2\Services\OrderServiceInterface;
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Kernel.php
Expand Up @@ -25,7 +25,7 @@ class Kernel extends HttpKernel
\Illuminate\Foundation\Bootstrap\HandleExceptions::class,
\Illuminate\Foundation\Bootstrap\RegisterFacades::class,
\Illuminate\Foundation\Bootstrap\RegisterProviders::class,
\App\Meedu\AddonsProvider::class,
\App\Meedu\Core\AddonsProvider::class,
\Illuminate\Foundation\Bootstrap\BootProviders::class,
];

Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/UserRegisterIpToAreaJob.php
Expand Up @@ -8,7 +8,7 @@

namespace App\Jobs;

use App\Meedu\Ip;
use App\Meedu\Utils\Ip;
use Illuminate\Bus\Queueable;
use Illuminate\Support\Facades\Log;
use Illuminate\Queue\SerializesModels;
Expand Down
2 changes: 1 addition & 1 deletion app/Meedu/Addons.php → app/Meedu/Core/Addons.php
Expand Up @@ -6,7 +6,7 @@
* (c) 杭州白书科技有限公司
*/

namespace App\Meedu;
namespace App\Meedu\Core;

use Illuminate\Support\Str;
use Illuminate\Filesystem\Filesystem;
Expand Down
Expand Up @@ -6,7 +6,7 @@
* (c) 杭州白书科技有限公司
*/

namespace App\Meedu;
namespace App\Meedu\Core;

use Illuminate\Contracts\Foundation\Application;

Expand Down
2 changes: 1 addition & 1 deletion app/Meedu/MeEduCloud.php → app/Meedu/Core/MeEduCloud.php
Expand Up @@ -6,7 +6,7 @@
* (c) 杭州白书科技有限公司
*/

namespace App\Meedu;
namespace App\Meedu\Core;

use GuzzleHttp\Client;
use Illuminate\Support\Facades\Cache;
Expand Down
2 changes: 1 addition & 1 deletion app/Meedu/Setting.php → app/Meedu/Core/Setting.php
Expand Up @@ -6,7 +6,7 @@
* (c) 杭州白书科技有限公司
*/

namespace App\Meedu;
namespace App\Meedu\Core;

use App\Meedu\Sms\SmsInterface;
use App\Services\Base\Services\ConfigService;
Expand Down
2 changes: 1 addition & 1 deletion app/Meedu/Upgrade.php → app/Meedu/Core/Upgrade.php
Expand Up @@ -6,7 +6,7 @@
* (c) 杭州白书科技有限公司
*/

namespace App\Meedu;
namespace App\Meedu\Core;

use App\Meedu\UpgradeLog\UpgradeTo48;
use App\Meedu\UpgradeLog\UpgradeToV4;
Expand Down
2 changes: 1 addition & 1 deletion app/Meedu/ServiceV2/Services/SettingService.php
Expand Up @@ -8,7 +8,7 @@

namespace App\Meedu\ServiceV2\Services;

use App\Meedu\Setting;
use App\Meedu\Core\Setting;

class SettingService implements SettingServiceInterface
{
Expand Down
2 changes: 1 addition & 1 deletion app/Meedu/Ip.php → app/Meedu/Utils/Ip.php
Expand Up @@ -6,7 +6,7 @@
* (c) 杭州白书科技有限公司
*/

namespace App\Meedu;
namespace App\Meedu\Utils;

class Ip
{
Expand Down
2 changes: 1 addition & 1 deletion app/Meedu/Verify.php → app/Meedu/Utils/Verify.php
Expand Up @@ -6,7 +6,7 @@
* (c) 杭州白书科技有限公司
*/

namespace App\Meedu;
namespace App\Meedu\Utils;

class Verify
{
Expand Down
2 changes: 1 addition & 1 deletion app/Meedu/Wechat.php → app/Meedu/Utils/Wechat.php
Expand Up @@ -6,7 +6,7 @@
* (c) 杭州白书科技有限公司
*/

namespace App\Meedu;
namespace App\Meedu\Utils;

use EasyWeChat\Factory;
use App\Services\Base\Services\ConfigService;
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/AppServiceProvider.php
Expand Up @@ -8,7 +8,7 @@

namespace App\Providers;

use App\Meedu\Setting;
use App\Meedu\Core\Setting;
use Illuminate\Support\Str;
use App\Meedu\ServiceV2\ServiceInit;
use Illuminate\Support\Facades\Schema;
Expand Down
2 changes: 1 addition & 1 deletion app/helper.php
Expand Up @@ -496,7 +496,7 @@ function url_append_query(string $url, array $data): string
if (!function_exists('wechat_qrcode_image')) {
function wechat_qrcode_image(string $code): string
{
$result = \App\Meedu\Wechat::getInstance()->qrcode->temporary($code, 3600);
$result = \App\Meedu\Utils\Wechat::getInstance()->qrcode->temporary($code, 3600);
$url = $result['url'] ?? '';
return 'data:image/png;base64, ' . base64_encode(\QrCode::format('png')->size(300)->generate($url));
}
Expand Down
2 changes: 2 additions & 0 deletions routes/api-v3.php
Expand Up @@ -37,6 +37,8 @@
Route::get('/courses', 'CourseController@index');

Route::group(['middleware' => ['auth:apiv2', 'api.login.status.check']], function () {
// 创建订单
Route::post('/order', 'PaymentController@create');
// 订单支付
Route::post('/order/pay', 'PaymentController@submit');

Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/Api/V2/MemberTest.php
Expand Up @@ -8,7 +8,7 @@

namespace Tests\Feature\Api\V2;

use App\Meedu\Verify;
use App\Meedu\Utils\Verify;
use App\Constant\CacheConstant;
use Illuminate\Http\UploadedFile;
use App\Services\Member\Models\User;
Expand Down

0 comments on commit 6fc9f5d

Please sign in to comment.