8 changed files with 237 additions and 80 deletions
-
29app/Admin/Forms/SystemSetting.php
-
106app/AdminAgent/Controllers/WithdrawalAlipayController.php
-
97app/AdminAgent/Controllers/WithdrawalBankController.php
-
8app/Common/StatementType.php
-
8app/Models/SystemSetting.php
-
23app/Service/WithdrawalService.php
-
14app/Traits/WithdrawalTraits.php
-
32database/migrations/2021_09_16_114815_update_withdrawal_table.php
@ -0,0 +1,23 @@ |
|||
<?php |
|||
|
|||
|
|||
namespace App\Service; |
|||
|
|||
|
|||
use App\Common\StatementType; |
|||
use App\Models\Statement; |
|||
use App\Traits\DemandTraits; |
|||
|
|||
class WithdrawalService |
|||
{ |
|||
public function create($price,$type,$userId,$userType,$orderId = '') |
|||
{ |
|||
Statement::query()->create([ |
|||
'price' => $price, |
|||
'type' => $type, |
|||
'user_id' => $userId, |
|||
'user_type' => $userType, |
|||
'order_id' => $orderId ?? '' |
|||
]); |
|||
} |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Database\Migrations\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
use Illuminate\Support\Facades\Schema; |
|||
|
|||
class UpdateWithdrawalTable extends Migration |
|||
{ |
|||
/** |
|||
* Run the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function up() |
|||
{ |
|||
Schema::table('withdrawal', function (Blueprint $table) { |
|||
$table->decimal('cut_price') |
|||
->default(0) |
|||
->comment('提现手续费'); |
|||
}); |
|||
} |
|||
|
|||
/** |
|||
* Reverse the migrations. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function down() |
|||
{ |
|||
//
|
|||
} |
|||
} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue