YS:佣金体现BUG

es
yangsai@163.com 8 months ago
parent 1c592065a0
commit 3f3c00178e
  1. 2
      app/api/controller/Dealer.php
  2. 2
      app/api/controller/dealer/Withdraw.php
  3. 3
      app/api/model/Setting.php
  4. 2
      app/api/model/dealer/Withdraw.php

@ -28,7 +28,7 @@ class Dealer extends Controller
{ {
// 当前用户信息 // 当前用户信息
/* @var UserModel $user */ /* @var UserModel $user */
private UserModel $user; public $user;
// 当前分销商信息 // 当前分销商信息
private ?DealerUserModel $dealer; private ?DealerUserModel $dealer;

@ -57,7 +57,7 @@ class Withdraw extends Controller
// 提交提现申请 // 提交提现申请
$model = new WithdrawModel; $model = new WithdrawModel;
$data = $this->request->post(); $data = $this->request->post();
if ($model->submit($dealer, $data)) { if ($model->submit($dealer, $data['from'])) {
return $this->renderSuccess([], '提现申请已提交成功,请等待审核'); return $this->renderSuccess([], '提现申请已提交成功,请等待审核');
} }
return $this->renderError($model->getError() ?: '提交失败'); return $this->renderError($model->getError() ?: '提交失败');

@ -55,7 +55,8 @@ class Setting extends SettingModel
*/ */
public static function getFinanceCommission() public static function getFinanceCommission()
{ {
return static::getItem(SettingEnum::TRADE)['finance_process']; $return = empty(static::getItem(SettingEnum::TRADE)['finance_process'])?'':static::getItem(SettingEnum::TRADE)['finance_process'];
return $return;
} }
/** /**

@ -76,7 +76,7 @@ class Withdraw extends WithdrawModel
//手续费 //手续费
if (empty($data['is_invoice'])) { if (empty($data['is_invoice'])) {
$commission = \app\api\model\Setting::getFinanceCommission(); $commission = \app\api\model\Setting::getFinanceCommission();
if (empty($commission)) { if (!empty($commission)) {
$data['commission_price'] = bcmath($data['money'], $commission / 100, 2); $data['commission_price'] = bcmath($data['money'], $commission / 100, 2);
} }
} }

Loading…
Cancel
Save