From ce3ce672217deb169a5ee934a69b04ff221a839e Mon Sep 17 00:00:00 2001 From: lemon <15040771@qq.com> Date: Sat, 11 Sep 2021 17:06:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/WithdrawalController.php | 80 +++++++++++++++++++ app/Admin/Repositories/Withdrawal.php | 16 ++++ app/Models/Withdrawal.php | 16 ++++ app/Models/WithdrawalAlipay.php | 16 ++++ app/Models/WithdrawalBank.php | 16 ++++ ...1_09_11_164413_create_withdrawal_table.php | 38 +++++++++ ...11_165223_create_withdrawal_bank_table.php | 37 +++++++++ ..._170121_create_withdrawal_alipay_table.php | 36 +++++++++ dcat_admin_ide_helper.php | 8 ++ resources/lang/zh_CN/withdrawal-alipay.php | 15 ++++ resources/lang/zh_CN/withdrawal.php | 17 ++++ 11 files changed, 295 insertions(+) create mode 100755 app/Admin/Controllers/WithdrawalController.php create mode 100755 app/Admin/Repositories/Withdrawal.php create mode 100755 app/Models/Withdrawal.php create mode 100755 app/Models/WithdrawalAlipay.php create mode 100755 app/Models/WithdrawalBank.php create mode 100755 database/migrations/2021_09_11_164413_create_withdrawal_table.php create mode 100755 database/migrations/2021_09_11_165223_create_withdrawal_bank_table.php create mode 100755 database/migrations/2021_09_11_170121_create_withdrawal_alipay_table.php create mode 100755 resources/lang/zh_CN/withdrawal-alipay.php create mode 100755 resources/lang/zh_CN/withdrawal.php diff --git a/app/Admin/Controllers/WithdrawalController.php b/app/Admin/Controllers/WithdrawalController.php new file mode 100755 index 0000000..437b159 --- /dev/null +++ b/app/Admin/Controllers/WithdrawalController.php @@ -0,0 +1,80 @@ +column('id')->sortable(); + $grid->column('user_id'); + $grid->column('user_type'); + $grid->column('price'); + $grid->column('pay_type'); + $grid->column('pay_id'); + $grid->column('status'); + $grid->column('created_at'); + $grid->column('updated_at')->sortable(); + + $grid->filter(function (Grid\Filter $filter) { + $filter->equal('id'); + + }); + }); + } + + /** + * Make a show builder. + * + * @param mixed $id + * + * @return Show + */ + protected function detail($id) + { + return Show::make($id, new Withdrawal(), function (Show $show) { + $show->field('id'); + $show->field('user_id'); + $show->field('user_type'); + $show->field('price'); + $show->field('pay_type'); + $show->field('pay_id'); + $show->field('status'); + $show->field('created_at'); + $show->field('updated_at'); + }); + } + + /** + * Make a form builder. + * + * @return Form + */ + protected function form() + { + return Form::make(new Withdrawal(), function (Form $form) { + $form->display('id'); + $form->text('user_id'); + $form->text('user_type'); + $form->text('price'); + $form->text('pay_type'); + $form->text('pay_id'); + $form->text('status'); + + $form->display('created_at'); + $form->display('updated_at'); + }); + } +} diff --git a/app/Admin/Repositories/Withdrawal.php b/app/Admin/Repositories/Withdrawal.php new file mode 100755 index 0000000..9550a35 --- /dev/null +++ b/app/Admin/Repositories/Withdrawal.php @@ -0,0 +1,16 @@ +increments('id'); + $table->integer('user_id')->index()->default(0)->comment('用户id'); + $table->string('user_type')->default('')->comment('用户类型'); + $table->decimal('price')->default(0)->comment('提现金额'); + $table->string('pay_type')->default('')->comment('提现方式'); + $table->integer('pay_id')->index()->default(0)->comment('提现id'); + $table->tinyInteger('status')->default(1)->comment('状态 1·待审核 2 已拒绝 3 已通过 4 已打款'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('withdrawal'); + } +} diff --git a/database/migrations/2021_09_11_165223_create_withdrawal_bank_table.php b/database/migrations/2021_09_11_165223_create_withdrawal_bank_table.php new file mode 100755 index 0000000..de137c6 --- /dev/null +++ b/database/migrations/2021_09_11_165223_create_withdrawal_bank_table.php @@ -0,0 +1,37 @@ +increments('id'); + $table->integer('withdrawal_id')->index()->comment('提现主表'); + $table->string('name')->default('')->comment('银行名称'); + $table->string('branch')->default('')->comment('支行'); + $table->bigInteger('card_number')->default(0)->comment('卡号'); + $table->string('account_name')->default('')->comment('开户人'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('withdrawal_bank'); + } +} diff --git a/database/migrations/2021_09_11_170121_create_withdrawal_alipay_table.php b/database/migrations/2021_09_11_170121_create_withdrawal_alipay_table.php new file mode 100755 index 0000000..640cc2b --- /dev/null +++ b/database/migrations/2021_09_11_170121_create_withdrawal_alipay_table.php @@ -0,0 +1,36 @@ +increments('id'); + $table->integer('withdrawal_id')->index()->comment('提现主表'); + $table->string('account')->default('')->comment('账户'); + $table->string('name')->default('')->comment('账户名称'); + $table->text('qrcode')->nullable()->comment('收款码'); + $table->timestamps(); + $table->softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('withdrawal_alipay'); + } +} diff --git a/dcat_admin_ide_helper.php b/dcat_admin_ide_helper.php index 04d33d9..de85aa8 100644 --- a/dcat_admin_ide_helper.php +++ b/dcat_admin_ide_helper.php @@ -129,6 +129,7 @@ namespace Dcat\Admin { * @property Grid\Column|Collection token * @property Grid\Column|Collection extends * @property Grid\Column|Collection verify_mobile + * @property Grid\Column|Collection user_type * @property Grid\Column|Collection cut_user_id * @property Grid\Column|Collection cut_user_type * @property Grid\Column|Collection publish_type @@ -149,6 +150,7 @@ namespace Dcat\Admin { * @property Grid\Column|Collection close_time * @property Grid\Column|Collection point_id * @property Grid\Column|Collection point_type + * @property Grid\Column|Collection is_read * @property Grid\Column|Collection workorder_id * * @method Grid\Column|Collection created_at(string $label = null) @@ -269,6 +271,7 @@ namespace Dcat\Admin { * @method Grid\Column|Collection token(string $label = null) * @method Grid\Column|Collection extends(string $label = null) * @method Grid\Column|Collection verify_mobile(string $label = null) + * @method Grid\Column|Collection user_type(string $label = null) * @method Grid\Column|Collection cut_user_id(string $label = null) * @method Grid\Column|Collection cut_user_type(string $label = null) * @method Grid\Column|Collection publish_type(string $label = null) @@ -289,6 +292,7 @@ namespace Dcat\Admin { * @method Grid\Column|Collection close_time(string $label = null) * @method Grid\Column|Collection point_id(string $label = null) * @method Grid\Column|Collection point_type(string $label = null) + * @method Grid\Column|Collection is_read(string $label = null) * @method Grid\Column|Collection workorder_id(string $label = null) */ class Grid {} @@ -414,6 +418,7 @@ namespace Dcat\Admin { * @property Show\Field|Collection token * @property Show\Field|Collection extends * @property Show\Field|Collection verify_mobile + * @property Show\Field|Collection user_type * @property Show\Field|Collection cut_user_id * @property Show\Field|Collection cut_user_type * @property Show\Field|Collection publish_type @@ -434,6 +439,7 @@ namespace Dcat\Admin { * @property Show\Field|Collection close_time * @property Show\Field|Collection point_id * @property Show\Field|Collection point_type + * @property Show\Field|Collection is_read * @property Show\Field|Collection workorder_id * * @method Show\Field|Collection created_at(string $label = null) @@ -554,6 +560,7 @@ namespace Dcat\Admin { * @method Show\Field|Collection token(string $label = null) * @method Show\Field|Collection extends(string $label = null) * @method Show\Field|Collection verify_mobile(string $label = null) + * @method Show\Field|Collection user_type(string $label = null) * @method Show\Field|Collection cut_user_id(string $label = null) * @method Show\Field|Collection cut_user_type(string $label = null) * @method Show\Field|Collection publish_type(string $label = null) @@ -574,6 +581,7 @@ namespace Dcat\Admin { * @method Show\Field|Collection close_time(string $label = null) * @method Show\Field|Collection point_id(string $label = null) * @method Show\Field|Collection point_type(string $label = null) + * @method Show\Field|Collection is_read(string $label = null) * @method Show\Field|Collection workorder_id(string $label = null) */ class Show {} diff --git a/resources/lang/zh_CN/withdrawal-alipay.php b/resources/lang/zh_CN/withdrawal-alipay.php new file mode 100755 index 0000000..bf2f1b4 --- /dev/null +++ b/resources/lang/zh_CN/withdrawal-alipay.php @@ -0,0 +1,15 @@ + [ + 'WithdrawalAlipay' => '提现支付宝', + 'withdrawal-alipay' => '提现支付宝', + ], + 'fields' => [ + 'withdrawal_id' => '提现主表', + 'account' => '账户', + 'name' => '真实姓名', + 'qrcode' => '收款码', + ], + 'options' => [ + ], +]; diff --git a/resources/lang/zh_CN/withdrawal.php b/resources/lang/zh_CN/withdrawal.php new file mode 100755 index 0000000..68a283f --- /dev/null +++ b/resources/lang/zh_CN/withdrawal.php @@ -0,0 +1,17 @@ + [ + 'Withdrawal' => '提现记录表', + 'withdrawal' => '提现记录表', + ], + 'fields' => [ + 'user_id' => '用户id', + 'user_type' => '用户类型', + 'price' => '提现金额', + 'pay_type' => '提现方式', + 'pay_id' => '提现id', + 'status' => '状态', + ], + 'options' => [ + ], +];