56 lines
1.5 KiB
PHP
56 lines
1.5 KiB
PHP
<?php
|
|
namespace Yunshop\UseStaff\admin;
|
|
|
|
|
|
use app\common\components\BaseController;
|
|
use app\common\helpers\PaginationHelper;
|
|
use Yunshop\UseStaff\models\ExternalApi;
|
|
use Yunshop\UseStaff\models\UseStaffSalary;
|
|
|
|
class WithdrawalController extends BaseController{
|
|
/**
|
|
* Common: 进入提现记录列表
|
|
* Author: wu-hui
|
|
* Time: 2023/10/09 14:58
|
|
* @return array|string
|
|
* @throws \Throwable
|
|
*/
|
|
public function index(){
|
|
//参数获取
|
|
$pageSize = request()->input('page_size',10);
|
|
$search = request()->input('search');
|
|
// 获取列表信息
|
|
$result = UseStaffSalary::getList($pageSize,$search);
|
|
|
|
$data = [
|
|
'list' => $result['data'],
|
|
'pager' => PaginationHelper::show($result['total'],$result['current_page'],$result['per_page']),
|
|
'search' => $search
|
|
];
|
|
|
|
return view('Yunshop\UseStaff::admin.withdrawal.index',$data)->render();
|
|
}
|
|
/**
|
|
* Common: 刷新提现打款信息
|
|
* Author: wu-hui
|
|
* Time: 2023/10/09 15:00
|
|
* @return mixed
|
|
*/
|
|
public function refreshInfo(){
|
|
try{
|
|
// 参数获取
|
|
$id = request()->input('id');
|
|
// 刷新信息
|
|
$attachId = UseStaffSalary::where('id',$id)->value('attach_id');
|
|
(new ExternalApi())->salaryOutOrderResult($attachId);
|
|
// 刷新完成
|
|
|
|
return $this->message('刷新成功');
|
|
}catch(\Exception $e){
|
|
return $this->message($e->getMessage());
|
|
}
|
|
}
|
|
|
|
|
|
}
|