添加获取余额提现记录
This commit is contained in:
parent
d29a657680
commit
828b09e951
@ -35,8 +35,8 @@ class Recharge extends Api
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* 卡密核销
|
||||
*/
|
||||
public function kamihexiao(){
|
||||
@ -60,4 +60,17 @@ class Recharge extends Api
|
||||
$result = RechargeLogic::rechargeRecord($get);
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现记录
|
||||
*/
|
||||
public function widthdrawlRecord()
|
||||
{
|
||||
$get = $this->request->get();
|
||||
$get['page_no'] = $get['page_no'] ?? $this->page_no;
|
||||
$get['page_size'] = $get['page_size'] ?? $this->page_size;
|
||||
$get['user_id'] = $this->user_id;
|
||||
$result = RechargeLogic::widthdrawlRecord($get);
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
namespace app\api\logic;
|
||||
|
||||
use app\common\basics\Logic;
|
||||
use app\common\model\BalanceWithdrawApply;
|
||||
use app\common\model\RechargeTemplate;
|
||||
use app\common\model\RechargeOrder;
|
||||
use app\common\server\ConfigServer;
|
||||
@ -149,7 +150,7 @@ class RechargeLogic extends Logic
|
||||
'user_id' => $get['user_id'],
|
||||
'pay_status' => PayEnum::ISPAID
|
||||
])
|
||||
->count();
|
||||
->count();
|
||||
|
||||
foreach($list as &$item) {
|
||||
if($item['give_money'] > 0) {
|
||||
@ -170,4 +171,41 @@ class RechargeLogic extends Logic
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 提现记录
|
||||
*/
|
||||
public static function widthdrawlRecord($get)
|
||||
{
|
||||
$list = BalanceWithdrawApply::where([
|
||||
'user_id' => $get['user_id']
|
||||
])
|
||||
->field('sn, type, money, left_money, poundage, description, create_time, status')
|
||||
->order('create_time', 'desc')
|
||||
->page($get['page_no'], $get['page_size'])
|
||||
->select()
|
||||
->toArray();
|
||||
|
||||
foreach ($list as &$v) {
|
||||
if (!is_null($v['description'])) {
|
||||
$v['desc'] = $v['description'] ? '审核失败:' . $v['description'] : '审核失败,金额已退回佣金账户';
|
||||
} else {
|
||||
$v['desc'] = '提现¥' . number_format($v['money'], 2) . ', 手续费: ' . ($v['poundage'] * 100) . '%, 实际到账 ¥' . $v['left_money'];
|
||||
}
|
||||
}
|
||||
|
||||
$count = BalanceWithdrawApply::where([
|
||||
'user_id' => $get['user_id']
|
||||
])->count();
|
||||
|
||||
$result = [
|
||||
'count' => $count,
|
||||
'lists' => $list,
|
||||
'more' => is_more($count, $get['page_no'], $get['page_size']),
|
||||
'page_no' => $get['page_no'],
|
||||
'page_size' => $get['page_size']
|
||||
];
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user