Browse Source

修复社区提现金额显示不正确的问题

master
lanzu_qinsheng 5 years ago
parent
commit
681727ee1e
  1. 2
      app/Admin/Controllers/LanzuCsWithdrawController.php
  2. 1
      app/Admin/Controllers/LanzuFinancialRecord.php
  3. 3
      app/Models/LanzuUserBalance.php

2
app/Admin/Controllers/LanzuCsWithdrawController.php

@ -92,7 +92,7 @@ class LanzuCsWithdrawController extends AdminController
if ($user->isRole('lanzu_cs')) {//如果是社区站点角色
$cs = LanzuCsInfo::where('admin_user_id', $user->id)->first();
if ($cs) {
$form->text('amount', '可提现金额')->value(LanzuUserBalance::getBalance($user->id, ))->disable();
$form->text('amount', '可提现金额')->value(LanzuUserBalance::getBalance($user->id,Type::BALANCE_USER_TYPE_CS))->disable();
$form->hidden('cs_id', '提现用户id')->value($cs->id);
$form->text('csInfo.name', '提现用户')->value($cs->name)->disable();
$form->number('money')->min(env('MIN_MONEY'))->max(env('MAX_MONEY'));

1
app/Admin/Controllers/LanzuFinancialRecord.php

@ -66,6 +66,7 @@ class LanzuFinancialRecord extends AdminController
}
});
$grid->disableActions();
$grid->disableViewButton();
$grid->disableCreateButton();
$grid->disableEditButton();

3
app/Models/LanzuUserBalance.php

@ -16,10 +16,9 @@ class LanzuUserBalance extends Model
* @param $uid
* @param $uType 0/1 普通用户/服务商
*/
public static function getBalance($uid, $uType = 0)
public static function getBalance($uid, $uType=null)
{
$row = self::where(['source_id' => $uid, 'user_type' => $uType])->first();
if ($row) {
return $row->balance;
} else {

Loading…
Cancel
Save