新增日志调整

pull/1/head
limu 12 months ago
parent cbb467a725
commit 3fc70947bd
  1. 12
      app/api/model/dealer/Withdraw.php

@ -19,6 +19,7 @@ use app\common\enum\dealer\withdraw\PayType as PayTypeEnum;
use app\common\enum\dealer\withdraw\ApplyStatus as ApplyStatusEnum;
use cores\exception\BaseException;
use yiovo\captcha\facade\CaptchaApi;
use app\api\model\user\BalanceLog;
/**
* 分销商提现明细模型
@ -73,7 +74,7 @@ class Withdraw extends WithdrawModel
return false;
}
//手续费
if(empty($data['is_invoice'])){
if (empty($data['is_invoice'])) {
$commission = \app\api\model\Setting::getFinanceCommission();
if (empty($commission)) {
$data['commission_price'] = bcmath($data['money'], $commission / 100, 2);
@ -88,6 +89,15 @@ class Withdraw extends WithdrawModel
'platform' => getPlatform(),
'store_id' => self::$storeId
]));
// 新增操作记录
BalanceLog::insert([
'user_id' => $dealer['user_id'],
'scene' => 50,
'money' => -$data['money'],
'describe' => '分销佣金提现',
'store_id' => self::$storeId,
'create_time' => time(),
]);
// 冻结用户资金
DealerUserModel::freezeMoney((int)$dealer['user_id'], (string)$data['money']);
});

Loading…
Cancel
Save