diff --git a/app/Admin/Controllers/LanzuCsWithdrawController.php b/app/Admin/Controllers/LanzuCsWithdrawController.php index c83b890..6bc9d1d 100644 --- a/app/Admin/Controllers/LanzuCsWithdrawController.php +++ b/app/Admin/Controllers/LanzuCsWithdrawController.php @@ -89,7 +89,7 @@ class LanzuCsWithdrawController extends AdminController $form->text('amount', '可提现金额')->value(LanzuUserBalance::getBalance($cs->id, 3))->disable(); $form->hidden('cs_id', '提现用户id')->value($cs->id); $form->text('csInfo.name', '提现用户')->value($cs->name)->disable(); - $form->text('money'); + $form->number('money')->min(0)->max(1); } } @@ -124,11 +124,7 @@ class LanzuCsWithdrawController extends AdminController //记录失败日志 Log::error('提现失败.', $res); } - - - dd($res); } - }); } diff --git a/app/Admin/Controllers/LanzuServiceRewardController.php b/app/Admin/Controllers/LanzuServiceRewardController.php new file mode 100644 index 0000000..3e07f1a --- /dev/null +++ b/app/Admin/Controllers/LanzuServiceRewardController.php @@ -0,0 +1,88 @@ +id->sortable(); + $grid->column('first_reward','首单奖励')->display(function (){ + return $this->set_reward[0]['first_reward'].' 元'; + }); + $grid->column('service_reward','站点奖励')->display(function (){ + return $this->set_reward[0]['service_reward'].' 元'; + }); + $grid->column('flow_reward','流水奖励')->display(function (){ + $f = $this->set_reward[0]['flow_reward']*100; + return $f.='%'; + }); + $grid->type->display(function (){ + return '社区'; + }); + $grid->created_at; + $grid->updated_at; + + $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 LanzuServiceReward(), function (Show $show) { + + $show->field('first_reward','首单奖励')->value($show->model()->set_reward[0]['first_reward']); + $show->field('service_reward','站点奖励')->value($show->model()->set_reward[0]['service_reward']); + $show->field('flow_reward','流水奖励')->value($show->model()->set_reward[0]['flow_reward']); + + + $show->field('type')->value('社区'); + $show->created_at; + $show->updated_at; + }); + } + + /** + * Make a form builder. + * + * @return Form + */ + protected function form() + { + return Form::make(new LanzuServiceReward(), function (Form $form) { + $form->display('id'); + + $form->embeds('set_reward','奖励配置',function ($form){ + $form->number('first_reward','首单奖励(元)')->min(0); + $form->number('service_reward','站点奖励(元)')->min(0); + $form->number('flow_reward','流水奖励(%)')->min(0)->saving(function ($value){ + return $value/100; + }); + }); + + + }); + } +} diff --git a/app/Admin/Repositories/LanzuServiceReward.php b/app/Admin/Repositories/LanzuServiceReward.php new file mode 100644 index 0000000..277f1b2 --- /dev/null +++ b/app/Admin/Repositories/LanzuServiceReward.php @@ -0,0 +1,16 @@ +resource('/mm_withdraw', 'LanzuMmWithdrawController'); $router->resource('/cs', 'LanzuCsInfoController'); $router->resource('/cs_withdraw', 'LanzuCsWithdrawController'); + $router->resource('/service_reward', 'LanzuServiceRewardController'); $router->any('/mm_list', 'LanzuMmWithdrawController@mmInfoList'); $router->any('/api/getMarket', 'LanzuMmInfoController@getMarket'); diff --git a/app/Models/LanzuServiceReward.php b/app/Models/LanzuServiceReward.php new file mode 100644 index 0000000..3d84d60 --- /dev/null +++ b/app/Models/LanzuServiceReward.php @@ -0,0 +1,27 @@ +'json' + ]; + + public function getCreatedAtAttribute($value) + { + return date('Y-m-d H:i',$value); + } + public function getUpdatedAtAttribute($value) + { + return date('Y-m-d H:i',$value); + } + +} diff --git a/dcat_admin_ide_helper.php b/dcat_admin_ide_helper.php index 08cfa2b..b196c5b 100644 --- a/dcat_admin_ide_helper.php +++ b/dcat_admin_ide_helper.php @@ -68,6 +68,7 @@ namespace Dcat\Admin { * @property Grid\Column|Collection is_pay * @property Grid\Column|Collection mm_id * @property Grid\Column|Collection admin_user_id + * @property Grid\Column|Collection cs_id * @property Grid\Column|Collection activity * @property Grid\Column|Collection forward * @property Grid\Column|Collection repay @@ -602,6 +603,7 @@ namespace Dcat\Admin { * @property Grid\Column|Collection print_mode * @property Grid\Column|Collection is_yydc * @property Grid\Column|Collection is_ps + * @property Grid\Column|Collection is_ps * @property Grid\Column|Collection is_cj * @property Grid\Column|Collection cj_name * @property Grid\Column|Collection wmps_name @@ -666,6 +668,7 @@ namespace Dcat\Admin { * @property Grid\Column|Collection distance * @property Grid\Column|Collection is_jf * @property Grid\Column|Collection fx_title + * @property Grid\Column|Collection fx_title * @property Grid\Column|Collection hygn * @property Grid\Column|Collection hy_discount * @property Grid\Column|Collection hy_details @@ -1151,13 +1154,12 @@ namespace Dcat\Admin { * @property Grid\Column|Collection logo_url * @property Grid\Column|Collection success * @property Grid\Column|Collection error - * @property Grid\Column|Collection cs_id + * @property Grid\Column|Collection qrcode_path * @property Grid\Column|Collection user_type * @property Grid\Column|Collection money_type * @property Grid\Column|Collection source_type * @property Grid\Column|Collection comment * @property Grid\Column|Collection is_del - * @property Grid\Column|Collection balance * @property Grid\Column|Collection is_operated * @property Grid\Column|Collection c_attitude * @property Grid\Column|Collection c_service @@ -1167,8 +1169,10 @@ namespace Dcat\Admin { * @property Grid\Column|Collection user_created_at * @property Grid\Column|Collection qr_url * @property Grid\Column|Collection head_url + * @property Grid\Column|Collection set_reward * @property Grid\Column|Collection device_name * @property Grid\Column|Collection bind_time + * @property Grid\Column|Collection balance * @property Grid\Column|Collection bind_type * @property Grid\Column|Collection json_data * @property Grid\Column|Collection email_verified_at @@ -1230,6 +1234,7 @@ namespace Dcat\Admin { * @method Grid\Column|Collection is_pay(string $label = null) * @method Grid\Column|Collection mm_id(string $label = null) * @method Grid\Column|Collection admin_user_id(string $label = null) + * @method Grid\Column|Collection cs_id(string $label = null) * @method Grid\Column|Collection activity(string $label = null) * @method Grid\Column|Collection forward(string $label = null) * @method Grid\Column|Collection repay(string $label = null) @@ -1688,6 +1693,7 @@ namespace Dcat\Admin { * @method Grid\Column|Collection is_dn(string $label = null) * @method Grid\Column|Collection is_yy(string $label = null) * @method Grid\Column|Collection is_tk(string $label = null) + * @method Grid\Column|Collection openId(string $label = null) * @method Grid\Column|Collection wm_money(string $label = null) * @method Grid\Column|Collection combination(string $label = null) * @method Grid\Column|Collection spec_id(string $label = null) @@ -1763,7 +1769,7 @@ namespace Dcat\Admin { * @method Grid\Column|Collection print_mode(string $label = null) * @method Grid\Column|Collection is_yydc(string $label = null) * @method Grid\Column|Collection is_ps(string $label = null) - + * @method Grid\Column|Collection is_ps(string $label = null) * @method Grid\Column|Collection is_cj(string $label = null) * @method Grid\Column|Collection cj_name(string $label = null) * @method Grid\Column|Collection wmps_name(string $label = null) @@ -1828,7 +1834,7 @@ namespace Dcat\Admin { * @method Grid\Column|Collection distance(string $label = null) * @method Grid\Column|Collection is_jf(string $label = null) * @method Grid\Column|Collection fx_title(string $label = null) - + * @method Grid\Column|Collection fx_title(string $label = null) * @method Grid\Column|Collection hygn(string $label = null) * @method Grid\Column|Collection hy_discount(string $label = null) * @method Grid\Column|Collection hy_details(string $label = null) @@ -1896,6 +1902,8 @@ namespace Dcat\Admin { * @method Grid\Column|Collection yh_money(string $label = null) * @method Grid\Column|Collection origin_id(string $label = null) * @method Grid\Column|Collection body(string $label = null) + * @method Grid\Column|Collection appId(string $label = null) + * @method Grid\Column|Collection appSecret(string $label = null) * @method Grid\Column|Collection jdId(string $label = null) * @method Grid\Column|Collection pdId(string $label = null) * @method Grid\Column|Collection weChatId(string $label = null) @@ -2312,13 +2320,12 @@ namespace Dcat\Admin { * @method Grid\Column|Collection logo_url(string $label = null) * @method Grid\Column|Collection success(string $label = null) * @method Grid\Column|Collection error(string $label = null) - * @method Grid\Column|Collection cs_id(string $label = null) + * @method Grid\Column|Collection qrcode_path(string $label = null) * @method Grid\Column|Collection user_type(string $label = null) * @method Grid\Column|Collection money_type(string $label = null) * @method Grid\Column|Collection source_type(string $label = null) * @method Grid\Column|Collection comment(string $label = null) * @method Grid\Column|Collection is_del(string $label = null) - * @method Grid\Column|Collection balance(string $label = null) * @method Grid\Column|Collection is_operated(string $label = null) * @method Grid\Column|Collection c_attitude(string $label = null) * @method Grid\Column|Collection c_service(string $label = null) @@ -2328,8 +2335,10 @@ namespace Dcat\Admin { * @method Grid\Column|Collection user_created_at(string $label = null) * @method Grid\Column|Collection qr_url(string $label = null) * @method Grid\Column|Collection head_url(string $label = null) + * @method Grid\Column|Collection set_reward(string $label = null) * @method Grid\Column|Collection device_name(string $label = null) * @method Grid\Column|Collection bind_time(string $label = null) + * @method Grid\Column|Collection balance(string $label = null) * @method Grid\Column|Collection bind_type(string $label = null) * @method Grid\Column|Collection json_data(string $label = null) * @method Grid\Column|Collection email_verified_at(string $label = null) @@ -2396,6 +2405,7 @@ namespace Dcat\Admin { * @property Show\Field|Collection is_pay * @property Show\Field|Collection mm_id * @property Show\Field|Collection admin_user_id + * @property Show\Field|Collection cs_id * @property Show\Field|Collection activity * @property Show\Field|Collection forward * @property Show\Field|Collection repay @@ -2930,6 +2940,7 @@ namespace Dcat\Admin { * @property Show\Field|Collection print_mode * @property Show\Field|Collection is_yydc * @property Show\Field|Collection is_ps + * @property Show\Field|Collection is_ps * @property Show\Field|Collection is_cj * @property Show\Field|Collection cj_name * @property Show\Field|Collection wmps_name @@ -2994,6 +3005,7 @@ namespace Dcat\Admin { * @property Show\Field|Collection distance * @property Show\Field|Collection is_jf * @property Show\Field|Collection fx_title + * @property Show\Field|Collection fx_title * @property Show\Field|Collection hygn * @property Show\Field|Collection hy_discount * @property Show\Field|Collection hy_details @@ -3479,13 +3491,12 @@ namespace Dcat\Admin { * @property Show\Field|Collection logo_url * @property Show\Field|Collection success * @property Show\Field|Collection error - * @property Show\Field|Collection cs_id + * @property Show\Field|Collection qrcode_path * @property Show\Field|Collection user_type * @property Show\Field|Collection money_type * @property Show\Field|Collection source_type * @property Show\Field|Collection comment * @property Show\Field|Collection is_del - * @property Show\Field|Collection balance * @property Show\Field|Collection is_operated * @property Show\Field|Collection c_attitude * @property Show\Field|Collection c_service @@ -3495,8 +3506,10 @@ namespace Dcat\Admin { * @property Show\Field|Collection user_created_at * @property Show\Field|Collection qr_url * @property Show\Field|Collection head_url + * @property Show\Field|Collection set_reward * @property Show\Field|Collection device_name * @property Show\Field|Collection bind_time + * @property Show\Field|Collection balance * @property Show\Field|Collection bind_type * @property Show\Field|Collection json_data * @property Show\Field|Collection email_verified_at @@ -3558,6 +3571,7 @@ namespace Dcat\Admin { * @method Show\Field|Collection is_pay(string $label = null) * @method Show\Field|Collection mm_id(string $label = null) * @method Show\Field|Collection admin_user_id(string $label = null) + * @method Show\Field|Collection cs_id(string $label = null) * @method Show\Field|Collection activity(string $label = null) * @method Show\Field|Collection forward(string $label = null) * @method Show\Field|Collection repay(string $label = null) @@ -4016,6 +4030,7 @@ namespace Dcat\Admin { * @method Show\Field|Collection is_dn(string $label = null) * @method Show\Field|Collection is_yy(string $label = null) * @method Show\Field|Collection is_tk(string $label = null) + * @method Show\Field|Collection openId(string $label = null) * @method Show\Field|Collection wm_money(string $label = null) * @method Show\Field|Collection combination(string $label = null) * @method Show\Field|Collection spec_id(string $label = null) @@ -4091,6 +4106,7 @@ namespace Dcat\Admin { * @method Show\Field|Collection print_mode(string $label = null) * @method Show\Field|Collection is_yydc(string $label = null) * @method Show\Field|Collection is_ps(string $label = null) + * @method Show\Field|Collection is_ps(string $label = null) * @method Show\Field|Collection is_cj(string $label = null) * @method Show\Field|Collection cj_name(string $label = null) * @method Show\Field|Collection wmps_name(string $label = null) @@ -4155,6 +4171,7 @@ namespace Dcat\Admin { * @method Show\Field|Collection distance(string $label = null) * @method Show\Field|Collection is_jf(string $label = null) * @method Show\Field|Collection fx_title(string $label = null) + * @method Show\Field|Collection fx_title(string $label = null) * @method Show\Field|Collection hygn(string $label = null) * @method Show\Field|Collection hy_discount(string $label = null) * @method Show\Field|Collection hy_details(string $label = null) @@ -4222,6 +4239,8 @@ namespace Dcat\Admin { * @method Show\Field|Collection yh_money(string $label = null) * @method Show\Field|Collection origin_id(string $label = null) * @method Show\Field|Collection body(string $label = null) + * @method Show\Field|Collection appId(string $label = null) + * @method Show\Field|Collection appSecret(string $label = null) * @method Show\Field|Collection jdId(string $label = null) * @method Show\Field|Collection pdId(string $label = null) * @method Show\Field|Collection weChatId(string $label = null) @@ -4638,13 +4657,12 @@ namespace Dcat\Admin { * @method Show\Field|Collection logo_url(string $label = null) * @method Show\Field|Collection success(string $label = null) * @method Show\Field|Collection error(string $label = null) - * @method Show\Field|Collection cs_id(string $label = null) + * @method Show\Field|Collection qrcode_path(string $label = null) * @method Show\Field|Collection user_type(string $label = null) * @method Show\Field|Collection money_type(string $label = null) * @method Show\Field|Collection source_type(string $label = null) * @method Show\Field|Collection comment(string $label = null) * @method Show\Field|Collection is_del(string $label = null) - * @method Show\Field|Collection balance(string $label = null) * @method Show\Field|Collection is_operated(string $label = null) * @method Show\Field|Collection c_attitude(string $label = null) * @method Show\Field|Collection c_service(string $label = null) @@ -4654,8 +4672,10 @@ namespace Dcat\Admin { * @method Show\Field|Collection user_created_at(string $label = null) * @method Show\Field|Collection qr_url(string $label = null) * @method Show\Field|Collection head_url(string $label = null) + * @method Show\Field|Collection set_reward(string $label = null) * @method Show\Field|Collection device_name(string $label = null) * @method Show\Field|Collection bind_time(string $label = null) + * @method Show\Field|Collection balance(string $label = null) * @method Show\Field|Collection bind_type(string $label = null) * @method Show\Field|Collection json_data(string $label = null) * @method Show\Field|Collection email_verified_at(string $label = null) @@ -4671,19 +4691,19 @@ namespace Dcat\Admin { namespace Dcat\Admin\Grid { /** - + */ class Column {} /** - + */ class Filter {} } namespace Dcat\Admin\Show { /** - + */ class Field {} } diff --git a/resources/lang/zh-CN/lanzu-service-reward.php b/resources/lang/zh-CN/lanzu-service-reward.php new file mode 100644 index 0000000..a81cf0a --- /dev/null +++ b/resources/lang/zh-CN/lanzu-service-reward.php @@ -0,0 +1,12 @@ + [ + 'LanzuServiceReward' => 'LanzuServiceReward', + ], + 'fields' => [ + 'set_reward' => '奖励配置', + 'type' => '类型', + ], + 'options' => [ + ], +];